diff --git a/GameEngine/Automation.php b/GameEngine/Automation.php index ed92fb0f..27f8114a 100644 --- a/GameEngine/Automation.php +++ b/GameEngine/Automation.php @@ -1,9 +1,9 @@ 100"; @@ -308,6 +311,9 @@ class Automation { } private function clearDeleting() { + if(file_exists("GameEngine/Prevention/cleardeleting.txt")) { + unlink("GameEngine/Prevention/cleardeleting.txt"); + } global $database; $ourFileHandle = fopen("GameEngine/Prevention/cleardeleting.txt", 'w'); fclose($ourFileHandle); @@ -423,6 +429,9 @@ class Automation { } private function culturePoints() { + if(file_exists("GameEngine/Prevention/culturepoints.txt")) { + unlink("GameEngine/Prevention/culturepoints.txt"); + } global $database,$session; $time = time()-600; // 10minutes $array = array(); @@ -444,6 +453,9 @@ class Automation { } private function buildComplete() { + if(file_exists("GameEngine/Prevention/build.txt")) { + unlink("GameEngine/Prevention/build.txt"); + } global $database,$bid18,$bid10,$bid11,$bid38,$bid39; $time = time(); $array = array(); @@ -723,6 +735,9 @@ class Automation { } private function marketComplete() { + if(file_exists("GameEngine/Prevention/market.txt")) { + unlink("GameEngine/Prevention/market.txt"); + } global $database; $ourFileHandle = fopen("GameEngine/Prevention/market.txt", 'w'); fclose($ourFileHandle); @@ -800,6 +815,9 @@ class Automation { } private function sendunitsComplete() { + if(file_exists("GameEngine/Prevention/sendunits.txt")) { + unlink("GameEngine/Prevention/sendunits.txt"); + } global $bid23,$bid34,$database,$battle,$village,$technology,$logging; $ourFileHandle = fopen("GameEngine/Prevention/sendunits.txt", 'w'); fclose($ourFileHandle); @@ -2561,6 +2579,9 @@ $crannyimg = "getHero(); if(!empty($harray)){ @@ -3261,7 +3303,7 @@ $crannyimg = "getUnit($hdata['wref']); - if($villunits['hero'] == 0 && $hdata['trainingtime'] < time() && $hdata['inrevive'] == 1){ + if($villunits['hero'] == 0 && $hero_info['trainingtime'] < time() && $hero_info['inrevive'] == 1){ mysql_query("UPDATE " . TB_PREFIX . "units SET hero = 1 WHERE vref = ".$hdata['wref'].""); mysql_query("UPDATE ".TB_PREFIX."hero SET `dead` = '0', `inrevive` = '0', `health` = '100' WHERE `uid` = '".$hdata['uid']."'"); } @@ -3420,6 +3462,9 @@ $crannyimg = "