From d229820d406878006777afbeb2c99571786f7a20 Mon Sep 17 00:00:00 2001 From: Shadowss Date: Fri, 20 Sep 2013 13:43:36 +0300 Subject: [PATCH] fix movements for found now village and oasis attack Must to be fixed in Templates/Build/16_incomming.tpl , because not show troops that are coming , only attacker view in rally poing what attack , the defender don`t show what coming , only on dorf1 --- Templates/movement.tpl | 70 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 68 insertions(+), 2 deletions(-) diff --git a/Templates/movement.tpl b/Templates/movement.tpl index c25ab17a..863e771b 100644 --- a/Templates/movement.tpl +++ b/Templates/movement.tpl @@ -4,12 +4,13 @@ ## --------------------------------------------------------------------------- ## ## Filename movement.tpl ## ## Developed by: Dzoki ## +## Updated by: Shadow ## ## License: TravianX Project ## ## Copyright: TravianX (c) 2010-2011. All rights reserved. ## ## ## ################################################################################# -$aantal = (count($database->getMovement(4,$village->wid,1))+count($database->getMovement(3,$village->wid,1))+count($database->getMovement(3,$village->wid,0))+count($database->getMovement(7,$village->wid,1))-count($database->getMovement(8,$village->wid,1))-count($database->getMovement(9,$village->wid,0))); +$aantal = (count($database->getMovement(4,$village->wid,1))+count($database->getMovement(34,$village->wid,1))+count($database->getMovement(3,$village->wid,1))+count($database->getMovement(3,$village->wid,0))+count($database->getMovement(7,$village->wid,1))+count($database->getMovement(5,$village->wid,0))+count($database->getMovement(6,$village->wid,0))-count($database->getMovement(8,$village->wid,1))-count($database->getMovement(9,$village->wid,0))); if($aantal > 0){ echo ''; @@ -129,4 +130,69 @@ if($lala > 0){ echo ''; $timer += 1; -} \ No newline at end of file +} + +/* Units send to reinf. (to my town) */ +$units_type = $database->getMovement("34",$village->wid,1); +$lala = count($units_type); +for($i=0;$i<$lala;$i++){ + if(($units_type[$i]['attack_type']==1)){ + $lala -= 1; + } +} + + if($lala > 0){ + if(!empty($NextArrival4)) { reset($NextArrival4); } + foreach($units_type as $receive) { + $action = 'def1'; + $aclass = 'd1'; + $title = ''.OWN_REINFORCING_TROOPS.''; + $short = ''.ARRIVING_REINF_TROOPS_SHORT.''; + $NextArrival4[] = $receive['endtime']; + } + + echo ' + '; + $timer += 1; + +} + +/* Found NEW VILLAGE by Shadow */ + +$aantal = count($database->getMovement(5,$village->wid,0)); +$aantal2 = $database->getMovement(5,$village->wid,0); +if($aantal > 0){ + if(!empty($NextArrival5)) { reset($NextArrival5); } + foreach($aantal2 as $receive) { + $action = 'att3'; + $aclass = 'a3'; + $title = ''.FOUNDNEWVILLAGE.''; + $short = ''.NEWVILLAGE.''; + $NextArrival5[] = $receive['endtime']; + } + + echo ' + '; + $timer += 1; + +} + +/* Attacks on Oasis (to my oasis) by Shadow */ + +$aantal = count($database->getMovement(6,$village->wid,0)); +$aantal2 = $database->getMovement(6,$village->wid,0); +if($aantal > 0){ + if(!empty($NextArrival6)) { reset($NextArrival6); } + foreach($aantal2 as $receive) { + $action = 'att3'; + $aclass = 'a1'; + $title = ''.OASISATTACK.''; + $short = ''.OASISATTACKS.''; + $NextArrival6[] = $receive['endtime']; + } + + echo ' + '; + $timer += 1; + +}
'.TROOP_MOVEMENTS.'
'.$title.'»
'.$lala.' '.$short.'
in '.$generator->getTimeFormat(min($NextArrival3)-time()).' '.HOURS.'
'.$title.'»
'.$lala.' '.$short.'
 '.$generator->getTimeFormat($receive['endtime']-time()).' '.HOURS.'
'.$title.'»
'.$aantal.' '.$short.'
 '.$generator->getTimeFormat($receive['endtime']-time()).' '.HOURS.'
'.$title.'»
'.$aantal.' '.$short.'
 '.$generator->getTimeFormat($receive['endtime']-time()).' '.HOURS.'