aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorw1sht0l1v3 <w1sht0l1v3@gmail.com>2012-02-22 22:38:16 +0000
committerNay <dnpd.dd@gmail.com>2012-02-22 22:38:16 +0000
commit1fc122e5c6a5e009997326817cd52e49efce4c96 (patch)
treeb8b0064be1686c9f1bb18822764277ead0927813 /src
parentdc91fc10503d357234aa62503b68936d8cb4cb42 (diff)
DB/Quests: Mounting Hodir's Helm.
DB/Quests: Quest relations for Polishing the Helm. Closes #5231
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp37
1 files changed, 37 insertions, 0 deletions
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();
}