more fixes

This commit is contained in:
unknown
2012-06-18 20:38:27 +03:00
parent 527316097b
commit 86dc4c1904
41 changed files with 2003 additions and 1399 deletions
+2 -9
View File
@@ -161,20 +161,13 @@ class Units {
$form->addError("error","Player is under beginners protection. You can't attack him");
}
//check if banned:
//check if banned/admin:
$villageOwner = $database->getVillageField($id,'owner');
$userAccess = $database->getUserField($villageOwner,'access',0);
if($userAccess == '0'){
if($userAccess == '0' or $userAccess == '8' or $userAccess == '9'){
$form->addError("error","Player is Banned. You can't attack him");
//break;
}
//check if admin:
$villageOwner = $database->getVillageField($id,'owner');
$userAccess = $database->getUserField($villageOwner,'access',0);
if($userAccess == '9'){
$form->addError("error","Player is Admin. You can't attack him");
//break;
}
//check if attacking same village that units are in
if($id == $village->wid){