Browse Source

Update player SCANS stat

master
Skylar Ittner 7 months ago
parent
commit
954fb0a836
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      api/actions/submitcode.php

+ 5
- 0
api/actions/submitcode.php View File

@@ -72,6 +72,11 @@ if ($database->has('claimedcodes', ["AND" => ['code' => $VARS["code"], 'accounti

$database->insert('inventory', ['accountid' => getRequestUser()->getUID(), 'itemid' => $itemid]);
$database->insert('claimedcodes', ['code' => $VARS["code"], 'accountid' => getRequestUser()->getUID()]);
$player = new Player(getRequestUser());
$player->stats->updateStat(PlayerStats::SCANS, 1);
$player->save();

$itemname = $database->get('items', 'itemname', ['itemid' => $itemid]);

$returndata["item"] = $itemname;

Loading…
Cancel
Save