Browse Source

Fix artifact count bug

master
Skylar Ittner 5 years ago
parent
commit
f4a03dfb40
  1. 12
      placestats.php

12
placestats.php

@ -24,11 +24,13 @@ $gameinfo['owneruuid'] = "";
// calculate artifact score
$gameinfo['artifact'] = 0;
$templife = $gameinfo['currentlife'];
while ($templife > 100) {
$gameinfo['artifact']++;
$templife -= 75;
if ($gameinfo['currentlife'] > 100) {
$templife = $gameinfo['currentlife'];
while ($templife > 100) {
$gameinfo['artifact'] ++;
$templife -= 75;
}
}
$data['stats'] = $gameinfo;
echo json_encode($data);
echo json_encode($data);