diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 81bab4a1772..09f08d50b28 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -3399,12 +3399,17 @@ class spell_gen_turkey_marker : public AuraScript void OnPeriodic(AuraEffect const* /*aurEff*/) { - if (_applyTimes.empty()) - return; + int32 removeCount = 0; - // pop stack if it expired for us - if (_applyTimes.front() + GetMaxDuration() < GameTime::GetGameTimeMS()) - ModStackAmount(-1, AURA_REMOVE_BY_EXPIRE); + // pop expired times off of the stack + while (!_applyTimes.empty() && _applyTimes.front() + GetMaxDuration() < GameTime::GetGameTimeMS()) + { + _applyTimes.pop_front(); + removeCount++; + } + + if (removeCount) + ModStackAmount(-removeCount, AURA_REMOVE_BY_EXPIRE); } void Register() override