mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-10 14:46:09 +00:00
Artifacts fixes part 2
+Artifacts are now activated after a certain amount of time (based on the official Travian Rules and the server speed) and not immediately after the conquer +Artifacts are now activated based on official Travian Rules, you can only have 1 unique/account active artifacts Changes in 27_show.tpl: +Added the text "Can't be activated" to not-activable artifacts Changes in Automation.php: +Added a new method which activate activable artifacts Changes in Database.php: +Added some methods to support the new artifacts activation system
This commit is contained in:
@@ -8,8 +8,11 @@ if($artefact['size'] == 1 && $artefact['type'] != 11){
|
||||
$effect = ACCOUNT;
|
||||
}
|
||||
|
||||
$activationTime = 86400 / (SPEED == 2 ? 1.5 : (SPEED == 3 ? 2 : SPEED));
|
||||
|
||||
if($artefact['owner'] == 3) $active = "-";
|
||||
elseif (!$artefact['active']) $active = date("Y-m-d H:i:s",$artefact['conquered'] + 86400);
|
||||
elseif(!$artefact['active'] && $artefact['conquered'] < time() - $activationTime) $active = "<b>Can't be activated</b>";
|
||||
elseif (!$artefact['active']) $active = date("Y-m-d H:i:s", $artefact['conquered'] + $activationTime);
|
||||
else $active = "<b>".ACTIVE."</b>";
|
||||
|
||||
//// Added by brainiac - thank you
|
||||
|
||||
Reference in New Issue
Block a user