Scripts/Quest: Update 'What Do You Feed a Yeti, Anyway?' (#27851)

(cherry picked from commit fbfb8da7fc89d8a595ec70969a54732372dc39d0)
This commit is contained in:
offl
2022-03-26 15:49:11 +01:00
committed by Shauren
parent b105dc4c8f
commit 04c7e91097
3 changed files with 53 additions and 31 deletions
@@ -0,0 +1,10 @@
--
UPDATE `creature_template` SET `unit_flags` = 32768, `AIName` = 'SmartAI' WHERE `entry` IN (35060,35061,35071,35072);
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (35060,35061,35071,35072) AND `source_type` = 0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_param4`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(35060,0,0,0,11,0,100,0,0,0,0,0,0,49,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,"North Sea Thresher - On Spawn - Start Attack Summoner"),
(35061,0,0,0,11,0,100,0,0,0,0,0,0,49,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,"North Sea Blue Shark - On Spawn - Start Attack Summoner"),
(35071,0,0,0,11,0,100,0,0,0,0,0,0,49,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,"North Sea Mako - On Spawn - Start Attack Summoner"),
(35072,0,0,0,11,0,100,0,0,0,0,0,0,49,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,"Angry Kvaldir - On Spawn - Start Attack Summoner"),
(35072,0,1,0,0,0,100,0,0,0,15000,15000,0,11,49922,0,0,0,0,0,2,0,0,0,0,0,0,0,0,"Angry Kvaldir - In Combat - Cast 'Wave Crash'");
@@ -858,6 +858,48 @@ class spell_q14076_14092_pound_drum : public SpellScript
}
};
/*######
## Quest 14112 & 14145: What Do You Feed a Yeti, Anyway?
######*/
enum ChumTheWaterSummons
{
SPELL_SUMMON_ANGRY_KVALDIR = 66737,
SPELL_SUMMON_NORTH_SEA_MAKO = 66738,
SPELL_SUMMON_NORTH_SEA_THRESHER = 66739,
SPELL_SUMMON_NORTH_SEA_BLUE_SHARK = 66740
};
std::array<uint32, 4> const ChumTheWaterSummonSpells =
{
SPELL_SUMMON_ANGRY_KVALDIR,
SPELL_SUMMON_NORTH_SEA_MAKO,
SPELL_SUMMON_NORTH_SEA_THRESHER,
SPELL_SUMMON_NORTH_SEA_BLUE_SHARK
};
// 66741 - Chum the Water
class spell_q14112_14145_chum_the_water : public SpellScript
{
PrepareSpellScript(spell_q14112_14145_chum_the_water);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo(ChumTheWaterSummonSpells);
}
void HandleScript(SpellEffIndex /*effIndex*/)
{
Unit* caster = GetCaster();
caster->CastSpell(caster, Trinity::Containers::SelectRandomContainerElement(ChumTheWaterSummonSpells));
}
void Register() override
{
OnEffectHit += SpellEffectFn(spell_q14112_14145_chum_the_water::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
void AddSC_icecrown()
{
new npc_argent_valiant;
@@ -868,4 +910,5 @@ void AddSC_icecrown()
RegisterSpellScript(spell_the_ocular_on_death);
RegisterSpellScript(spell_summon_tualiq_proxy);
RegisterSpellScript(spell_q14076_14092_pound_drum);
RegisterSpellScript(spell_q14112_14145_chum_the_water);
}
-31
View File
@@ -779,36 +779,6 @@ class spell_q13280_13283_jump_jets : public SpellScript
}
};
enum ChumTheWaterSummons
{
SUMMON_ANGRY_KVALDIR = 66737,
SUMMON_NORTH_SEA_MAKO = 66738,
SUMMON_NORTH_SEA_THRESHER = 66739,
SUMMON_NORTH_SEA_BLUE_SHARK = 66740
};
// 66741 - Chum the Water
class spell_q14112_14145_chum_the_water : public SpellScript
{
PrepareSpellScript(spell_q14112_14145_chum_the_water);
bool Validate(SpellInfo const* /*spellEntry*/) override
{
return ValidateSpellInfo({ SUMMON_ANGRY_KVALDIR, SUMMON_NORTH_SEA_MAKO, SUMMON_NORTH_SEA_THRESHER, SUMMON_NORTH_SEA_BLUE_SHARK });
}
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() override
{
OnEffectHitTarget += SpellEffectFn(spell_q14112_14145_chum_the_water::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
enum RedSnapperVeryTasty
{
SPELL_FISHED_UP_RED_SNAPPER = 29867,
@@ -2223,7 +2193,6 @@ void AddSC_quest_spell_scripts()
RegisterSpellScript(spell_q12805_lifeblood_dummy);
RegisterSpellScript(spell_q13280_13283_plant_battle_standard);
RegisterSpellScript(spell_q13280_13283_jump_jets);
RegisterSpellScript(spell_q14112_14145_chum_the_water);
RegisterSpellScript(spell_q9452_cast_net);
RegisterSpellScript(spell_q12066_bunny_kill_credit);
RegisterSpellScript(spell_q12372_cast_from_gossip_trigger);