From abe36748d7fa473c43657f70c4bf00f1d1e5a38e Mon Sep 17 00:00:00 2001 From: Catalin Novgorodschi Date: Wed, 17 Jun 2026 08:56:34 +0300 Subject: [PATCH] Clea Automation.php Clean unused code --- GameEngine/Automation.php | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/GameEngine/Automation.php b/GameEngine/Automation.php index ed1cc2a3..52aa81e5 100644 --- a/GameEngine/Automation.php +++ b/GameEngine/Automation.php @@ -3157,10 +3157,6 @@ class Automation { $totalsend_alldef = $reinfReport['totalsend_alldef']; $Defender['hero'] = $reinfReport['defenderHero']; - ################################################# - ################FIXED BY SONGER################ - ################################################# - for($i = 1; $i <= 11; $i++){ //MUST TO BE FIX : This is only for defender and still not properly coded if (isset($battlepart['casualties_attacker']) && isset($battlepart['casualties_attacker'][$i]) && $battlepart['casualties_attacker'][$i] <= 0) { @@ -3172,8 +3168,6 @@ class Automation { } } - ################################################# - $dead = []; $owndead = []; $alldead = []; @@ -3346,27 +3340,6 @@ class Automation { //Update starvation data $database->addStarvationData($to['wref']); - //Returning units back to village is not necessary because it will be taken care when processing movement - // Fix by AL-Kateb - // if evasion was active, return units back to base - /* - if (isset($evaded)) { - foreach ($evasionUnitModifications_modes as $index => $mode) { - $evasionUnitModifications_modes[$index] = 1; - } - - $database->modifyUnit($data['to'], $evasionUnitModifications_units, $evasionUnitModifications_amounts, $evasionUnitModifications_modes); - } - */ - - ################################################# - ################FIXED BY SONGER################ - ################################################# - - ################################################################################ - ##############ISUE: Lag, fixed3#################################################### - #### PHP.NET manual: unset() destroy more than one variable unset($foo1, $foo2, $foo3);###### - ################################################################################ $data_num++; unset( @@ -3428,9 +3401,6 @@ class Automation { ,$DefenderUnit ,$info_trap ,$report); - - ################################################# - } } }