diff options
author | Shauren <shauren.trinity@gmail.com> | 2020-08-14 17:06:03 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2020-08-14 17:06:03 +0200 |
commit | 1c52d5fff738aa01bd27fd117076ac33515acef5 (patch) | |
tree | ff7d2113e023a0fd47fbdde8ea94c0fe4bb9a804 /src/server/game/Handlers/CalendarHandler.cpp | |
parent | 02fd3a1f15840203d8515dae12920d9b66655076 (diff) |
Core/Misc: Replace NULL with nullptr
Diffstat (limited to 'src/server/game/Handlers/CalendarHandler.cpp')
-rw-r--r-- | src/server/game/Handlers/CalendarHandler.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/server/game/Handlers/CalendarHandler.cpp b/src/server/game/Handlers/CalendarHandler.cpp index ffa66c9daea..0470e6f77e2 100644 --- a/src/server/game/Handlers/CalendarHandler.cpp +++ b/src/server/game/Handlers/CalendarHandler.cpp @@ -54,7 +54,7 @@ Copied events should probably have a new owner void WorldSession::HandleCalendarGetCalendar(WorldPackets::Calendar::CalendarGetCalendar& /*calendarGetCalendar*/) { ObjectGuid guid = _player->GetGUID(); - time_t currTime = time(NULL); + time_t currTime = time(nullptr); WorldPackets::Calendar::CalendarSendCalendar packet; packet.ServerTime = currTime; @@ -136,7 +136,7 @@ void WorldSession::HandleCalendarAddEvent(WorldPackets::Calendar::CalendarAddEve // prevent events in the past // To Do: properly handle timezones and remove the "- time_t(86400L)" hack - if (calendarAddEvent.EventInfo.Time < (time(NULL) - time_t(86400L))) + if (calendarAddEvent.EventInfo.Time < (time(nullptr) - time_t(86400L))) return; CalendarEvent* calendarEvent = new CalendarEvent(sCalendarMgr->GetFreeEventId(), guid, UI64LIT(0), CalendarEventType(calendarAddEvent.EventInfo.EventType), calendarAddEvent.EventInfo.TextureID, @@ -181,7 +181,7 @@ void WorldSession::HandleCalendarUpdateEvent(WorldPackets::Calendar::CalendarUpd // prevent events in the past // To Do: properly handle timezones and remove the "- time_t(86400L)" hack - if (calendarUpdateEvent.EventInfo.Time < (time(NULL) - time_t(86400L))) + if (calendarUpdateEvent.EventInfo.Time < (time(nullptr) - time_t(86400L))) return; if (CalendarEvent* calendarEvent = sCalendarMgr->GetEvent(calendarUpdateEvent.EventInfo.EventID)) @@ -214,7 +214,7 @@ void WorldSession::HandleCalendarCopyEvent(WorldPackets::Calendar::CalendarCopyE // prevent events in the past // To Do: properly handle timezones and remove the "- time_t(86400L)" hack - if (calendarCopyEvent.Date < (time(NULL) - time_t(86400L))) + if (calendarCopyEvent.Date < (time(nullptr) - time_t(86400L))) return; if (CalendarEvent* oldEvent = sCalendarMgr->GetEvent(calendarCopyEvent.EventID)) @@ -339,7 +339,7 @@ void WorldSession::HandleCalendarEventSignup(WorldPackets::Calendar::CalendarEve } CalendarInviteStatus status = calendarEventSignUp.Tentative ? CALENDAR_STATUS_TENTATIVE : CALENDAR_STATUS_SIGNED_UP; - CalendarInvite* invite = new CalendarInvite(sCalendarMgr->GetFreeInviteId(), calendarEventSignUp.EventID, guid, guid, time(NULL), status, CALENDAR_RANK_PLAYER, ""); + CalendarInvite* invite = new CalendarInvite(sCalendarMgr->GetFreeInviteId(), calendarEventSignUp.EventID, guid, guid, time(nullptr), status, CALENDAR_RANK_PLAYER, ""); sCalendarMgr->AddInvite(calendarEvent, invite); sCalendarMgr->SendCalendarClearPendingAction(guid); } @@ -363,7 +363,7 @@ void WorldSession::HandleCalendarEventRsvp(WorldPackets::Calendar::CalendarEvent if (CalendarInvite* invite = sCalendarMgr->GetInvite(calendarEventRSVP.InviteID)) { invite->SetStatus(CalendarInviteStatus(calendarEventRSVP.Status)); - invite->SetResponseTime(time(NULL)); + invite->SetResponseTime(time(nullptr)); sCalendarMgr->UpdateInvite(invite); sCalendarMgr->SendCalendarEventStatus(*calendarEvent, *invite); @@ -500,7 +500,7 @@ void WorldSession::HandleSetSavedInstanceExtend(WorldPackets::Calendar::SetSaved void WorldSession::SendCalendarRaidLockout(InstanceSave const* save, bool add) { - time_t currTime = time(NULL); + time_t currTime = time(nullptr); if (add) { WorldPackets::Calendar::CalendarRaidLockoutAdded calendarRaidLockoutAdded; @@ -529,7 +529,7 @@ void WorldSession::SendCalendarRaidLockoutUpdated(InstanceSave const* save) ObjectGuid guid = _player->GetGUID(); TC_LOG_DEBUG("network", "SMSG_CALENDAR_RAID_LOCKOUT_UPDATED [%s] Map: %u, Difficulty %u", guid.ToString().c_str(), save->GetMapId(), save->GetDifficultyID()); - time_t currTime = time(NULL); + time_t currTime = time(nullptr); WorldPackets::Calendar::CalendarRaidLockoutUpdated packet; packet.DifficultyID = save->GetDifficultyID(); |