mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-15 15:51:01 +00:00
General fixes
+Moved "isWinner()" method from Automation.php to Session.php, it's now triggered when activating plus function or entering in plus1.php/build.php +General clean-up and better indentation +The tournament square bonus is now displayed correctly
This commit is contained in:
@@ -23,25 +23,19 @@ if(isset($_GET['z'])) {
|
||||
$y = $currentcoor['y'];
|
||||
$x = $currentcoor['x'];
|
||||
$bigmid = $_GET['z'];
|
||||
}
|
||||
else if(isset($_POST['xp']) && isset($_POST['yp'])){
|
||||
}else if(isset($_POST['xp']) && isset($_POST['yp'])){
|
||||
$x = $_POST['xp'];
|
||||
$y = $_POST['yp'];
|
||||
$bigmid = $generator->getBaseID($x,$y);
|
||||
}
|
||||
else {
|
||||
}else{
|
||||
$y = $village->coor['y'];
|
||||
$x = $village->coor['x'];
|
||||
$bigmid = $village->wid;
|
||||
}
|
||||
|
||||
if(isset($_SESSION['troops_movement'])){
|
||||
unset($_SESSION['troops_movement']);
|
||||
}
|
||||
if(isset($_SESSION['troops_movement'])) unset($_SESSION['troops_movement']);
|
||||
|
||||
if($session->plus){
|
||||
$session->populateAttacks();
|
||||
}
|
||||
if($session->plus) $session->populateAttacks();
|
||||
|
||||
$xm7 = ($x-7) < -WORLD_MAX? $x+WORLD_MAX+WORLD_MAX-6 : $x-7;
|
||||
$xm3 = ($x-3) < -WORLD_MAX? $x+WORLD_MAX+WORLD_MAX-2 : $x-3;
|
||||
|
||||
@@ -20,25 +20,19 @@ if(isset($_GET['z'])){
|
||||
$y = $currentcoor['y'];
|
||||
$x = $currentcoor['x'];
|
||||
$bigmid = $_GET['z'];
|
||||
}
|
||||
else if(isset($_POST['xp']) && isset($_POST['yp'])){
|
||||
}else if(isset($_POST['xp']) && isset($_POST['yp'])){
|
||||
$x = $_POST['xp'];
|
||||
$y = $_POST['yp'];
|
||||
$bigmid = $generator->getBaseID($x,$y);
|
||||
}
|
||||
else{
|
||||
}else{
|
||||
$y = $village->coor['y'];
|
||||
$x = $village->coor['x'];
|
||||
$bigmid = $village->wid;
|
||||
}
|
||||
|
||||
if(isset($_SESSION['troops_movement'])){
|
||||
unset($_SESSION['troops_movement']);
|
||||
}
|
||||
if(isset($_SESSION['troops_movement'])) unset($_SESSION['troops_movement']);
|
||||
|
||||
if($session->plus){
|
||||
$session->populateAttacks();
|
||||
}
|
||||
if($session->plus) $session->populateAttacks();
|
||||
|
||||
$xm7 = ($x-7) < -WORLD_MAX? $x+WORLD_MAX+WORLD_MAX-6 : $x-7;
|
||||
$xm6 = ($x-6) < -WORLD_MAX? $x+WORLD_MAX+WORLD_MAX-5 : $x-6;
|
||||
|
||||
Reference in New Issue
Block a user