From ee285a4ed8dee468d08c467e63d81b2bd520cda3 Mon Sep 17 00:00:00 2001 From: Martin Ambrus Date: Sun, 5 Nov 2017 09:17:43 +0100 Subject: [PATCH] fix: units not returning from attack and staying as reinforcements --- GameEngine/Automation.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GameEngine/Automation.php b/GameEngine/Automation.php index 2796dd9b..7e4b5918 100755 --- a/GameEngine/Automation.php +++ b/GameEngine/Automation.php @@ -2957,7 +2957,7 @@ class Automation { } $database->setMovementProc($data['moveid']); - if(isset($chiefing_village) && $chiefing_village != 1){ + if(!isset($chiefing_village) || (isset($chiefing_village) && $chiefing_village != 1)){ $database->addMovement(4,$DefenderWref,$AttackerWref,$data['ref'],$AttackArrivalTime,$endtime); // send the bounty on type 6. @@ -2995,7 +2995,7 @@ class Automation { if($type == 3 or $type == 4){ $database->addGeneralAttack($totalattackdead); } - if(isset($village_destroyed) && $village_destroyed == 1){ + if(!isset($village_destroyed) || (isset($village_destroyed) && $village_destroyed == 1)){ if($can_destroy==1){ $this->DelVillage($data['to']); }