mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-28 00:24:23 +00:00
Fixed a bug in the map
Enforcements/scouts/attacks are now tracked in the map if you've a plus account.
This commit is contained in:
+30
-1
@@ -273,7 +273,36 @@ class Session {
|
||||
$this->CheckHeroReal();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates an array with the vrefs of attacked/scouted/reinforced villages and oasis
|
||||
*
|
||||
*/
|
||||
|
||||
public function populateAttacks(){
|
||||
global $database, $village;
|
||||
|
||||
$troopsMovement = $database->getMovement(3, $village->wid, 0);
|
||||
|
||||
if(count($troopsMovement) > 0){
|
||||
foreach($troopsMovement as $movement)
|
||||
{
|
||||
switch($movement['attack_type']){
|
||||
case 1:
|
||||
$_SESSION['troops_movement']['scouts'][] = $movement['to'];
|
||||
break;
|
||||
case 2:
|
||||
$_SESSION['troops_movement']['enforcements'][] = $movement['to'];
|
||||
break;
|
||||
case 3:
|
||||
case 4:
|
||||
$_SESSION['troops_movement']['attacks'][] = $movement['to'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function SurfControl(){
|
||||
if(SERVER_WEB_ROOT) {
|
||||
$page = $_SERVER['SCRIPT_NAME'];
|
||||
|
||||
Reference in New Issue
Block a user