Ensure that all actions are compared to fixed point in time (ie. world update start)
This commit is contained in:
1 parent
00babf222a
commit
adae2fec26
43 files changed
+479
-185
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user