From 60663d1374beef3103f4787152654034fa4a8897 Mon Sep 17 00:00:00 2001 From: xinef1 Date: Thu, 2 Mar 2017 02:19:25 +0100 Subject: Ensure that all actions are compared to fixed point in time (ie. world update start) (#18910) - Actions will not be dependent on processing moment - Increased GameObjects cooldown resolution to milliseconds, fixes arming time of traps to be exactly one second and not something from range (1000, 1999) - Created GameTime namespace and UpdateTime class and moved there some code out of world (cherrypicked from 7567cafec84080d26ea513242a1f540a823b8f9d) --- src/server/scripts/Events/fireworks_show.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/server/scripts/Events') diff --git a/src/server/scripts/Events/fireworks_show.cpp b/src/server/scripts/Events/fireworks_show.cpp index 4712090b032..a052063bf26 100644 --- a/src/server/scripts/Events/fireworks_show.cpp +++ b/src/server/scripts/Events/fireworks_show.cpp @@ -20,6 +20,7 @@ #include "EventMap.h" #include "GameObject.h" #include "GameObjectAI.h" +#include "GameTime.h" #include "CreatureAIImpl.h" #include "GameEventMgr.h" #include "World.h" @@ -796,7 +797,7 @@ public: { _events.Update(diff); - time_t time = sWorld->GetGameTime(); + time_t time = GameTime::GetGameTime(); tm localTm; localtime_r(&time, &localTm); -- cgit v1.2.3