mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-09-03 08:57:17 +00:00
Fix vacation mode
This commit is contained in:
@@ -148,12 +148,6 @@ class Units {
|
|||||||
$id = $generator->getBaseID($coor['x'],$coor['y']);
|
$id = $generator->getBaseID($coor['x'],$coor['y']);
|
||||||
if (!$database->getVillageState($id)){
|
if (!$database->getVillageState($id)){
|
||||||
$form->addError("error","Coordinates do not exist");
|
$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)) {
|
if (!empty($coor)) {
|
||||||
@@ -191,6 +185,12 @@ class Units {
|
|||||||
$form->addError("error","Player is Banned. You can't attack him");
|
$form->addError("error","Player is Banned. You can't attack him");
|
||||||
//break;
|
//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
|
//check if attacking same village that units are in
|
||||||
if($id == $village->wid){
|
if($id == $village->wid){
|
||||||
|
|||||||
Reference in New Issue
Block a user