m_Events to Events

This commit is contained in:
天鹭 2025-10-17 13:15:59 +08:00
parent 5e2dd4bf41
commit 12c56e2a3b
3 changed files with 5 additions and 6 deletions

View File

@ -121,7 +121,6 @@ class EventProcessor
[[nodiscard]] uint64 CalculateQueueTime(uint64 delay) const;
void CancelEventGroup(uint8 group);
bool HaveEventList() const { return !m_events.empty(); }
protected:

View File

@ -56,7 +56,7 @@ Map::~Map()
// Kill all scheduled events without executing them, since the map and its objects are being destroyed.
// This prevents events from running on invalid or deleted objects during map destruction.
m_Events.KillAllEvents(false);
Events.KillAllEvents(false);
sScriptMgr->OnDestroyMap(this);
@ -451,7 +451,7 @@ void Map::Update(const uint32 t_diff, const uint32 s_diff, bool /*thread*/)
}
}
m_Events.Update(t_diff);
Events.Update(t_diff);
if (!t_diff)
{
@ -2762,7 +2762,7 @@ void Map::RemoveOldCorpses()
void Map::ScheduleCreatureRespawn(ObjectGuid creatureGuid, Milliseconds respawnTimer, Position pos)
{
m_Events.AddEventAtOffset([this, creatureGuid, pos]()
Events.AddEventAtOffset([this, creatureGuid, pos]()
{
if (Creature* creature = GetCreature(creatureGuid))
creature->Respawn();

View File

@ -172,7 +172,7 @@ public:
// currently unused for normal maps
bool CanUnload(uint32 diff)
{
if (!m_unloadTimer || m_Events.HaveEventList())
if (!m_unloadTimer || Events.HaveEventList())
return false;
if (m_unloadTimer <= diff)
@ -430,7 +430,7 @@ public:
void UpdatePlayerZoneStats(uint32 oldZone, uint32 newZone);
[[nodiscard]] uint32 ApplyDynamicModeRespawnScaling(WorldObject const* obj, uint32 respawnDelay) const;
EventProcessor m_Events;
EventProcessor Events;
void ScheduleCreatureRespawn(ObjectGuid /*creatureGuid*/, Milliseconds /*respawnTimer*/, Position pos = Position());