General fixes

+Fixed a bug that permitted to attack occupied oasis (even through the
farmlist) even if the oasis' owner was banned
+Rewritten some code in Units.php, for a better errors handling
+Fixed some errors that could have showed sometimes
+Fixed a bug that didn't permit to send an attack under certain
circumstances
+Villages/oasis with X = 0 or Y = 0 as a coordinates, can now be raided
+You are now be able to send resources with the merchants, at villages
with X = 0 or Y = 0 as a coordinates
This commit is contained in:
iopietro
2018-05-29 18:57:14 +02:00
parent 498aaa962a
commit 36b790d08a
9 changed files with 181 additions and 226 deletions
+2 -2
View File
@@ -20,7 +20,7 @@ for ($a = 1; $a <= 4; $a++) {
}
}
$allres = (int) $_POST['r1'] + (int) $_POST['r2'] + (int) $_POST['r3'] + (int) $_POST['r4'];
if(!empty($_POST['x']) && !empty($_POST['y']) && is_numeric($_POST['x']) && is_numeric($_POST['y'])){
if($_POST['x'] != "" && $_POST['y'] != "" && is_numeric($_POST['x']) && is_numeric($_POST['y'])){
$getwref = $database->getVilWref($_POST['x'],$_POST['y']);
$checkexist = $database->checkVilExist($getwref);
}
@@ -72,7 +72,7 @@ if(isset($_POST['ft'])=='check' && (($_POST['send3'] > 1 && $_POST['send3'] <= 3
<tbody><tr>
<th><?php echo COORDINATES;?>:</th>
<?php
if(!empty($_POST['x']) && !empty($_POST['y']) && is_numeric($_POST['x']) && is_numeric($_POST['y'])){
if($_POST['x'] != "" && $_POST['y'] != "" && is_numeric($_POST['x']) && is_numeric($_POST['y'])){
$getwref = $database->getVilWref($_POST['x'],$_POST['y']);
$getvilname = $database->getVillageField($getwref, "name");
$getvilowner = $database->getVillageField($getwref, "owner");