mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 22:26:22 +00:00
fix(Scripts/StormPeaks): Script Ample Inspiration quest meat spawner … (#23819)
This commit is contained in:
@@ -1166,6 +1166,43 @@ class spell_feed_stormcrest_eagle : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
enum MammothExplosion
|
||||
{
|
||||
SPELL_MAMMOTH_EXPL_1 = 54627,
|
||||
SPELL_MAMMOTH_EXPL_2 = 54628,
|
||||
SPELL_MAMMOTH_EXPL_3 = 54623,
|
||||
SPELL_MAIN_MAMMOTH_MEAT = 57444
|
||||
};
|
||||
|
||||
// 54581 - Mammoth Explosion Spell Spawner
|
||||
class spell_mammoth_explosion : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_mammoth_explosion);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_MAMMOTH_EXPL_1, SPELL_MAMMOTH_EXPL_2, SPELL_MAMMOTH_EXPL_3, SPELL_MAIN_MAMMOTH_MEAT });
|
||||
}
|
||||
|
||||
void HandleOnEffectHit(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Unit* target = GetHitUnit())
|
||||
{
|
||||
for (uint32 spellId : { SPELL_MAMMOTH_EXPL_1, SPELL_MAMMOTH_EXPL_2, SPELL_MAMMOTH_EXPL_3 })
|
||||
target->CastSpell(GetHitUnit(), spellId, true);
|
||||
|
||||
target->CastSpell(GetHitUnit(), SPELL_MAIN_MAMMOTH_MEAT, true);
|
||||
|
||||
target->SetVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_mammoth_explosion::HandleOnEffectHit, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_storm_peaks()
|
||||
{
|
||||
RegisterCreatureAI(npc_frosthound);
|
||||
@@ -1183,4 +1220,5 @@ void AddSC_storm_peaks()
|
||||
new npc_vehicle_d16_propelled_delivery();
|
||||
RegisterSpellScript(spell_q12823_remove_collapsing_cave_aura);
|
||||
RegisterSpellScript(spell_feed_stormcrest_eagle);
|
||||
RegisterSpellScript(spell_mammoth_explosion);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user