mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
Scripts/Spells: Hand of Reins - Questsupport for 'Mounting Up'
by @untaught closes #3977
(cherry picked from commit 588b92ee05)
This commit is contained in:
@@ -2495,6 +2495,36 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class spell_q12414_hand_over_reins : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_q12414_hand_over_reins() : SpellScriptLoader("spell_q12414_hand_over_reins") { }
|
||||
|
||||
class spell_q12414_hand_over_reins_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_q12414_hand_over_reins_SpellScript);
|
||||
|
||||
void HandleScript(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
Creature* caster = GetCaster()->ToCreature();
|
||||
GetHitUnit()->ExitVehicle();
|
||||
|
||||
if (caster)
|
||||
caster->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_q12414_hand_over_reins_SpellScript::HandleScript, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_q12414_hand_over_reins_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_quest_spell_scripts()
|
||||
{
|
||||
new spell_q55_sacred_cleansing();
|
||||
@@ -2555,4 +2585,5 @@ void AddSC_quest_spell_scripts()
|
||||
new spell_q10929_fumping();
|
||||
new spell_q28813_get_our_boys_back_dummy();
|
||||
new spell_q28813_set_health_random();
|
||||
new spell_q12414_hand_over_reins();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user