From d172b3a7e284b7660c9679518c6cb021f0a4783d Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Sun, 25 Jun 2023 11:31:25 -0300 Subject: [PATCH] fix(Scripts/SlavePens): Add Chilling Aura to Ahune adds (#16623) --- .../SlavePens/boss_ahune.cpp | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp index cf4652555..a95fd9f02 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp @@ -55,6 +55,8 @@ enum EventSpells SPELL_SUMMON_COLDWAVE = 45952, SPELL_SUMMON_FROSTWIND = 45953, + SPELL_CHILLING_AURA = 46542, + /* SPELL_SUMMON_ICE_SPEAR_BUNNY= 46359, // any dest SPELL_ICE_SPEAR_KNOCKBACK = 46360, // src caster @@ -63,6 +65,11 @@ enum EventSpells */ }; +enum CreatureIds +{ + NPC_AHUNITE_HAILSTONE = 25755 +}; + enum eEvents { EVENT_EMERGE = 1, @@ -244,7 +251,7 @@ struct boss_ahune : public ScriptedAI float angle = rand_norm() * 2 * M_PI; me->CastSpell(MinionSummonPos.GetPositionX() + cos(angle) * dist, MinionSummonPos.GetPositionY() + std::sin(angle) * dist, MinionSummonPos.GetPositionZ(), SPELL_SUMMON_FROSTWIND, false); } - events.RepeatEvent(6000); + events.RepeatEvent(12000); break; default: @@ -268,10 +275,17 @@ struct boss_ahune : public ScriptedAI void JustSummoned(Creature* summon) override { - if (summon) + summons.Summon(summon); + summon->SetInCombatWithZone(); + + if (summon->GetEntry() == NPC_AHUNITE_HAILSTONE) { - summons.Summon(summon); - summon->SetInCombatWithZone(); + // Doesn't work when cast normally or when added to + // creature template addon. Needs further investigation. + if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(SPELL_CHILLING_AURA)) + { + Aura::TryRefreshStackOrCreate(spellInfo, MAX_EFFECT_MASK, summon, summon); + } } }