mirror of
https://github.com/azerothcore/azerothcore-wotlk.git
synced 2025-11-10 12:24:22 +08:00
m_Events to Events
This commit is contained in:
parent
5e2dd4bf41
commit
12c56e2a3b
@ -121,7 +121,6 @@ class EventProcessor
|
||||
[[nodiscard]] uint64 CalculateQueueTime(uint64 delay) const;
|
||||
|
||||
void CancelEventGroup(uint8 group);
|
||||
|
||||
bool HaveEventList() const { return !m_events.empty(); }
|
||||
|
||||
protected:
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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());
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user