mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-28 00:24:23 +00:00
0322a0ae49
+Fixed a bug that permitted to see troops movement with a 0 level rally point +Fixed a bug that permitted to send attacks, enforcements, etc. with a 0 level rally point +Fixed a bug that counted the moral bonus for attacks against WW villages +Fixed a bug that didn't permit to finish all buildings/researches, etc. without a plus account +Recoded part of Natars timer for being more generic +Natars/Artifacts spawn, WW villages spawn, WW building plans spawn are now based on the start date of the server and not on the installation date +Better indentation of some code
17 lines
741 B
Smarty
17 lines
741 B
Smarty
<?php
|
|
$time = time(); //The actual time
|
|
$startDate = strtotime(START_DATE); //When the server has started
|
|
$daysToDisplay = 432000 / SPEED; //5 days / SPEED of the server
|
|
$spawnTimeArray = ["Artifacts" => ($startDate + NATARS_SPAWN_TIME * 86400) - $time,
|
|
"WW villages" => ($startDate + NATARS_WW_SPAWN_TIME * 86400) - $time,
|
|
"WW building plans" => ($startDate + NATARS_WW_BUILDING_PLAN_SPAWN_TIME * 86400) - $time];
|
|
|
|
foreach($spawnTimeArray as $text => $spawnTime){
|
|
if($spawnTime <= $daysToDisplay && $spawnTime > 0){
|
|
?>
|
|
<br /><br />
|
|
<div>
|
|
<span><b><?php echo $text; ?></b> will spawn in: </span>
|
|
<span id="timer<?php echo ++$session->timer; ?>"><?php echo $generator->getTimeFormat($spawnTime); ?></span>
|
|
</div>
|
|
<?php }} ?> |