mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-28 00:24:23 +00:00
fix: due to DB inconsistencies, don't check for hero unit in village
#371
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user