Scripts/Quests: Fix quest What Do You Feed a Yeti, Anyway? (14112,14145)

Closes #2975
This commit is contained in:
Nay
2011-10-22 13:18:17 +01:00
parent e5c0be0a29
commit 362b528bbb
2 changed files with 64 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_q14112_14145_chum_the_water';
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(66741,'spell_q14112_14145_chum_the_water');
-- Template updates for creature 35071 (North Sea Mako)
UPDATE `creature_template` SET `faction_A`=14,`faction_H`=14,`baseattacktime`=2000,`InhabitType`=`InhabitType`&~1 WHERE `entry` IN (35071,35060,35061); -- North Sea * (Last 2 entries guessed)
UPDATE `creature_template` SET `faction_A`=1885,`faction_H`=1885,`baseattacktime`=2000 WHERE `entry`=35072; -- Angry Kvaldir
-- Addon data for creature 35071 (North Sea Mako)
DELETE FROM `creature_template_addon` WHERE `entry` IN (35071,35072,35060,35061);
INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
(35071,0,0,1,0, NULL), -- North Sea Mako
(35060,0,0,1,0, NULL), -- North Sea Thresher - guessed
(35061,0,0,1,0, NULL), -- North Sea Blue Shark - guessed
(35072,0,0,1,0, NULL); -- Angry Kvaldir

View File

@@ -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();
}