Scripts/Spells: Hand of Reins - Questsupport for 'Mounting Up'

by @untaught closes #3977

(cherry picked from commit 588b92ee05)
This commit is contained in:
Rushor
2015-03-15 23:27:30 +01:00
committed by MitchesD
parent a30eb73e46
commit 2c6500a231
2 changed files with 44 additions and 0 deletions

View File

@@ -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();
}