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)
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include "Battleground.h"
|
||||
#include "CellImpl.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "GameTime.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "Group.h"
|
||||
#include "InstanceScript.h"
|
||||
@@ -3589,7 +3590,7 @@ class spell_gen_turkey_marker : public SpellScriptLoader
|
||||
void OnApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
// store stack apply times, so we can pop them while they expire
|
||||
_applyTimes.push_back(getMSTime());
|
||||
_applyTimes.push_back(GameTime::GetGameTimeMS());
|
||||
Unit* target = GetTarget();
|
||||
|
||||
// on stack 15 cast the achievement crediting spell
|
||||
@@ -3603,7 +3604,7 @@ class spell_gen_turkey_marker : public SpellScriptLoader
|
||||
return;
|
||||
|
||||
// pop stack if it expired for us
|
||||
if (_applyTimes.front() + GetMaxDuration() < getMSTime())
|
||||
if (_applyTimes.front() + GetMaxDuration() < GameTime::GetGameTimeMS())
|
||||
ModStackAmount(-1, AURA_REMOVE_BY_EXPIRE);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user