feat(Core/Time): Implement saparated manager for game time (#8630)

This commit is contained in:
Kargatum
2022-01-24 17:55:00 +07:00
committed by GitHub
parent 12da792a90
commit 8b7df23f06
129 changed files with 1147 additions and 817 deletions

View File

@@ -821,14 +821,7 @@ public:
[[nodiscard]] uint32 GetSpellId() const { return m_spellId;}
[[nodiscard]] time_t GetRespawnTime() const { return m_respawnTime; }
[[nodiscard]] time_t GetRespawnTimeEx() const
{
time_t now = time(nullptr);
if (m_respawnTime > now)
return m_respawnTime;
else
return now;
}
[[nodiscard]] time_t GetRespawnTimeEx() const;
void SetRespawnTime(int32 respawn);
void SetRespawnDelay(int32 respawn);
@@ -895,7 +888,7 @@ public:
[[nodiscard]] bool HasLootRecipient() const { return m_lootRecipient || m_lootRecipientGroup; }
uint32 m_groupLootTimer; // (msecs)timer used for group loot
uint32 lootingGroupLowGUID; // used to find group which is looting
void SetLootGenerationTime() { m_lootGenerationTime = time(nullptr); }
void SetLootGenerationTime();
[[nodiscard]] uint32 GetLootGenerationTime() const { return m_lootGenerationTime; }
[[nodiscard]] GameObject* GetLinkedTrap();