fix(Scripts/Spells): Apple Trap should not activate without the playe… (#13868)
fix(Scripts/Spells): Apple Trap should not activate without the player being on a Rental Ram. Fixes #13186
This commit is contained in:
parent
975fd8782f
commit
e2bf207ae4
2 changed files with 11 additions and 0 deletions
|
|
@ -0,0 +1,2 @@
|
|||
--
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=43450;
|
||||
|
|
@ -1009,6 +1009,14 @@ class spell_brewfest_apple_trap : public SpellScript
|
|||
{
|
||||
PrepareSpellScript(spell_brewfest_apple_trap);
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
targets.remove_if(Acore::UnitAuraCheck(false, SPELL_RAM_FATIGUE));
|
||||
|
||||
if (targets.empty())
|
||||
FinishCast(SPELL_FAILED_CASTER_AURASTATE);
|
||||
}
|
||||
|
||||
void HandleDummyEffect(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Unit* target = GetHitUnit())
|
||||
|
|
@ -1018,6 +1026,7 @@ class spell_brewfest_apple_trap : public SpellScript
|
|||
|
||||
void Register() override
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_brewfest_apple_trap::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
|
||||
OnEffectHitTarget += SpellEffectFn(spell_brewfest_apple_trap::HandleDummyEffect, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue