Fix vacation mode

+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.
This commit is contained in:
Catalin Novgorodschi
2018-06-26 10:42:07 +03:00
committed by GitHub
parent dffdcc4411
commit c9c9759664
+5 -12
View File
@@ -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);