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
+6 -9
View File
@@ -129,9 +129,8 @@ AccessLogger::logRequest();
<td><?php
$return=mysqli_query($link,"SELECT Count(*) as Total FROM " . TB_PREFIX . "users WHERE tribe!=0 AND tribe!=4 AND tribe!=5");
$users=(!empty($return))? mysqli_fetch_assoc($return)['Total']:0;
echo $users;
$return = mysqli_query($link, "SELECT Count(*) as Total FROM " . TB_PREFIX . "users WHERE tribe IN(1, 2, 3)");
echo !empty($return) ? mysqli_fetch_assoc($return)['Total'] : 0;
?></td>
</tr>
@@ -144,9 +143,8 @@ AccessLogger::logRequest();
<td><?php
$return = mysqli_query($link,"SELECT Count(*) as Total FROM " . TB_PREFIX . "users WHERE timestamp > ".(time() - (3600*24))." AND tribe!=0 AND tribe!=4 AND tribe!=5");
$active=(!empty($return))? mysqli_fetch_assoc($return)['Total']:0;
echo $active;
$return = mysqli_query($link,"SELECT Count(*) as Total FROM " . TB_PREFIX . "users WHERE timestamp > ".(time() - (3600*24))." AND tribe IN(1, 2, 3)");
echo !empty($return) ? mysqli_fetch_assoc($return)['Total'] : 0;
?></td>
</tr>
@@ -160,9 +158,8 @@ AccessLogger::logRequest();
<td><?php
$return = mysqli_query($link,"SELECT Count(*) as Total FROM " . TB_PREFIX . "users WHERE timestamp > ".(time() - (60*10))." AND tribe!=0 AND tribe!=4 AND tribe!=5");
$online=(!empty($return))? mysqli_fetch_assoc($return)['Total']:0;
echo $online;
$return = mysqli_query($link,"SELECT Count(*) as Total FROM " . TB_PREFIX . "users WHERE timestamp > ".(time() - (60*10))." AND tribe IN(1, 2, 3)");
echo !empty($return) ? mysqli_fetch_assoc($return)['Total'] : 0;
?></td>
</tr>