aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Entities/DynamicObject
diff options
context:
space:
mode:
authorxinef1 <w.szyszko2@gmail.com>2017-03-02 02:19:25 +0100
committerariel- <ariel-@users.noreply.github.com>2017-03-01 22:19:25 -0300
commit7567cafec84080d26ea513242a1f540a823b8f9d (patch)
treef6f37a7cc4d06db0dbb0e08a01f8a18cf47ac955 /src/server/game/Entities/DynamicObject
parent7011aabb56f061fc889ec42ce32b7605ceb35b53 (diff)
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
Diffstat (limited to 'src/server/game/Entities/DynamicObject')
-rw-r--r--src/server/game/Entities/DynamicObject/DynamicObject.cpp3
1 files changed, 2 insertions, 1 deletions
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