aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNay <dnpd.dd@gmail.com>2011-10-22 13:18:17 +0100
committerNay <dnpd.dd@gmail.com>2011-10-22 13:18:17 +0100
commit362b528bbbec2a41604bc67af773d667a2c5044f (patch)
treef2137903f3890c66a291d4dc4f028647f0248a6e /src
parente5c0be0a29e13f9ee519c353a56ef8c785f063c5 (diff)
Scripts/Quests: Fix quest What Do You Feed a Yeti, Anyway? (14112,14145)
Closes #2975
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp51
1 files changed, 50 insertions, 1 deletions
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp
index 6ae9577070e..3b2cc5f5e00 100644
--- a/src/server/scripts/Spells/spell_quest.cpp
+++ b/src/server/scripts/Spells/spell_quest.cpp
@@ -899,7 +899,6 @@ class spell_q9874_liquid_fire : public SpellScriptLoader
};
};
-
enum SalvagingLifesStength
{
NPC_SHARD_KILL_CREDIT = 29303,
@@ -950,6 +949,7 @@ enum eBattleStandard
{
NPC_KING_OF_THE_MOUNTAINT_KC = 31766,
};
+
class spell_q13280_13283_plant_battle_standard: public SpellScriptLoader
{
public:
@@ -978,6 +978,54 @@ public:
}
};
+enum ChumTheWaterSummons
+{
+ SUMMON_ANGRY_KVALDIR = 66737,
+ SUMMON_NORTH_SEA_MAKO = 66738,
+ SUMMON_NORTH_SEA_THRESHER = 66739,
+ SUMMON_NORTH_SEA_BLUE_SHARK = 66740
+};
+
+class spell_q14112_14145_chum_the_water: public SpellScriptLoader
+{
+public:
+ spell_q14112_14145_chum_the_water() : SpellScriptLoader("spell_q14112_14145_chum_the_water") { }
+
+ class spell_q14112_14145_chum_the_water_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_q14112_14145_chum_the_water_SpellScript);
+
+ bool Validate(SpellInfo const* /*spellEntry*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SUMMON_ANGRY_KVALDIR))
+ return false;
+ if (!sSpellMgr->GetSpellInfo(SUMMON_NORTH_SEA_MAKO))
+ return false;
+ if (!sSpellMgr->GetSpellInfo(SUMMON_NORTH_SEA_THRESHER))
+ return false;
+ if (!sSpellMgr->GetSpellInfo(SUMMON_NORTH_SEA_BLUE_SHARK))
+ return false;
+ return true;
+ }
+
+ void HandleScriptEffect(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+ caster->CastSpell(caster, RAND(SUMMON_ANGRY_KVALDIR, SUMMON_NORTH_SEA_MAKO, SUMMON_NORTH_SEA_THRESHER, SUMMON_NORTH_SEA_BLUE_SHARK));
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_q14112_14145_chum_the_water_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_q14112_14145_chum_the_water_SpellScript();
+ }
+};
+
void AddSC_quest_spell_scripts()
{
new spell_q55_sacred_cleansing();
@@ -1001,4 +1049,5 @@ void AddSC_quest_spell_scripts()
new spell_q9874_liquid_fire();
new spell_q12805_lifeblood_dummy();
new spell_q13280_13283_plant_battle_standard();
+ new spell_q14112_14145_chum_the_water();
}