Trying to fix this monstrosity #2

This commit is contained in:
evader1337
2016-09-13 18:54:25 +02:00
parent 2cf2f3c343
commit 2d26af7c46
69 changed files with 4516 additions and 4583 deletions
+3 -3
View File
@@ -186,8 +186,8 @@ if(isset($_GET['o'])) {
if ($prisoner['t11']>0){
$p_qh = "SELECT * FROM ".TB_PREFIX."hero WHERE uid = ".$p_owner."";
$p_resulth = mysql_query($p_qh);
$p_hero_f=mysql_fetch_array($p_resulth);
$p_resulth = mysqli_query($GLOBALS['link'],$p_qh);
$p_hero_f=mysqli_fetch_array($p_resulth);
$p_hero_unit=$p_hero_f['unit'];
$p_speeds[] = $GLOBALS['u'.$p_hero_unit]['speed'];
}
@@ -214,7 +214,7 @@ if(isset($_GET['o'])) {
$troops = $prisoner['t1']+$prisoner['t2']+$prisoner['t3']+$prisoner['t4']+$prisoner['t5']+$prisoner['t6']+$prisoner['t7']+$prisoner['t8']+$prisoner['t9']+$prisoner['t10']+$prisoner['t11'];
if($prisoner['t11'] > 0){
$p_owner = $database->getVillageField($prisoner['from'],"owner");
mysql_query("UPDATE ".TB_PREFIX."hero SET `dead` = '1', `health` = '0' WHERE `uid` = '".$p_owner."'");
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."hero SET `dead` = '1', `health` = '0' WHERE `uid` = '".$p_owner."'");
}
$database->modifyUnit($prisoner['wref'],array("99o"),array($troops),array(0));
$database->deletePrisoners($prisoner['id']);