fix duplicates when found new village + show returning scouts on rally point

This commit is contained in:
unknown
2012-06-17 11:18:28 +03:00
parent 7cbfd7acc9
commit 1232c8c87e
7 changed files with 103 additions and 13 deletions
+4 -3
View File
@@ -13,13 +13,14 @@
</div>
<?php
$units_type = $database->getMovement("34",$village->wid,1);
$settlers = $database->getMovement("7",$village->wid,1);
$units_incoming = count($units_type);
$settlers_incoming = count($settlers);
for($i=0;$i<$units_incoming;$i++){
if($units_type[$i]['attack_type'] == 1)
if($units_type[$i]['attack_type'] == 1 && $units_type[$i]['sort_type'] == 3)
$units_incoming -= 1;
}
if($units_incoming >= 1){
if($units_incoming > 0 or $settlers_incoming > 0){
?>
<h4>Incoming troops (<?php echo $units_incoming; ?>)</h4>
<?php include("16_incomming.tpl");