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

master
Skylar Ittner 7 years ago
parent 3f4756b4d5
commit 9f1e642a47

@ -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)]);

@ -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)]);

@ -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)]);