diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index bc26d92009..5355bee78f 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -4339,6 +4339,16 @@ void Unit::_ApplyAllAuraStatMods() (*i).second->GetBase()->HandleAllEffects(i->second, AURA_EFFECT_HANDLE_STAT, true); } +bool Unit::HasLimitedTargetAuraForSpell(uint32 spellId) const +{ + AurasBySpellIdMap::const_iterator itr = m_ltAuras.find(spellId); + + if (itr == m_ltAuras.end()) + return false; + + return !itr->second.empty(); +} + AuraEffect* Unit::GetAuraEffect(uint32 spellId, uint8 effIndex, ObjectGuid caster) const { AuraApplicationMapBounds range = m_appliedAuras.equal_range(spellId); diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index de5db9caf7..6bf39a5521 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -1403,6 +1403,7 @@ class TC_GAME_API Unit : public WorldObject AuraEffectList const& GetAuraEffectsByType(AuraType type) const { return m_modAuras[type]; } AuraList& GetLimitedCastAuras(uint32 spellId) { return m_ltAuras[spellId]; } AurasBySpellIdMap& GetAllLimitedCastAuras() { return m_ltAuras; } + bool HasLimitedTargetAuraForSpell(uint32 spellId) const; AuraEffect* GetAuraEffect(uint32 spellId, uint8 effIndex, ObjectGuid casterGUID = ObjectGuid::Empty) const; AuraEffect* GetAuraEffectOfRankedSpell(uint32 spellId, uint8 effIndex, ObjectGuid casterGUID = ObjectGuid::Empty) const; diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp index b4400eba61..9c45b630f9 100644 --- a/src/server/scripts/Spells/spell_mage.cpp +++ b/src/server/scripts/Spells/spell_mage.cpp @@ -982,7 +982,7 @@ class spell_mage_nether_vortex : public AuraScript bool CheckProc(ProcEventInfo& /*eventInfo*/) { - return GetTarget()->GetLimitedCastAuras(SPELL_MAGE_SLOW).empty(); + return GetTarget()->HasLimitedTargetAuraForSpell(SPELL_MAGE_SLOW); } void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)