mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-03 02:53:48 +00:00
feat(Core/Time): Implement saparated manager for game time (#8630)
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "CalendarMgr.h"
|
||||
#include "GameTime.h"
|
||||
#include "GuildMgr.h"
|
||||
#include "Log.h"
|
||||
#include "ObjectAccessor.h"
|
||||
@@ -24,6 +25,9 @@
|
||||
#include "QueryResult.h"
|
||||
#include <unordered_map>
|
||||
|
||||
CalendarInvite::CalendarInvite() : _inviteId(1), _eventId(0), _statusTime(GameTime::GetGameTime().count()),
|
||||
_status(CALENDAR_STATUS_INVITED), _rank(CALENDAR_RANK_PLAYER), _text("") { }
|
||||
|
||||
CalendarInvite::~CalendarInvite()
|
||||
{
|
||||
// Free _inviteId only if it's a real invite and not just a pre-invite or guild announcement
|
||||
@@ -358,7 +362,7 @@ uint64 CalendarMgr::GetFreeInviteId()
|
||||
|
||||
void CalendarMgr::DeleteOldEvents()
|
||||
{
|
||||
time_t oldEventsTime = time(nullptr) - CALENDAR_OLD_EVENTS_DELETION_TIME;
|
||||
time_t oldEventsTime = GameTime::GetGameTime().count() - CALENDAR_OLD_EVENTS_DELETION_TIME;
|
||||
|
||||
for (CalendarEventStore::const_iterator itr = _events.begin(); itr != _events.end();)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user