diff --git a/Admin/Templates/editHero.tpl b/Admin/Templates/editHero.tpl index 9b8f20c2..19220085 100644 --- a/Admin/Templates/editHero.tpl +++ b/Admin/Templates/editHero.tpl @@ -10,11 +10,18 @@ ################################################################################# if(isset($_GET['uid'])){ $id = (int) $_GET['uid']; + $hid = (int) $_GET['hid']; include_once("../GameEngine/Data/hero_full.php"); include_once("../GameEngine/Units.php"); - $result = mysqli_query($GLOBALS["link"], "SELECT * FROM " . TB_PREFIX . "hero WHERE `uid` = ".$id); - $hero_info = mysqli_fetch_array($result); - $hero = $units->Hero($id,1); + $heroes = $units->Hero($id,1); + + foreach ($heroes as $hdata) { + if ($hdata['heroid'] == $hid) { + $hero = $hdata; + break; + } + } + $unarray = array(1=>U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46,U47,U48,U49,U50,U99,U0); $utribe=($user['tribe']-1)*10; ?> @@ -88,6 +95,7 @@ function check_unit(el) {