Fix vacation mode

This commit is contained in:
Shadow
2015-03-17 14:09:48 +02:00
parent 31d914a8d5
commit e366960f43
+6 -6
View File
@@ -148,12 +148,6 @@ class Units {
$id = $generator->getBaseID($coor['x'],$coor['y']);
if (!$database->getVillageState($id)){
$form->addError("error","Coordinates do not exist");
//check vaction mode- by advocaite
if($database->getUserField($_POST['user'],"vac_mode",1) == 1){
//if($database->getvacmodexy($id)){
$form->addError("error","User is on vacation mode");
}
//END Vaction mode check
}
}
if (!empty($coor)) {
@@ -191,6 +185,12 @@ class Units {
$form->addError("error","Player is Banned. You can't attack him");
//break;
}
//check if vacation mode:
$villageOwner = $database->getVillageField($id,'owner');
if($database->getvacmodexy($id)){
$form->addError("error","User is on vacation mode");
//break;
}
//check if attacking same village that units are in
if($id == $village->wid){