From e2ad6d3c2bd433f83135fe1b3a4a59bf9a89e938 Mon Sep 17 00:00:00 2001 From: Martin Ambrus Date: Sat, 25 Nov 2017 01:41:29 +0100 Subject: [PATCH] fix: due to DB inconsistencies, don't check for hero unit in village #371 --- GameEngine/Automation.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GameEngine/Automation.php b/GameEngine/Automation.php index 0d4a7ead..aec80406 100755 --- a/GameEngine/Automation.php +++ b/GameEngine/Automation.php @@ -4613,7 +4613,7 @@ class Automation { } $villunits = $unitData[$hdata['wref']]; - if($villunits['hero'] == 0 && $hdata['trainingtime'] < time() && $hdata['inrevive'] == 1){ + if($hdata['trainingtime'] < time() && $hdata['inrevive'] == 1){ mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "units SET hero = 1 WHERE vref = ".(int) $hdata['wref'].""); $columns[] = 'dead'; @@ -4632,7 +4632,7 @@ class Automation { $lastUpdateTime = (int) $hdata['trainingtime']; } - if($villunits['hero'] == 0 && $hdata['trainingtime'] < time() && $hdata['intraining'] == 1){ + if($hdata['trainingtime'] < time() && $hdata['intraining'] == 1){ mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "units SET hero = 1 WHERE vref = ".(int) $hdata['wref']); $columns[] = 'dead';