Skip to content

Commit

Permalink
Bug Fixes
Browse files Browse the repository at this point in the history
+Fixed a bug that counted double upkeep for reinforcements of other players in oases
  • Loading branch information
iopietro authored Feb 24, 2019
1 parent 90ac702 commit 08b111d
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions GameEngine/Technology.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ function getAllUnits($base, $InVillageOnly = false, $mode = 0, $useCache = true)
}
}
if($mode == 0){
$enforceoasis = $database->getOasisEnforce($base, 0, $useCache);
$enforceoasis = $database->getOasisEnforce($base, 1, $useCache);
if(count($enforceoasis) > 0){
foreach($enforceoasis as $enforce){
for($i = 1; $i <= 50; $i++){
Expand All @@ -261,15 +261,6 @@ function getAllUnits($base, $InVillageOnly = false, $mode = 0, $useCache = true)
$ownunit['hero'] += $enforce['hero'];
}
}
$enforceoasis1 = $database->getOasisEnforce($base, 1, $useCache);
if(count($enforceoasis1) > 0){
foreach($enforceoasis1 as $enforce){
for($i = 1; $i <= 50; $i++){
$ownunit['u' . $i] += $enforce['u' . $i];
}
$ownunit['hero'] += $enforce['hero'];
}
}

$prisoners = $database->getPrisoners($base, 1, $useCache);
if(!empty($prisoners)){
Expand Down

0 comments on commit 08b111d

Please sign in to comment.