diff options
| author | Vincent_Michael <Vincent_Michael@gmx.de> | 2014-01-19 20:52:16 +0100 |
|---|---|---|
| committer | Vincent_Michael <Vincent_Michael@gmx.de> | 2014-01-19 20:52:16 +0100 |
| commit | 7e527f9075b4b09a098d97939cda31bd617c56ff (patch) | |
| tree | b6c73f2a1e21d52732616d82589940779bd1ecff /src/server/scripts/Spells | |
| parent | 93a97a9922f8e22ae6e984068c994b08536a75b6 (diff) | |
| parent | 313b294d6b7b248738e30f8164ee4624a66ac5b5 (diff) | |
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts:
src/server/game/Accounts/RBAC.h
src/server/game/Entities/Player/Player.cpp
src/server/game/Entities/Unit/Unit.h
src/server/game/Server/Protocol/Opcodes.cpp
Diffstat (limited to 'src/server/scripts/Spells')
| -rw-r--r-- | src/server/scripts/Spells/spell_quest.cpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index 419a289aed4..4dd06b762a1 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -2241,6 +2241,47 @@ class spell_q12919_gymers_throw : public SpellScriptLoader } }; +enum Quest_The_Hunter_And_The_Prince +{ + SPELL_ILLIDAN_KILL_CREDIT = 61748 +}; + +class spell_q13400_illidan_kill_master : public SpellScriptLoader +{ + public: + spell_q13400_illidan_kill_master() : SpellScriptLoader("spell_q13400_illidan_kill_master") { } + + class spell_q13400_illidan_kill_master_SpellScript : public SpellScript + { + PrepareSpellScript(spell_q13400_illidan_kill_master_SpellScript); + + bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE + { + if (!sSpellMgr->GetSpellInfo(SPELL_ILLIDAN_KILL_CREDIT)) + return false; + return true; + } + + void HandleDummy(SpellEffIndex /*effIndex*/) + { + Unit* caster = GetCaster(); + if (caster->IsVehicle()) + if (Unit* passenger = caster->GetVehicleKit()->GetPassenger(0)) + passenger->CastSpell(passenger, SPELL_ILLIDAN_KILL_CREDIT, true); + } + + void Register() OVERRIDE + { + OnEffectHitTarget += SpellEffectFn(spell_q13400_illidan_kill_master_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + } + }; + + SpellScript* GetSpellScript() const OVERRIDE + { + return new spell_q13400_illidan_kill_master_SpellScript(); + } +}; + void AddSC_quest_spell_scripts() { new spell_q55_sacred_cleansing(); @@ -2295,4 +2336,5 @@ void AddSC_quest_spell_scripts() new spell_q12619_emblazon_runeblade_effect(); new spell_q12919_gymers_grab(); new spell_q12919_gymers_throw(); + new spell_q13400_illidan_kill_master(); } |
