mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-12 23:56:08 +00:00
fix: hero dying and revival doesn't work correctly with multiple heroes
This commit is contained in:
@@ -380,7 +380,7 @@ $end = ($tribe*10);
|
||||
else
|
||||
{
|
||||
//$uid
|
||||
$q = "SELECT * FROM ".TB_PREFIX."hero WHERE uid = ".(int) $uid;
|
||||
$q = "SELECT * FROM ".TB_PREFIX."hero WHERE uid = ".(int) $uid." AND dead = 0";
|
||||
$result = mysqli_query($GLOBALS['link'],$q);
|
||||
$hero_f=mysqli_fetch_array($result);
|
||||
$hero_unit=$hero_f['unit'];
|
||||
|
||||
@@ -137,7 +137,7 @@ $tocoor = $database->getCoor($enforce['vref']);
|
||||
}
|
||||
}
|
||||
if ($enforce['hero']>0){
|
||||
$qh = "SELECT * FROM ".TB_PREFIX."hero WHERE uid = ".(int) $to['owner']."";
|
||||
$qh = "SELECT * FROM ".TB_PREFIX."hero WHERE uid = ".(int) $to['owner']." AND dead = 0";
|
||||
$resulth = mysqli_query($GLOBALS['link'],$qh);
|
||||
$hero_f=mysqli_fetch_array($resulth);
|
||||
$hero_unit=$hero_f['unit'];
|
||||
|
||||
@@ -138,7 +138,7 @@ $tocoor = $database->getCoor($enforce['vref']);
|
||||
}
|
||||
}
|
||||
if ($enforce['hero']>0){
|
||||
$qh = "SELECT * FROM ".TB_PREFIX."hero WHERE uid = ".(int) $to['owner']."";
|
||||
$qh = "SELECT * FROM ".TB_PREFIX."hero WHERE uid = ".(int) $to['owner']." AND dead = 0";
|
||||
$resulth = mysqli_query($GLOBALS['link'],$qh);
|
||||
$hero_f=mysqli_fetch_array($resulth);
|
||||
$hero_unit=$hero_f['unit'];
|
||||
|
||||
@@ -137,7 +137,7 @@ $tocoor = $database->getCoor($enforce['vref']);
|
||||
}
|
||||
}
|
||||
if ($enforce['hero']>0){
|
||||
$qh = "SELECT * FROM ".TB_PREFIX."hero WHERE uid = ".(int) $to['owner']."";
|
||||
$qh = "SELECT * FROM ".TB_PREFIX."hero WHERE uid = ".(int) $to['owner']." AND dead = 0";
|
||||
$resulth = mysqli_query($GLOBALS['link'],$qh);
|
||||
$hero_f=mysqli_fetch_array($resulth);
|
||||
$hero_unit=$hero_f['unit'];
|
||||
|
||||
@@ -138,7 +138,7 @@ $tocoor = $database->getCoor($enforce['vref']);
|
||||
}
|
||||
}
|
||||
if ($enforce['hero']>0){
|
||||
$qh = "SELECT * FROM ".TB_PREFIX."hero WHERE uid = ".(int) $to['owner']."";
|
||||
$qh = "SELECT * FROM ".TB_PREFIX."hero WHERE uid = ".(int) $to['owner']." AND dead = 0";
|
||||
$resulth = mysqli_query($GLOBALS['link'],$qh);
|
||||
$hero_f=mysqli_fetch_array($resulth);
|
||||
$hero_unit=$hero_f['unit'];
|
||||
|
||||
@@ -137,7 +137,7 @@ $tocoor = $database->getCoor($enforce['vref']);
|
||||
}
|
||||
}
|
||||
if ($enforce['hero']>0){
|
||||
$qh = "SELECT * FROM ".TB_PREFIX."hero WHERE uid = ".(int) $to['owner']."";
|
||||
$qh = "SELECT * FROM ".TB_PREFIX."hero WHERE uid = ".(int) $to['owner']." AND dead = 0";
|
||||
$resulth = mysqli_query($GLOBALS['link'],$qh);
|
||||
$hero_f=mysqli_fetch_array($resulth);
|
||||
$hero_unit=$hero_f['unit'];
|
||||
|
||||
Reference in New Issue
Block a user