mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-09-17 15:47:16 +00:00
fix: hero can be killed even if unit not present anywhere on the map
#371
This commit is contained in:
@@ -86,10 +86,10 @@ class funct {
|
|||||||
if (!$killhero){
|
if (!$killhero){
|
||||||
$killhero=$database->FindHeroInOasis($get['uid']);
|
$killhero=$database->FindHeroInOasis($get['uid']);
|
||||||
}
|
}
|
||||||
if ($killhero) {
|
|
||||||
$database->KillMyHero($get['uid']);
|
$database->KillMyHero($get['uid']);
|
||||||
$error="&kc=1";
|
$error="&kc=1";
|
||||||
}else $error="&e=1";
|
|
||||||
header("Location: admin.php?p=player&uid=".$get['uid'].$error);
|
header("Location: admin.php?p=player&uid=".$get['uid'].$error);
|
||||||
exit;
|
exit;
|
||||||
case "reviveHero":
|
case "reviveHero":
|
||||||
|
|||||||
@@ -7533,7 +7533,7 @@ References:
|
|||||||
function KillMyHero($id) {
|
function KillMyHero($id) {
|
||||||
list( $id ) = $this->escape_input( (int) $id );
|
list( $id ) = $this->escape_input( (int) $id );
|
||||||
|
|
||||||
$q = "UPDATE " . TB_PREFIX . "hero set dead = 1 where uid = " . $id . " AND dead = 0";
|
$q = "UPDATE " . TB_PREFIX . "hero set dead = 1, intraining = 0, inrevive = 0 where uid = " . $id . " AND dead = 0";
|
||||||
|
|
||||||
return mysqli_query( $this->dblink, $q );
|
return mysqli_query( $this->dblink, $q );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user