Ensure that all actions are compared to fixed point in time (ie. world update start)

This commit is contained in:
Aokromes
2017-04-14 15:02:49 +02:00
parent 00babf222a
commit adae2fec26
43 changed files with 479 additions and 185 deletions

View File

@@ -23,6 +23,7 @@
*/
#include "ScriptMgr.h"
#include "GameTime.h"
#include "Battleground.h"
#include "Cell.h"
#include "CellImpl.h"
@@ -3199,7 +3200,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
@@ -3213,7 +3214,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);
}