Skip to content

Commit

Permalink
Spell: Allow spell_script_target for any SPELL_EFFECT_PERSISTENT_AREA…
Browse files Browse the repository at this point in the history
…_AURA
  • Loading branch information
killerwife committed Jul 27, 2024
1 parent f3f0df5 commit b950db4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/game/Spells/SpellMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1996,6 +1996,12 @@ void SpellMgr::LoadSpellScriptTarget()
bool targetfound = false;
for (int i = 0; i < MAX_EFFECT_INDEX; ++i)
{
if (spellProto->Effect[i] == SPELL_EFFECT_PERSISTENT_AREA_AURA) // always scriptable
{
targetfound = true;
break;
}

if (spellProto->EffectImplicitTargetA[i] == TARGET_UNIT_SCRIPT_NEAR_CASTER ||
spellProto->EffectImplicitTargetB[i] == TARGET_UNIT_SCRIPT_NEAR_CASTER ||
spellProto->EffectImplicitTargetA[i] == TARGET_LOCATION_SCRIPT_NEAR_CASTER ||
Expand Down

2 comments on commit b950db4

@insunaa
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this means we have to nullptr check targets, right?

@killerwife
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope. This just means spell_script_target table will work for it

Please sign in to comment.