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

@@ -0,0 +1,13 @@
--
UPDATE `creature_template` SET `spell1`=49285,`spell2`=29577,`flags_extra`=2,`ainame`='SmartAI' WHERE `entry`=26472;
DELETE FROM `smart_scripts` WHERE `entryorguid`=26472 AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(26472,0,0,0,8,0,100,0,49266,0,0,0,69,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'Highland Mustang - On Spell Hit(Dangle Wild Carrot) - Move To Player'),
(26472,0,1,2,34,0,100,0,0,1,0,0,103,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Highland Mustang - On Movement Inform - Set Root'),
(26472,0,2,0,61,0,100,0,0,0,0,0,85,49282,0,0,0,0,0,1,0,0,0,0,0,0,0,'Highland Mustang - Link With Previous - Invoker Cast Ride Highland Mustang'),
(26472,0,3,0,27,0,100,0,0,0,0,0,103,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Highland Mustang - On Passenger Boarded - Remove Root');
DELETE FROM `spell_script_names` WHERE `spell_id`=49285;
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(49285,'spell_q12414_hand_over_reins');

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