fix(Scripts/Hyjal): remove summoned mobs on boss evade and reset waves (#18975)

init
This commit is contained in:
Dan
2024-05-29 23:57:34 +02:00
committed by GitHub
parent 0793a979bb
commit 9d672f8b62
2 changed files with 42 additions and 0 deletions

View File

@@ -32,6 +32,11 @@ enum Spells
SPELL_INFERNAL_IMMOLATION = 31304
};
enum Misc
{
NPC_TOWERING_INFERNAL = 17818
};
enum Texts
{
SAY_ONDEATH = 0,
@@ -54,6 +59,22 @@ public:
});
}
void EnterEvadeMode(EvadeReason why) override
{
std::list<Creature* > infernalList;
me->GetCreatureListWithEntryInGrid(infernalList, NPC_TOWERING_INFERNAL, 100.0f);
if (infernalList.size() > 0)
{
for (Creature* infernal : infernalList)
{
infernal->DespawnOrUnsummon();
}
}
infernalList.clear();
instance->SetData(DATA_RESET_ALLIANCE, 0);
me->DespawnOrUnsummon();
}
void JustEngagedWith(Unit * who) override
{
BossAI::JustEngagedWith(who);

View File

@@ -30,6 +30,11 @@ enum Spells
SPELL_BERSERK = 26662
};
enum Misc
{
NPC_LESSER_DOOMGUARD = 17864
};
enum Texts
{
SAY_ONDEATH = 0,
@@ -52,6 +57,22 @@ public:
});
}
void EnterEvadeMode(EvadeReason why) override
{
std::list<Creature* > doomguardList;
me->GetCreatureListWithEntryInGrid(doomguardList, NPC_LESSER_DOOMGUARD, 100.0f);
if (doomguardList.size() > 0)
{
for (Creature* doomguard : doomguardList)
{
doomguard->DespawnOrUnsummon();
}
}
doomguardList.clear();
instance->SetData(DATA_RESET_HORDE, 0);
me->DespawnOrUnsummon();
}
void JustEngagedWith(Unit * who) override
{
BossAI::JustEngagedWith(who);