fix(Scripts/SlavePens): Add Chilling Aura to Ahune adds (#16623)

This commit is contained in:
Skjalf
2023-06-25 11:31:25 -03:00
committed by GitHub
parent 43f46dc5eb
commit d172b3a7e2

View File

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