diff options
-rw-r--r-- | sql/updates/world/2015_03_15_15_world.sql | 13 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_quest.cpp | 31 |
2 files changed, 44 insertions, 0 deletions
diff --git a/sql/updates/world/2015_03_15_15_world.sql b/sql/updates/world/2015_03_15_15_world.sql new file mode 100644 index 00000000000..93083732c4d --- /dev/null +++ b/sql/updates/world/2015_03_15_15_world.sql @@ -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'); diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index 629630d0bef..fc0170f6f6f 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -2422,6 +2422,36 @@ class spell_q10929_fumping : SpellScriptLoader } }; +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(); @@ -2480,4 +2510,5 @@ void AddSC_quest_spell_scripts() new spell_q13400_illidan_kill_master(); new spell_q14100_q14111_make_player_destroy_totems(); new spell_q10929_fumping(); + new spell_q12414_hand_over_reins(); } |