mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-16 05:55:07 +00:00
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:
@@ -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);
|
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*/)
|
void HandleDummyEffect(SpellEffIndex /*effIndex*/)
|
||||||
{
|
{
|
||||||
if (Unit* target = GetHitUnit())
|
if (Unit* target = GetHitUnit())
|
||||||
@@ -1018,6 +1026,7 @@ class spell_brewfest_apple_trap : public SpellScript
|
|||||||
|
|
||||||
void Register() override
|
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);
|
OnEffectHitTarget += SpellEffectFn(spell_brewfest_apple_trap::HandleDummyEffect, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user