Skip to content

Commit

Permalink
Ulduar: Fix AreaAuraCheck for Leviathan
Browse files Browse the repository at this point in the history
  • Loading branch information
insunaa committed Jun 17, 2023
1 parent d36511d commit e3be7e4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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))
Expand Down
3 changes: 2 additions & 1 deletion src/game/Grids/GridNotifiersImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 0 additions & 3 deletions src/game/Spells/SpellAuras.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit e3be7e4

Please sign in to comment.