mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
Scripts/Quests: Fix quest What Do You Feed a Yeti, Anyway? (14112,14145)
Closes #2975
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user