aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorw1sht0l1v3 <w1sht0l1v3@gmail.com>2014-01-19 00:30:25 +0200
committerw1sht0l1v3 <w1sht0l1v3@gmail.com>2014-01-19 00:30:25 +0200
commit8367944171d27d3563823e19c5488b6b0f9516c8 (patch)
tree3b24e570d6c7bebe87fde8c5e4dc73f75f0647d7 /src
parent68af9376f642dd2e4ff82678928288e9c09f68ca (diff)
Core/Scripts: Fix kill credit for quest The Hunter and the Prince(13400).
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp42
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();
}