From dd2a01238a380d0a20d3beea868fece1306afbe9 Mon Sep 17 00:00:00 2001 From: Shadow Date: Fri, 6 Dec 2013 19:04:11 +0200 Subject: [PATCH] Update Automation.php --- GameEngine/Automation.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/GameEngine/Automation.php b/GameEngine/Automation.php index 988783c2..d37781bf 100644 --- a/GameEngine/Automation.php +++ b/GameEngine/Automation.php @@ -1613,6 +1613,21 @@ class Automation { $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); + + if ($Attacker['uhero'] != 0){ + $heroxp = $totalpoint_att; + $database->modifyHeroXp("experience",$heroxp,$from['owner']); + } + for($i=1;$i<=10;$i++){ if($unitarray) { reset($unitarray); } $unitarray = $GLOBALS["u".(($att_tribe-1)*10+$i)];