From 7567cafec84080d26ea513242a1f540a823b8f9d 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 --- src/server/game/Entities/DynamicObject/DynamicObject.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/server/game/Entities/DynamicObject') diff --git a/src/server/game/Entities/DynamicObject/DynamicObject.cpp b/src/server/game/Entities/DynamicObject/DynamicObject.cpp index 1fbe47bf640..b9be22478f6 100644 --- a/src/server/game/Entities/DynamicObject/DynamicObject.cpp +++ b/src/server/game/Entities/DynamicObject/DynamicObject.cpp @@ -21,6 +21,7 @@ #include "World.h" #include "ObjectAccessor.h" #include "DatabaseEnv.h" +#include "GameTime.h" #include "GridNotifiers.h" #include "GridNotifiersImpl.h" #include "ScriptMgr.h" @@ -103,7 +104,7 @@ bool DynamicObject::CreateDynamicObject(ObjectGuid::LowType guidlow, Unit* caste SetByteValue(DYNAMICOBJECT_BYTES, 0, type); SetUInt32Value(DYNAMICOBJECT_SPELLID, spellId); SetFloatValue(DYNAMICOBJECT_RADIUS, radius); - SetUInt32Value(DYNAMICOBJECT_CASTTIME, getMSTime()); + SetUInt32Value(DYNAMICOBJECT_CASTTIME, GameTime::GetGameTimeMS()); if (IsWorldObject()) setActive(true); //must before add to map to be put in world container -- cgit v1.2.3