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
+3 -1
View File
@@ -17,8 +17,10 @@ include_once("GameEngine/Village.php");
AccessLogger::logRequest();
if(isset($_GET['ok'])){
$database->updateUserField($session->uid,'ok','0','1'); $_SESSION['ok'] = '0';
$database->updateUserField($session->uid,'ok', 0, 1);
$_SESSION['ok'] = '0';
}
if(isset($_GET['newdid'])) {
$_SESSION['wid'] = $_GET['newdid'];
$database->query("UPDATE ".TB_PREFIX."users SET village_select=".$database->escape((int) $_GET['newdid'])." WHERE id=".$session->uid);