diff --git a/src/game/AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp b/src/game/AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp index bd1b796c070..5c5f82b6af1 100644 --- a/src/game/AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp +++ b/src/game/AI/ScriptDevAI/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp @@ -22,6 +22,7 @@ SDCategory: Ulduar EndScriptData */ #include "AI/ScriptDevAI/include/sc_common.h" +#include "Maps/GridDefines.h" #include "Spells/Scripts/SpellScript.h" #include "Spells/SpellEffectDefines.h" #include "ulduar.h" @@ -1018,11 +1019,11 @@ struct ThorimsHammerLeviathan : public SpellScript // 62910 Mimiron's Inferno struct MimironsInfernoLeviathan : public SpellScript, public AuraScript { - bool OnAreaAuraCheckTarget(Aura* aura, Unit* target) const override + bool OnAreaAuraCheckTarget(DynamicObject* dynGo, Unit* target) const override { if (!target) return false; - Unit* caster = aura->GetCaster(); + Unit* caster = dynGo->GetCaster(); if (!caster) return false; if (caster->IsFriend(target)) diff --git a/src/game/Grids/GridNotifiersImpl.h b/src/game/Grids/GridNotifiersImpl.h index a09ed323fb9..19d6f9ec604 100644 --- a/src/game/Grids/GridNotifiersImpl.h +++ b/src/game/Grids/GridNotifiersImpl.h @@ -258,7 +258,8 @@ inline void MaNGOS::DynamicObjectUpdater::VisitHelper(Unit* target) } } - i_dynobject.OnAreaAuraCheckTarget(target); + if (!i_dynobject.OnAreaAuraCheckTarget(target)) + return; if (spellInfo->HasAttribute(SPELL_ATTR_EX3_ONLY_ON_PLAYER) && target->GetTypeId() != TYPEID_PLAYER) return; diff --git a/src/game/Spells/SpellAuras.cpp b/src/game/Spells/SpellAuras.cpp index 2796bd3ffe5..0731c2de48d 100755 --- a/src/game/Spells/SpellAuras.cpp +++ b/src/game/Spells/SpellAuras.cpp @@ -693,9 +693,6 @@ void AreaAura::Update(uint32 diff) for (auto& target : targets) { - AuraScript* auraScript = GetAuraScript(); - if (auraScript && !auraScript->OnAreaAuraCheckTarget(this, target)) - continue; // flag for selection is need apply aura to current iteration target bool apply = true;