diff --git a/Admin/Templates/Notice/10.tpl b/Admin/Templates/Notice/10.tpl
index 58b03e98..b17023a6 100644
--- a/Admin/Templates/Notice/10.tpl
+++ b/Admin/Templates/Notice/10.tpl
@@ -30,7 +30,7 @@ $date = $generator->procMtime($rep[0]['time']); ?>
| |
-> from the village |
+ from the village |
| Resources |
diff --git a/Admin/Templates/Notice/11.tpl b/Admin/Templates/Notice/11.tpl
index 339dce01..314efa85 100644
--- a/Admin/Templates/Notice/11.tpl
+++ b/Admin/Templates/Notice/11.tpl
@@ -30,7 +30,7 @@ $date = $generator->procMtime($rep[0]['time']); ?>
|
| |
-> from the village |
+ from the village |
| Resources |
diff --git a/Admin/Templates/Notice/12.tpl b/Admin/Templates/Notice/12.tpl
index 58b03e98..b17023a6 100644
--- a/Admin/Templates/Notice/12.tpl
+++ b/Admin/Templates/Notice/12.tpl
@@ -30,7 +30,7 @@ $date = $generator->procMtime($rep[0]['time']); ?>
|
| |
-> from the village |
+ from the village |
| Resources |
diff --git a/Admin/Templates/Notice/13.tpl b/Admin/Templates/Notice/13.tpl
index 58b03e98..b17023a6 100644
--- a/Admin/Templates/Notice/13.tpl
+++ b/Admin/Templates/Notice/13.tpl
@@ -30,7 +30,7 @@ $date = $generator->procMtime($rep[0]['time']); ?>
|
| |
-> from the village |
+ from the village |
| Resources |
diff --git a/Admin/Templates/Notice/14.tpl b/Admin/Templates/Notice/14.tpl
index 58b03e98..b17023a6 100644
--- a/Admin/Templates/Notice/14.tpl
+++ b/Admin/Templates/Notice/14.tpl
@@ -30,7 +30,7 @@ $date = $generator->procMtime($rep[0]['time']); ?>
|
| |
-> from the village |
+ from the village |
| Resources |
diff --git a/Admin/Templates/config.tpl b/Admin/Templates/config.tpl
index 2e03c971..d3e7bb00 100644
--- a/Admin/Templates/config.tpl
+++ b/Admin/Templates/config.tpl
@@ -398,6 +398,10 @@ if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN);
| Include Support Messages in Admin Mailbox |
Enabled"; } else if(ADMIN_RECEIVE_SUPPORT_MESSAGES == false){ echo "Disabled"; } ?> |
+
+ | Allow Administrative Accounts to be Raided and Attacked |
+ Yes"; } else if(ADMIN_ALLOW_INCOMING_RAIDS == false){ echo "No"; } ?> |
+
|
+
| Include Support Messages in Admin Mailbox: |
|
+
+ | Allow Administrative Accounts to be Raided and Attacked: |
+
+
+ |
+
diff --git a/GameEngine/Admin/Mods/constant_format.tpl b/GameEngine/Admin/Mods/constant_format.tpl
index f2166b5c..026d87ce 100755
--- a/GameEngine/Admin/Mods/constant_format.tpl
+++ b/GameEngine/Admin/Mods/constant_format.tpl
@@ -274,6 +274,9 @@ define("ADMIN_NAME", "%ANAME%");
// ***** Show Support Messages in Admin
define("ADMIN_RECEIVE_SUPPORT_MESSAGES", %ASUPPMSGS%);
+// ***** Allow Admin accounts to be raided and attacked
+define("ADMIN_ALLOW_INCOMING_RAIDS", %ARAIDS%);
+
//////////////////////////////////////////
diff --git a/GameEngine/Admin/Mods/editAdminInfo.php b/GameEngine/Admin/Mods/editAdminInfo.php
index 8777db2d..4cb12b81 100755
--- a/GameEngine/Admin/Mods/editAdminInfo.php
+++ b/GameEngine/Admin/Mods/editAdminInfo.php
@@ -100,6 +100,7 @@ $fh = fopen($myFile, 'w') or die("
Can't open file: GameEngine\con
$text = preg_replace("'%AEMAIL%'", $_POST['aemail'], $text);
$text = preg_replace("'%ANAME%'", $_POST['aname'], $text);
$text = preg_replace("'%ASUPPMSGS%'", ($_POST['admin_support_msgs'] == 'True' ? 'true' : 'false'), $text);
+ $text = preg_replace("'%ARAIDS%'", ($_POST['admin_raidable'] == 'True' ? 'true' : 'false'), $text);
$text = preg_replace("'%UTRACK%'", "", $text);
$text = preg_replace("'%UTOUT%'", "", $text);
$text = preg_replace("'%DOMAIN%'", DOMAIN, $text);
diff --git a/GameEngine/Admin/Mods/editExtraSet.php b/GameEngine/Admin/Mods/editExtraSet.php
index 12fcd0be..0593e3b4 100755
--- a/GameEngine/Admin/Mods/editExtraSet.php
+++ b/GameEngine/Admin/Mods/editExtraSet.php
@@ -37,6 +37,7 @@ $fh = fopen($myFile, 'w') or die("
Can't open file: GameEngine\con
$LOG_ILLEGAL=(LOG_ILLEGAL==false)? "false":"true";
$INCLUDE_ADMIN=(INCLUDE_ADMIN==false)? "false":"true";
$SUPPORT_MSGS_IN_ADMIN = (ADMIN_RECEIVE_SUPPORT_MESSAGES == false ? 'false' : 'true');
+ $ADMINS_RAIDABLE = (ADMIN_ALLOW_INCOMING_RAIDS == false ? 'false' : 'true');
$text = file_get_contents("constant_format.tpl");
$text = preg_replace("'%ERRORREPORT%'", ERROR_REPORT, $text);
@@ -96,6 +97,7 @@ $fh = fopen($myFile, 'w') or die("
Can't open file: GameEngine\con
$text = preg_replace("'%AEMAIL%'", ADMIN_EMAIL, $text);
$text = preg_replace("'%ANAME%'", ADMIN_NAME, $text);
$text = preg_replace("'%ASUPPMSGS%'", $SUPPORT_MSGS_IN_ADMIN, $text);
+ $text = preg_replace("'%ARAIDS%'", $ADMINS_RAIDABLE, $text);
$text = preg_replace("'%UTRACK%'", "TRACK_USR", $text); // not in use, text only in a comment
$text = preg_replace("'%UTOUT%'", "USER_TIMEOUT", $text); // not in use, text only in a comment
$text = preg_replace("'%DOMAIN%'", DOMAIN, $text);
diff --git a/GameEngine/Admin/Mods/editLogSet.php b/GameEngine/Admin/Mods/editLogSet.php
index 504c1020..713fd6c6 100755
--- a/GameEngine/Admin/Mods/editLogSet.php
+++ b/GameEngine/Admin/Mods/editLogSet.php
@@ -33,6 +33,7 @@ $fh = fopen($myFile, 'w') or die("
Can't open file: GameEngine\con
$LIMIT_MAILBOX=(LIMIT_MAILBOX==false)? "false":"true";
$INCLUDE_ADMIN=(INCLUDE_ADMIN==false)? "false":"true";
$SUPPORT_MSGS_IN_ADMIN = (ADMIN_RECEIVE_SUPPORT_MESSAGES == false ? 'false' : 'true');
+ $ADMINS_RAIDABLE = (ADMIN_ALLOW_INCOMING_RAIDS == false ? 'false' : 'true');
$text = file_get_contents("constant_format.tpl");
$text = preg_replace("'%ERRORREPORT%'", $ERRORREPORT, $text);
@@ -96,6 +97,7 @@ $fh = fopen($myFile, 'w') or die("
Can't open file: GameEngine\con
$text = preg_replace("'%AEMAIL%'", ADMIN_EMAIL, $text);
$text = preg_replace("'%ANAME%'", ADMIN_NAME, $text);
$text = preg_replace("'%ASUPPMSGS%'", $SUPPORT_MSGS_IN_ADMIN, $text);
+ $text = preg_replace("'%ARAIDS%'", $ADMINS_RAIDABLE, $text);
$text = preg_replace("'%UTRACK%'", "", $text);
$text = preg_replace("'%UTOUT%'", "", $text);
$text = preg_replace("'%DOMAIN%'", DOMAIN, $text);
diff --git a/GameEngine/Admin/Mods/editNewsboxSet.php b/GameEngine/Admin/Mods/editNewsboxSet.php
index dfde541e..63bd6f4c 100755
--- a/GameEngine/Admin/Mods/editNewsboxSet.php
+++ b/GameEngine/Admin/Mods/editNewsboxSet.php
@@ -40,6 +40,7 @@ $fh = fopen($myFile, 'w') or die("
Can't open file: GameEngine\con
$LIMIT_MAILBOX=(LIMIT_MAILBOX==false)? "false":"true";
$INCLUDE_ADMIN=(INCLUDE_ADMIN==false)? "false":"true";
$SUPPORT_MSGS_IN_ADMIN = (ADMIN_RECEIVE_SUPPORT_MESSAGES == false ? 'false' : 'true');
+ $ADMINS_RAIDABLE = (ADMIN_ALLOW_INCOMING_RAIDS == false ? 'false' : 'true');
$text = file_get_contents("constant_format.tpl");
$text = preg_replace("'%ERRORREPORT%'", $ERRORREPORT, $text);
@@ -103,6 +104,7 @@ $fh = fopen($myFile, 'w') or die("
Can't open file: GameEngine\con
$text = preg_replace("'%AEMAIL%'", ADMIN_EMAIL, $text);
$text = preg_replace("'%ANAME%'", ADMIN_NAME, $text);
$text = preg_replace("'%ASUPPMSGS%'", $SUPPORT_MSGS_IN_ADMIN, $text);
+ $text = preg_replace("'%ARAIDS%'", $ADMINS_RAIDABLE, $text);
$text = preg_replace("'%UTRACK%'", "", $text);
$text = preg_replace("'%UTOUT%'", "", $text);
$text = preg_replace("'%DOMAIN%'", DOMAIN, $text);
diff --git a/GameEngine/Admin/Mods/editPlusSet.php b/GameEngine/Admin/Mods/editPlusSet.php
index 6caa567f..6bb63030 100644
--- a/GameEngine/Admin/Mods/editPlusSet.php
+++ b/GameEngine/Admin/Mods/editPlusSet.php
@@ -21,6 +21,7 @@ $fh = fopen($myFile, 'w') or die("
Can't open file: GameEngine\con
$text = file_get_contents("constant_format.tpl");
$SUPPORT_MSGS_IN_ADMIN = (ADMIN_RECEIVE_SUPPORT_MESSAGES == false ? 'false' : 'true');
+ $ADMINS_RAIDABLE = (ADMIN_ALLOW_INCOMING_RAIDS == false ? 'false' : 'true');
// SERVER SETTINGS - we need to keep these intact
$text = preg_replace("'%ERRORREPORT%'", ERROR_REPORT, $text);
@@ -80,6 +81,7 @@ $fh = fopen($myFile, 'w') or die("
Can't open file: GameEngine\con
$text = preg_replace("'%AEMAIL%'", ADMIN_EMAIL, $text);
$text = preg_replace("'%ANAME%'", ADMIN_NAME, $text);
$text = preg_replace("'%ASUPPMSGS%'", $SUPPORT_MSGS_IN_ADMIN, $text);
+ $text = preg_replace("'%ARAIDS%'", $ADMINS_RAIDABLE, $text);
$text = preg_replace("'%UTRACK%'", "TRACK_USR", $text); // not in use, text only in a comment
$text = preg_replace("'%UTOUT%'", "USER_TIMEOUT", $text); // not in use, text only in a comment
$text = preg_replace("'%DOMAIN%'", DOMAIN, $text);
diff --git a/GameEngine/Admin/Mods/editServerSet.php b/GameEngine/Admin/Mods/editServerSet.php
index b8d55b28..f35fef2b 100755
--- a/GameEngine/Admin/Mods/editServerSet.php
+++ b/GameEngine/Admin/Mods/editServerSet.php
@@ -32,6 +32,7 @@ $fh = fopen($myFile, 'w') or die("
Can't open file: GameEngine\con
$LIMIT_MAILBOX=(LIMIT_MAILBOX==false)? "false":"true";
$INCLUDE_ADMIN=(INCLUDE_ADMIN==false)? "false":"true";
$SUPPORT_MSGS_IN_ADMIN = (ADMIN_RECEIVE_SUPPORT_MESSAGES == false ? 'false' : 'true');
+ $ADMINS_RAIDABLE = (ADMIN_ALLOW_INCOMING_RAIDS == false ? 'false' : 'true');
$text = file_get_contents("constant_format.tpl");
$text = preg_replace("'%ERRORREPORT%'", $_POST['error'], $text);
@@ -90,6 +91,7 @@ $fh = fopen($myFile, 'w') or die("
Can't open file: GameEngine\con
$text = preg_replace("'%ARANK%'", $INCLUDE_ADMIN, $text);
$text = preg_replace("'%AEMAIL%'", ADMIN_EMAIL, $text);
$text = preg_replace("'%ASUPPMSGS%'", $SUPPORT_MSGS_IN_ADMIN, $text);
+ $text = preg_replace("'%ARAIDS%'", $ADMINS_RAIDABLE, $text);
$text = preg_replace("'%ANAME%'", ADMIN_NAME, $text);
$text = preg_replace("'%UTRACK%'", "", $text);
$text = preg_replace("'%UTOUT%'", "", $text);
diff --git a/GameEngine/Market.php b/GameEngine/Market.php
index c090badd..ed2bc019 100755
--- a/GameEngine/Market.php
+++ b/GameEngine/Market.php
@@ -77,10 +77,10 @@ class Market
$this->onmarket = $database->getMarket($village->wid,0);
$this->maxcarry = ($session->tribe == 1)? 500 : (($session->tribe == 2)? 1000 : 750);
$this->maxcarry *= TRADER_CAPACITY;
- if($building->getTypeLevel(28) != 0)
+ if($building->getTypeLevel(28) != 0)
{
$this->maxcarry *= $bid28[$building->getTypeLevel(28)]['attri'] / 100;
- }
+ }
}
private function sendResource($post)
diff --git a/GameEngine/Units.php b/GameEngine/Units.php
index 0bd10971..222c62ea 100755
--- a/GameEngine/Units.php
+++ b/GameEngine/Units.php
@@ -182,7 +182,7 @@ class Units {
//check if banned/admin:
$villageOwner = $database->getVillageField($id,'owner');
$userAccess = $database->getUserField($villageOwner,'access',0);
- if($userAccess == '0' or $userAccess == '8' or $userAccess == '9'){
+ if($userAccess == '0' or $userAccess == '8' or (!ADMIN_ALLOW_INCOMING_RAIDS && $userAccess == '9')){
$form->addError("error","Player is Banned. You can't attack him");
//break;
}
diff --git a/README b/README
index c340fed8..e26f7abd 100644
--- a/README
+++ b/README
@@ -53,6 +53,8 @@ martinambrus changes:
41. NPC links added to units in Hero Mansion
42. fixed random attacks attacker tribe (Natars) when building Wonder of the World
43. players who post in an Alliance forum are now notified of each subsequent post in that topic via messages
+44. editing troops in Admin now saves them when Enter is used instead of clicking on "Save" as well
+45. added option into Admin config to allow Administrative accounts to be raided and attacked (which also permits trading with them via Market)
Shadowss changes:
diff --git a/Templates/Build/17.tpl b/Templates/Build/17.tpl
index 9445bb85..ce2c6b00 100644
--- a/Templates/Build/17.tpl
+++ b/Templates/Build/17.tpl
@@ -14,7 +14,7 @@ var carry = maxcarry; ?>;
//-->
getVilWref($_POST['x'],$_POST['y']);
$checkexist = $database->checkVilExist($getwref);
@@ -29,7 +29,7 @@ $userAccess = $database->getUserField($villageOwner,'access',0);
}
$maxcarry = $market->maxcarry;
$maxcarry *= $market->merchantAvail();
-if(isset($_POST['ft'])=='check' && $allres!=0 && $allres <= $maxcarry && ($_POST['x']!="" && $_POST['y']!="" or $_POST['dname']!="") && $checkexist && $userAccess == 2){
+if(isset($_POST['ft'])=='check' && $allres!=0 && $allres <= $maxcarry && ($_POST['x']!="" && $_POST['y']!="" or $_POST['dname']!="") && $checkexist && ($userAccess == 2 || (ADMIN_ALLOW_INCOMING_RAIDS && $userAccess == 9))){
?>
|
|
|
|