mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-05 04:14:22 +00:00
fix hero problem with nothome
This commit is contained in:
@@ -3261,12 +3261,9 @@ $crannyimg = "<img src=\"".GP_LOCATE."img/g/g23.gif\" height=\"20\" width=\"15\"
|
||||
mysql_query("UPDATE " . TB_PREFIX ."hero SET points = points + 5 WHERE heroid = '".$hdata['heroid']."'");
|
||||
}
|
||||
$villunits = $database->getUnit($hdata['wref']);
|
||||
if($hero_info['dead'] == 1 or $villunits['hero'] == 1){
|
||||
mysql_query("UPDATE " . TB_PREFIX . "hero SET nothome = 0 WHERE heroid = ".$hdata['heroid']."");
|
||||
}
|
||||
if($villunits['hero'] == 0 && $hero_info['trainingtime'] < time() && $hero_info['nothome'] == 0){
|
||||
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', `health` = '100' WHERE `uid` = '".$hdata['uid']."'");
|
||||
mysql_query("UPDATE ".TB_PREFIX."hero SET `dead` = '0', `inrevive` = '0', `health` = '100' WHERE `uid` = '".$hdata['uid']."'");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -332,10 +332,6 @@ class Units {
|
||||
$checkoexist = $database->checkOasisExist($data['to_vid']);
|
||||
if($checkexist or $checkoexist){
|
||||
$database->addMovement(3,$village->wid,$data['to_vid'],$reference,time(),($time+time()));
|
||||
if($data['u11'] > 0){
|
||||
$heroid = $database->getHero($session->uid);
|
||||
mysql_query("UPDATE " . TB_PREFIX . "hero SET nothome = 1 WHERE heroid = ".$heroid."");
|
||||
}
|
||||
}
|
||||
|
||||
if($form->returnErrors() > 0) {
|
||||
|
||||
Reference in New Issue
Block a user