From c9c9759664fe040d42897b5a8cd419fdb2768f86 Mon Sep 17 00:00:00 2001 From: Catalin Novgorodschi <1140613+Shadowss@users.noreply.github.com> Date: Tue, 26 Jun 2018 10:42:07 +0300 Subject: [PATCH] Fix vacation mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit +now vacation mode fully work +you cannot send ressource / attacks from User Profile (» Send troops. (Vacation mode on) ) (» Send merchant(s). (Vacation mode on) ) +you cannot send ressource from marketplace : (Player is on vacation mode. You cannot send resources to him.) +you cannot attack him from rally point (User is on vacation mode) +also is display a message on player profile Player Shadow This player is on VACATION. +also is display an error message when you try to login Vacation mode is still enabled NOTE : must code the criteria from vacation mode 1. There are no moving troops 2. There are no troops that defend the villages of other players 3. No other player has reinforcements on you 4. You do not own a village with the Wonder of the World 5. You do not own an artifact 6. You are no longer in the beginner's protection 7. You do not have troops caught in the cells. 8. Your account is not being deleted. --- GameEngine/Database.php | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/GameEngine/Database.php b/GameEngine/Database.php index aa51c577..b791c47a 100755 --- a/GameEngine/Database.php +++ b/GameEngine/Database.php @@ -8081,33 +8081,26 @@ References: User ID/Message ID, Mode References: *****************************************/ - function setvacmode($uid, $days) - { + function setvacmode($uid, $days) { // TODO: refactor vacation mode - return; - list ($uid, $days) = $this->escape_input((int) $uid, (int) $days); $days1 = 60 * 60 * 24 * $days; $time = time() + $days1; $q = "UPDATE " . TB_PREFIX . "users SET vac_mode = '1' , vac_time=" . $time . " WHERE id=" . $uid . ""; $result = mysqli_query($this->dblink, $q); + return; } - function removevacationmode($uid) - { + function removevacationmode($uid){ // TODO: refactor vacation mode - return; - list ($uid) = $this->escape_input((int) $uid); $q = "UPDATE " . TB_PREFIX . "users SET vac_mode = '0' , vac_time='0' WHERE id=" . $uid . ""; $result = mysqli_query($this->dblink, $q); + return; } - function getvacmodexy($wref) - { + function getvacmodexy($wref){ // TODO: refactor vacation mode - return; - list ($wref) = $this->escape_input((int) $wref); $q = "SELECT id,oasistype,occupied FROM " . TB_PREFIX . "wdata where id = $wref"; $result = mysqli_query($this->dblink, $q);