refactor(Core): DespawnOrUnsummon (#23141)

This commit is contained in:
天鹭
2025-10-13 14:36:23 +08:00
committed by GitHub
parent 8e2e30328f
commit 53238a68d3
148 changed files with 363 additions and 366 deletions

View File

@@ -697,7 +697,7 @@ struct npc_hallows_end_soh : public ScriptedAI
void EnterEvadeMode(EvadeReason /* why */) override
{
me->DespawnOrUnsummon(1);
me->DespawnOrUnsummon(1ms);
}
uint32 GetData(uint32 /*type*/) const override
@@ -848,7 +848,7 @@ struct npc_hallows_end_soh : public ScriptedAI
if (Unit* c = ObjectAccessor::GetUnit(*me, guid))
c->RemoveAllAuras();
me->DespawnOrUnsummon(1);
me->DespawnOrUnsummon(1ms);
}
else
{
@@ -1029,7 +1029,7 @@ struct boss_headless_horseman : public ScriptedAI
std::list<Creature*> unitList;
me->GetCreaturesWithEntryInRange(unitList, 100.0f, NPC_PUMPKIN_FIEND);
for (std::list<Creature*>::iterator itr = unitList.begin(); itr != unitList.end(); ++itr)
(*itr)->ToCreature()->DespawnOrUnsummon(500);
(*itr)->ToCreature()->DespawnOrUnsummon(500ms);
Map::PlayerList const& players = me->GetMap()->GetPlayers();
if (!players.IsEmpty() && players.begin()->GetSource() && players.begin()->GetSource()->GetGroup())