Skip to content

Commit

Permalink
SlavePens/Midsummer: Despawn ahune spawns on evade and death
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife committed May 18, 2022
1 parent 4abd99f commit 9ef0092
Showing 1 changed file with 11 additions and 0 deletions.
Expand Up @@ -99,6 +99,8 @@ struct boss_ahuneAI : public Scripted_NoMovementAI

ObjectGuid m_frozenCoreGuid;

GuidVector m_spawns;

void Reset() override
{
m_uiPhase = PHASE_GROUND;
Expand All @@ -121,9 +123,16 @@ struct boss_ahuneAI : public Scripted_NoMovementAI
{
DoCastSpellIfCan(m_creature, SPELL_AHUNE_DIES_ACHIEV, CAST_TRIGGERED);
DoCastSpellIfCan(m_creature, m_creature->GetMap()->IsRegularDifficulty() ? SPELL_AHUNE_LOOT : SPELL_AHUNE_LOOT_H, CAST_TRIGGERED);
DespawnGuids(m_spawns);
m_creature->GetMap()->AwardLFGRewards(SEASONAL_AHUNE);
}

void EnterEvadeMode() override
{
Scripted_NoMovementAI::EnterEvadeMode();
DespawnGuids(m_spawns);
}

void JustReachedHome() override
{
// Cleanup on evade is done by creature_linking
Expand Down Expand Up @@ -165,6 +174,8 @@ struct boss_ahuneAI : public Scripted_NoMovementAI
m_frozenCoreGuid = pSummoned->GetObjectGuid();
break;
}

m_spawns.push_back(pSummoned->GetObjectGuid());
}

void SummonedCreatureJustDied(Creature* pSummoned) override
Expand Down

0 comments on commit 9ef0092

Please sign in to comment.