fix(Scripts/BlackTemple): Fix Fatal Attraction not being removed if t… (#20021)
fix(Scripts/BlackTemple): Fix Fatal Attraction not being removed if targets move apart
This commit is contained in:
parent
0858c8bbc0
commit
0e9fb5946b
1 changed files with 8 additions and 1 deletions
|
|
@ -235,7 +235,13 @@ class spell_mother_shahraz_fatal_attraction_dummy : public SpellScript
|
|||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_FATAL_ATTRACTION_DAMAGE });
|
||||
return ValidateSpellInfo({ SPELL_FATAL_ATTRACTION_DAMAGE, SPELL_FATAL_ATTRACTION_AURA });
|
||||
}
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
if (targets.empty())
|
||||
GetCaster()->RemoveAurasDueToSpell(SPELL_FATAL_ATTRACTION_AURA);
|
||||
}
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
|
|
@ -255,6 +261,7 @@ class spell_mother_shahraz_fatal_attraction_dummy : public SpellScript
|
|||
|
||||
void Register() override
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_mother_shahraz_fatal_attraction_dummy::FilterTargets, EFFECT_ALL, TARGET_UNIT_SRC_AREA_ALLY);
|
||||
OnEffectHitTarget += SpellEffectFn(spell_mother_shahraz_fatal_attraction_dummy::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue