mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
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:
@@ -235,7 +235,13 @@ class spell_mother_shahraz_fatal_attraction_dummy : public SpellScript
|
|||||||
|
|
||||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
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*/)
|
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||||
@@ -255,6 +261,7 @@ class spell_mother_shahraz_fatal_attraction_dummy : public SpellScript
|
|||||||
|
|
||||||
void Register() override
|
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);
|
OnEffectHitTarget += SpellEffectFn(spell_mother_shahraz_fatal_attraction_dummy::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user