From 1fc122e5c6a5e009997326817cd52e49efce4c96 Mon Sep 17 00:00:00 2001 From: w1sht0l1v3 Date: Wed, 22 Feb 2012 22:38:16 +0000 Subject: DB/Quests: Mounting Hodir's Helm. DB/Quests: Quest relations for Polishing the Helm. Closes #5231 --- src/server/scripts/Spells/spell_quest.cpp | 37 +++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'src/server/scripts') diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index 6de1ffa8376..09c34e3499d 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -1071,6 +1071,42 @@ class spell_q9452_cast_net: public SpellScriptLoader } }; +#define SAY_1 "Sons of Hodir! I humbly present to you..." +#define SAY_2 "The Helm of Hodir!" +#define NPC_KILLCREDIT 30210 // Hodir's Helm KC Bunny + +class spell_q12987_read_pronouncement : public SpellScriptLoader +{ +public: + spell_q12987_read_pronouncement() : SpellScriptLoader("spell_q12987_read_pronouncement") { } + + class spell_q12987_read_pronouncement_AuraScript : public AuraScript + { + PrepareAuraScript(spell_q12987_read_pronouncement_AuraScript); + + void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + // player must cast kill credit and do emote text, according to sniff + if (Player* target = GetTarget()->ToPlayer()) + { + target->MonsterWhisper(SAY_1, target->GetGUID(), true); + target->KilledMonsterCredit(NPC_KILLCREDIT, 0); + target->MonsterWhisper(SAY_2, target->GetGUID(), true); + } + } + + void Register() + { + AfterEffectApply += AuraEffectApplyFn(spell_q12987_read_pronouncement_AuraScript::OnApply, EFFECT_0, SPELL_AURA_NONE, AURA_EFFECT_HANDLE_REAL); + } + }; + + AuraScript* GetAuraScript() const + { + return new spell_q12987_read_pronouncement_AuraScript(); + } +}; + void AddSC_quest_spell_scripts() { new spell_q55_sacred_cleansing(); @@ -1096,4 +1132,5 @@ void AddSC_quest_spell_scripts() new spell_q13280_13283_plant_battle_standard(); new spell_q14112_14145_chum_the_water(); new spell_q9452_cast_net(); + new spell_q12987_read_pronouncement(); } -- cgit v1.2.3