diff --git a/GameEngine/Automation.php b/GameEngine/Automation.php
index efb09dbb..96699dc8 100755
--- a/GameEngine/Automation.php
+++ b/GameEngine/Automation.php
@@ -2204,7 +2204,7 @@ class Automation {
}
}
if ($herosend_att>0){
- $hero_unit = $database->getHeroField($from['owner'], 'unit', false);
+ $hero_unit = $database->getHeroField($from['owner'], 'unit');
$speeds[] = $GLOBALS['u'.$hero_unit]['speed'];
}
@@ -2803,7 +2803,7 @@ class Automation {
}
if ($prisoner['t11']>0){
- $p_hero_unit = $database->getHeroField($p_owner, 'unit', false)['unit'];
+ $p_hero_unit = $database->getHeroField($p_owner, 'unit');
$p_speeds[] = $GLOBALS['u'.$p_hero_unit]['speed'];
}
@@ -3004,7 +3004,7 @@ class Automation {
}
if ($herosend_att>0){
- $hero_unit = $database->getHeroField($from['owner'], 'unit', false)['unit'];
+ $hero_unit = $database->getHeroField($from['owner'], 'unit');
$speeds[] = $GLOBALS['u'.$hero_unit]['speed'];
}
@@ -3325,10 +3325,7 @@ class Automation {
}
if (isset($post['t11'])){
if( $post['t11'] != '' && $post['t11'] > 0){
- $qh = "SELECT unit FROM ".TB_PREFIX."hero WHERE uid = ".(int) $from['owner']." AND dead = 0";
- $resulth = mysqli_query($GLOBALS['link'],$qh);
- $hero_f=mysqli_fetch_array($resulth);
- $hero_unit=$hero_f['unit'];
+ $hero_unit = getHeroField($from['owner'], 'unit');
$speeds[] = $GLOBALS['u'.$hero_unit]['speed'];
} else {
$post['t11']='0';
diff --git a/GameEngine/Database.php b/GameEngine/Database.php
index 798577b9..88601b18 100755
--- a/GameEngine/Database.php
+++ b/GameEngine/Database.php
@@ -5717,7 +5717,7 @@ References: User ID/Message ID, Mode
$q = "SELECT * FROM ".TB_PREFIX."hero WHERE uid = $uid AND dead = 0";
$result = mysqli_query($this->dblink,$q);
- self::$heroFieldCache[$uid.$field] = $this->mysqli_fetch_all($result);
+ self::$heroFieldCache[$uid.$field] = $this->mysqli_fetch_all($result)[0];
return self::$heroFieldCache[$uid.$field][$field];
}
diff --git a/Templates/Build/16_walking.tpl b/Templates/Build/16_walking.tpl
index d3d527f5..bc9820e8 100644
--- a/Templates/Build/16_walking.tpl
+++ b/Templates/Build/16_walking.tpl
@@ -19,12 +19,12 @@ if($units[$y]['attack_type'] == 4){
$attack_type = RAID_ON;
}
$isoasis = $database->isVillageOases($units[$y]['to']);
-if ($isoasis ==0){
+if ($isoasis ==0){
$to = $database->getMInfo($units[$y]['to']);
} else {
$to = $database->getOMInfo($units[$y]['to']);}
?>
-
+
| getMapCheck($village->wid); ?>">vname; ?> |
@@ -35,10 +35,10 @@ $to = $database->getOMInfo($units[$y]['to']);}
| ";
for($i=($session->tribe-1)*10+1;$i<=$session->tribe*10;$i++) {
- echo " getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /> | ";
+ echo " getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /> | ";
}
if($units[$y]['t11'] != 0) {
- echo " | ";
+ echo " | ";
}
?>
@@ -84,17 +84,17 @@ $to = $database->getOMInfo($units[$y]['to']);}
-
+
getMovement(5,$village->wid,0);
+ $settlers = $database->getMovement(5,$village->wid,0);
if($settlers){
$total_for = count($settlers);
for($y=0;$y<$total_for;$y++){
$timer += 1;
-
+
?>
-
+
| getMapCheck($village->wid); ?>">vname; ?> |
@@ -108,7 +108,7 @@ $timer += 1;
$end = ($tribe*10);
echo "
| | ";
for($i=$start;$i<=($end);$i++) {
- echo " getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /> | ";
+ echo " getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /> | ";
}
?>
diff --git a/Templates/a2b/attack.tpl b/Templates/a2b/attack.tpl
index 190bba68..df279f02 100644
--- a/Templates/a2b/attack.tpl
+++ b/Templates/a2b/attack.tpl
@@ -38,16 +38,16 @@ $ckey= $generator->generateRandStr(6);
if (!isset($process['t1']) || $process['t1'] == ''){ $t1='0'; }else{ $t1=$process['t1']; }
- if (!isset($process['t2']) || $process['t2'] == ''){ $t2='0'; }else{ $t2=$process['t2']; }
- if (!isset($process['t3']) || $process['t3'] == ''){ $t3='0'; }else{ $t3=$process['t3']; if ($session->tribe == 3){ $scout=1; } }
- if (!isset($process['t4']) || $process['t4'] == ''){ $t4='0'; }else{ $t4=$process['t4']; if ($session->tribe == 1 || $session->tribe == 2 || $session->tribe == 4 || $session->tribe == 5){ $scout=1;} }
- if (!isset($process['t5']) || $process['t5'] == ''){ $t5='0'; }else{ $t5=$process['t5']; }
- if (!isset($process['t6']) || $process['t6'] == ''){ $t6='0'; }else{ $t6=$process['t6']; }
- if (!isset($process['t7']) || $process['t7'] == ''){ $t7='0'; }else{ $t7=$process['t7']; }
- if (!isset($process['t8']) || $process['t8'] == ''){ $t8='0'; }else{ $t8=$process['t8']; }
- if (!isset($process['t9']) || $process['t9'] == ''){ $t9='0'; }else{ $t9=$process['t9']; }
- if (!isset($process['t10']) || $process['t10'] == ''){ $t10='0'; }else{ $t10=$process['t10']; }
- if (!isset($process['t11']) || $process['t11'] == ''){ $t11='0'; }else{ $t11=$process['t11']; $showhero=1;}
+ if (!isset($process['t2']) || $process['t2'] == ''){ $t2='0'; }else{ $t2=$process['t2']; }
+ if (!isset($process['t3']) || $process['t3'] == ''){ $t3='0'; }else{ $t3=$process['t3']; if ($session->tribe == 3){ $scout=1; } }
+ if (!isset($process['t4']) || $process['t4'] == ''){ $t4='0'; }else{ $t4=$process['t4']; if ($session->tribe == 1 || $session->tribe == 2 || $session->tribe == 4 || $session->tribe == 5){ $scout=1;} }
+ if (!isset($process['t5']) || $process['t5'] == ''){ $t5='0'; }else{ $t5=$process['t5']; }
+ if (!isset($process['t6']) || $process['t6'] == ''){ $t6='0'; }else{ $t6=$process['t6']; }
+ if (!isset($process['t7']) || $process['t7'] == ''){ $t7='0'; }else{ $t7=$process['t7']; }
+ if (!isset($process['t8']) || $process['t8'] == ''){ $t8='0'; }else{ $t8=$process['t8']; }
+ if (!isset($process['t9']) || $process['t9'] == ''){ $t9='0'; }else{ $t9=$process['t9']; }
+ if (!isset($process['t10']) || $process['t10'] == ''){ $t10='0'; }else{ $t10=$process['t10']; }
+ if (!isset($process['t11']) || $process['t11'] == ''){ $t11='0'; }else{ $t11=$process['t11']; $showhero=1;}
if ($session->tribe == 3){
$totalunits = (!empty($process['t1']) ? $process['t1'] : 0) +
(!empty($process['t2']) ? $process['t2'] : 0) +
@@ -59,7 +59,7 @@ $ckey= $generator->generateRandStr(6);
(!empty($process['t9']) ? $process['t9'] : 0) +
(!empty($process['t10']) ? $process['t10'] : 0) +
(!empty($process['t11']) ? $process['t11'] : 0);
-
+
}else{
$totalunits = (!empty($process['t1']) ? $process['t1'] : 0) +
(!empty($process['t2']) ? $process['t2'] : 0) +
@@ -106,7 +106,7 @@ $start = ($tribe-1)*10+1;
$end = ($tribe*10);
?>
-
+
-
+
@@ -189,7 +189,7 @@ $actionType = "Raid";
-
+
@@ -208,7 +208,7 @@ $actionType = "Raid";
-
+
@@ -225,13 +225,13 @@ $actionType = "Raid";
-
+
-
+
getTypeLevel(16) >= 10) { ?>
@@ -243,7 +243,7 @@ $actionType = "Raid";
-
+
@@ -262,7 +262,7 @@ $actionType = "Raid";
-
+
@@ -279,13 +279,13 @@ $actionType = "Raid";
-
+
-
+
getTypeLevel(16) >= 10) { ?>
@@ -297,7 +297,7 @@ $actionType = "Raid";
-
+
@@ -308,16 +308,16 @@ $actionType = "Raid";
(will be attacked by catapult(s))
-
+ ?>
Destination: |
">
ONLY shoot with a normal attack (they dont shoot with raids!)";
?>
|
@@ -337,7 +337,7 @@ $actionType = "Raid";
Arrived: |
-
+
-
+
">
in getTimeFormat($time); ?>
-
+
at procMtime(date('U')+$time,9)?> hours
|
@@ -427,18 +427,18 @@ $actionType = "Raid";
-
+
-
+
-
+
-
+
-