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

Port From (https://github.com/TrinityCore/TrinityCore/commit/60663d1374beef3103f4787152654034fa4a8897)
This commit is contained in:
hondacrx
2019-09-01 10:37:14 -04:00
parent dccded6a96
commit 87d30caa49
38 changed files with 302 additions and 169 deletions
+2 -2
View File
@@ -2661,7 +2661,7 @@ namespace Scripts.Spells.Generic
void OnApply(AuraEffect aurEff, AuraEffectHandleModes mode)
{
// store stack apply times, so we can pop them while they expire
_applyTimes.Add(Time.GetMSTime());
_applyTimes.Add(GameTime.GetGameTimeMS());
Unit target = GetTarget();
// on stack 15 cast the achievement crediting spell
@@ -2675,7 +2675,7 @@ namespace Scripts.Spells.Generic
return;
// pop stack if it expired for us
if (_applyTimes.First() + GetMaxDuration() < Time.GetMSTime())
if (_applyTimes.First() + GetMaxDuration() < GameTime.GetGameTimeMS())
ModStackAmount(-1, AuraRemoveMode.Expire);
}