From 7704d847c7c1f6c110033f437e358176ae9c028d Mon Sep 17 00:00:00 2001 From: Shadow Date: Sat, 7 Dec 2013 07:11:23 +0200 Subject: [PATCH] Update Automation.php --- GameEngine/Automation.php | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/GameEngine/Automation.php b/GameEngine/Automation.php index 5a4502c4..297a72c1 100644 --- a/GameEngine/Automation.php +++ b/GameEngine/Automation.php @@ -1602,26 +1602,11 @@ class Automation { if($unitarray) { reset($unitarray); } $unitarray = $GLOBALS["u".$i]; - $totaldead_def += $dead[''.$i.'']; + $totaldead_def += $alldead[''.$i.'']; - $totalpoint_att += ($dead[''.$i.'']*$unitarray['pop']); + $totalpoint_att += ($alldead[''.$i.'']*$unitarray['pop']); } - $totalpoint_att += ($dead['hero']*6); - - if ($Attacker['uhero'] != 0){ - $heroxp = $totalpoint_att; - $database->modifyHeroXp("experience",$heroxp,$from['owner']); - } - - for($i=1;$i<=50;$i++) { - if($unitarray) { reset($unitarray); } - $unitarray = $GLOBALS["u".$i]; - - $totaldead_def += $dead[''.$i.'']; - - $totalpoint_att += ($dead[''.$i.'']*$unitarray['pop']); - } - $totalpoint_att += ($dead['hero']*6); + $totalpoint_att += ($alldead['hero']*6); if ($Attacker['uhero'] != 0){ $heroxp = $totalpoint_att;