From f21b3894f40ab3f71c94eb6415588a45cd18c739 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 20 Apr 2012 01:31:34 +0300 Subject: [PATCH] fix carry in rallypoint --- GameEngine/Database/db_MYSQL.php | 3 +++ Templates/Build/16_incomming.tpl | 26 +++++++++++++++++++++++--- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/GameEngine/Database/db_MYSQL.php b/GameEngine/Database/db_MYSQL.php index 6a7bdf12..0862713b 100644 --- a/GameEngine/Database/db_MYSQL.php +++ b/GameEngine/Database/db_MYSQL.php @@ -1749,6 +1749,9 @@ case 0: $q = "SELECT * FROM " . TB_PREFIX . "movement, " . TB_PREFIX . "send where " . TB_PREFIX . "movement." . $where . " = $village and " . TB_PREFIX . "movement.ref = " . TB_PREFIX . "send.id and " . TB_PREFIX . "movement.proc = 0 and " . TB_PREFIX . "movement.sort_type = 0 ORDER BY endtime ASC"; break; + case 1: + $q = "SELECT * FROM " . TB_PREFIX . "movement, " . TB_PREFIX . "send where " . TB_PREFIX . "movement." . $where . " = $village and " . TB_PREFIX . "movement.ref = " . TB_PREFIX . "send.id and " . TB_PREFIX . "movement.proc = 0 and " . TB_PREFIX . "movement.sort_type = 6 ORDER BY endtime ASC"; + break; case 2: $q = "SELECT * FROM " . TB_PREFIX . "movement where " . TB_PREFIX . "movement." . $where . " = $village and " . TB_PREFIX . "movement.proc = 0 and " . TB_PREFIX . "movement.sort_type = 2 ORDER BY endtime ASC"; break; diff --git a/Templates/Build/16_incomming.tpl b/Templates/Build/16_incomming.tpl index 6fee6ec0..f74c5b2d 100644 --- a/Templates/Build/16_incomming.tpl +++ b/Templates/Build/16_incomming.tpl @@ -1,9 +1,15 @@ getMovement("34",$village->wid,1); $total_for = count($units); - +$send = $database->getMovement("1",$village->wid,1); +$total_for2 = count($send); for($y=0;$y < $total_for;$y++){ +for($i=0;$i < $total_for2;$i++){ +$res1 = mysql_query("SELECT * FROM " . TB_PREFIX . "send where id = ".$send[$i]['ref'].""); +$res = mysql_fetch_array($res1); +} $timer = $y+1; if ($units[$y]['sort_type']==3){ if ($units[$y]['attack_type']==3){ @@ -27,7 +33,7 @@ if ($units[$y]['sort_type']==3){ } echo "Troops"; for($i=$start;$i<=($end);$i++) { - $totalunits = $units[$y]['t1']+$units[$y]['2']+$units[$y]['3']+$units[$y]['4']+$units[$y]['5']+$units[$y]['6']+$units[$y]['7']+$units[$y]['8']+$units[$y]['9']+$units[$y]['10']+$units[$y]['t11']; + $totalunits = $units[$y]['t1']+$units[$y]['t2']+$units[$y]['t3']+$units[$y]['t4']+$units[$y]['t5']+$units[$y]['t6']+$units[$y]['t7']+$units[$y]['t8']+$units[$y]['t9']+$units[$y]['t10']+$units[$y]['t11']; if($totalunits > $building->getTypeLevel(16)){ echo "?"; }else{ @@ -108,7 +114,21 @@ $to = $database->getMInfo($units[$y]['vref']); } } ?> - + + + Bounty + + "> + \"Lumber\"".$res['wood']."\"Clay\"".$res['clay']."\"Iron\"".$res['iron']."\"Crop\"".$res['crop'].""; + echo "
\"carry\"".$totalres."/".$totalcarry."
"; + ?> + + + Arrival