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
committerShauren <shauren.trinity@gmail.com>2019-08-17 20:04:14 +0200
commit60663d1374beef3103f4787152654034fa4a8897 (patch)
tree38e07d44442ad903a9729536942e8e253a072274 /src/server/game/Entities/DynamicObject
parent98180ecdc179386270e93b80c0db8344b659557f (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 (cherrypicked from 7567cafec84080d26ea513242a1f540a823b8f9d)
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 5947680d131..c3972316290 100644
--- a/src/server/game/Entities/DynamicObject/DynamicObject.cpp
+++ b/src/server/game/Entities/DynamicObject/DynamicObject.cpp
@@ -18,6 +18,7 @@
#include "DynamicObject.h"
#include "Common.h"
+#include "GameTime.h"
#include "Log.h"
#include "Map.h"
#include "ObjectAccessor.h"
@@ -103,7 +104,7 @@ bool DynamicObject::CreateDynamicObject(ObjectGuid::LowType guidlow, Unit* caste
SetUpdateFieldValue(dynamicObjectData.ModifyValue(&UF::DynamicObjectData::SpellXSpellVisualID), spellXSpellVisualId);
SetUpdateFieldValue(dynamicObjectData.ModifyValue(&UF::DynamicObjectData::SpellID), spell->Id);
SetUpdateFieldValue(dynamicObjectData.ModifyValue(&UF::DynamicObjectData::Radius), radius);
- SetUpdateFieldValue(dynamicObjectData.ModifyValue(&UF::DynamicObjectData::CastTime), getMSTime());
+ SetUpdateFieldValue(dynamicObjectData.ModifyValue(&UF::DynamicObjectData::CastTime), GameTime::GetGameTimeMS());
if (IsWorldObject())
setActive(true); //must before add to map to be put in world container