diff options
author | ariel- <ariel-@users.noreply.github.com> | 2017-12-27 21:21:45 -0300 |
---|---|---|
committer | funjoker <funjoker109@gmail.com> | 2021-04-15 05:53:27 +0200 |
commit | 313b2ff526dda221b03c7b75bc4aaa3550f739f7 (patch) | |
tree | 40ffd06568a358fa263d8307e1ad1cd89c5a5cac /src | |
parent | 09d883361d42c4d5095bbda24a86cf3e1b0d1f8a (diff) |
Core/Scripts: remove Quel'Delar from player inventory during "The Halls Of Reflection" quests (24480, 24561)
(cherry picked from commit d13999c8d6a390914907d1d8343d72c06195bf10)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp index d7003359e44..14d655a692a 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp @@ -2842,6 +2842,30 @@ class spell_hor_gunship_cannon_fire : public SpellScriptLoader } }; +// 70698 - Quel'Delar's Will +class spell_hor_quel_delars_will : public SpellScript +{ + PrepareSpellScript(spell_hor_quel_delars_will); + + bool Validate(SpellInfo const* spellInfo) override + { + return ValidateSpellInfo({ spellInfo->GetEffect(EFFECT_0)->TriggerSpell }); + } + + void HandleReagent(SpellEffIndex effIndex) + { + PreventHitDefaultEffect(effIndex); + + // dummy spell consumes reagent, don't ignore it + GetHitUnit()->CastSpell(GetCaster(), GetSpellInfo()->GetEffect(effIndex)->TriggerSpell, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_POWER_AND_REAGENT_COST)); + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_hor_quel_delars_will::HandleReagent, EFFECT_0, SPELL_EFFECT_FORCE_CAST); + } +}; + void AddSC_halls_of_reflection() { new at_hor_intro_start(); @@ -2868,4 +2892,5 @@ void AddSC_halls_of_reflection() new spell_hor_start_halls_of_reflection_quest_ae(); new spell_hor_evasion(); new spell_hor_gunship_cannon_fire(); + RegisterSpellScript(spell_hor_quel_delars_will); } |