Fix natar start time

This commit is contained in:
novgorodschi catalin
2026-09-03 08:10:57 +03:00
parent 8ba9981f7c
commit b572760ee7
3 changed files with 12 additions and 4 deletions
@@ -52,13 +52,21 @@ trait AutomationNatarsWWBuild
$planTime = strtotime(START_DATE)
+ ((defined('NATARS_WW_BUILDING_PLAN_SPAWN_TIME') ? (int) NATARS_WW_BUILDING_PLAN_SPAWN_TIME : 0) * 86400);
$speed = (defined('SPEED') && SPEED > 0) ? (float) SPEED : 1.0;
$startAt = $planTime + (int) round($delay * 86400 / $speed);
// BUG FIX: intarzierea trebuie sa fie in zile CALENDARISTICE fixe de la
// planTime, la fel ca NATARS_SPAWN_TIME / NATARS_WW_SPAWN_TIME /
// NATARS_WW_BUILDING_PLAN_SPAWN_TIME (toate calculate cu
// strtotime(START_DATE) + CONST*86400, fara nicio scalare). Varianta
// veche impartea $delay*86400 la $speed, deci pe un server cu viteza
// mare 10 zile deveneau minute/secunde reale - Natarii porneau practic
// odata cu planurile.
$startAt = $planTime + ($delay * 86400);
if (time() < $startAt) {
return false;
}
$speed = (defined('SPEED') && SPEED > 0) ? (float) SPEED : 1.0;
// ATENTIE: NATARS_UID e constanta de CLASA (Artifacts::NATARS_UID), nu
// una globala. defined('NATARS_UID') intoarce mereu false, deci o
// verificare cu defined() ar folosi tacut o valoare gresita si Natarii
+1 -1
View File
@@ -249,7 +249,7 @@ define("NATARS_WW_BUILDING_PLAN_SPAWN_TIME",%NATARS_WW_BUILDING_PLAN_SPAWN_TIME%
// of their troops to defend it.
//
// 0 = The Natars do not build a World Wonder.
define("NATARS_WW_START_DELAY", %NATARS_WW_START_DELAY%);
define("NATARS_WW_START_DELAY",%NATARS_WW_START_DELAY%);
// ***** Nature troops regeneration time
define("NATURE_REGTIME",%NATURE_REGTIME%);
+1 -1
View File
@@ -6,7 +6,7 @@ $start_timer = $generator->pageLoadTimeStart();
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : winner.php ##
## Type : In Game Alliance Page ##
## Type : In Game Winner Announce Page ##
## --------------------------------------------------------------------------- ##
## Developed by : aggenkeech - and a little help from Eyas95 ##
## Refactored by : Shadow ##