Browse Source

Add "levelup" boolean to output of *place.php

master
Skylar Ittner 5 years ago
parent
commit
9f1e642a47
  1. 2
      attackplace.php
  2. 2
      claimplace.php
  3. 2
      refillplace.php

2
attackplace.php

@ -118,4 +118,4 @@ if ($placehp == 0) {
$database->update('locations', ['currentlife' => $placehp], ['locationid' => $VARS['locationid']]);
}
sendOK(($dolevelup ? PLAYER_LEVEL_UP : PLACE_SUCCESS));
echo json_encode(["status" => "OK", "message" => ($dolevelup ? PLAYER_LEVEL_UP : PLACE_SUCCESS), "levelup" => ($dolevelup ? true : false)]);

2
claimplace.php

@ -44,4 +44,4 @@ if (floor($userlevel) > floor($user['level'])) {
// Update the place
$database->update('locations', ['currentlife' => 100, 'maxlife' => 100, 'owneruuid' => $_SESSION['uuid'], 'teamid' => $user['teamid']], ['locationid' => $VARS['locationid']]);
sendOK(($dolevelup ? PLAYER_LEVEL_UP : PLACE_SUCCESS));
echo json_encode(["status" => "OK", "message" => ($dolevelup ? PLAYER_LEVEL_UP : PLACE_SUCCESS), "levelup" => ($dolevelup ? true : false)]);

2
refillplace.php

@ -49,4 +49,4 @@ if ($placelife > 100) {
// Update the place
$database->update('locations', ['currentlife' => $placelife, 'maxlife' => 100, 'owneruuid' => $_SESSION['uuid'], 'teamid' => $user['teamid']], ['locationid' => $VARS['locationid']]);
sendOK(($dolevelup ? PLAYER_LEVEL_UP : PLACE_HEALTH_REFILLED));
echo json_encode(["status" => "OK", "message" => ($dolevelup ? PLAYER_LEVEL_UP : PLACE_HEALTH_REFILLED), "levelup" => ($dolevelup ? true : false)]);