aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/CalendarHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Handlers/CalendarHandler.cpp')
-rw-r--r--src/server/game/Handlers/CalendarHandler.cpp62
1 files changed, 29 insertions, 33 deletions
diff --git a/src/server/game/Handlers/CalendarHandler.cpp b/src/server/game/Handlers/CalendarHandler.cpp
index e2e48253504..7044f8c0fb5 100644
--- a/src/server/game/Handlers/CalendarHandler.cpp
+++ b/src/server/game/Handlers/CalendarHandler.cpp
@@ -56,7 +56,7 @@ Copied events should probably have a new owner
void WorldSession::HandleCalendarGetCalendar(WorldPacket& /*recvData*/)
{
ObjectGuid guid = _player->GetGUID();
- TC_LOG_DEBUG("network", "CMSG_CALENDAR_GET_CALENDAR [%s]", guid.ToString().c_str());
+ TC_LOG_DEBUG("network", "CMSG_CALENDAR_GET_CALENDAR [{}]", guid.ToString());
time_t currTime = GameTime::GetGameTime();
@@ -183,7 +183,7 @@ void WorldSession::HandleCalendarGetEvent(WorldPacket& recvData)
uint64 eventId;
recvData >> eventId;
- TC_LOG_DEBUG("network", "CMSG_CALENDAR_GET_EVENT. Player [%s] Event [" UI64FMTD "]", _player->GetGUID().ToString().c_str(), eventId);
+ TC_LOG_DEBUG("network", "CMSG_CALENDAR_GET_EVENT. Player [{}] Event [{}]", _player->GetGUID().ToString(), eventId);
if (CalendarEvent* calendarEvent = sCalendarMgr->GetEvent(eventId))
sCalendarMgr->SendCalendarEvent(_player->GetGUID(), *calendarEvent, CALENDAR_SENDTYPE_GET);
@@ -193,7 +193,7 @@ void WorldSession::HandleCalendarGetEvent(WorldPacket& recvData)
void WorldSession::HandleCalendarGuildFilter(WorldPacket& recvData)
{
- TC_LOG_DEBUG("network", "CMSG_CALENDAR_GUILD_FILTER [%s]", _player->GetGUID().ToString().c_str());
+ TC_LOG_DEBUG("network", "CMSG_CALENDAR_GUILD_FILTER [{}]", _player->GetGUID().ToString());
uint32 minLevel;
uint32 maxLevel;
@@ -204,12 +204,12 @@ void WorldSession::HandleCalendarGuildFilter(WorldPacket& recvData)
if (Guild* guild = sGuildMgr->GetGuildById(_player->GetGuildId()))
guild->MassInviteToEvent(this, minLevel, maxLevel, minRank);
- TC_LOG_DEBUG("network", "CMSG_CALENDAR_GUILD_FILTER: Min level [%d], Max level [%d], Min rank [%d]", minLevel, maxLevel, minRank);
+ TC_LOG_DEBUG("network", "CMSG_CALENDAR_GUILD_FILTER: Min level [{}], Max level [{}], Min rank [{}]", minLevel, maxLevel, minRank);
}
void WorldSession::HandleCalendarArenaTeam(WorldPacket& recvData)
{
- TC_LOG_DEBUG("network", "CMSG_CALENDAR_ARENA_TEAM [%s]", _player->GetGUID().ToString().c_str());
+ TC_LOG_DEBUG("network", "CMSG_CALENDAR_ARENA_TEAM [{}]", _player->GetGUID().ToString());
uint32 arenaTeamId;
recvData >> arenaTeamId;
@@ -380,11 +380,11 @@ void WorldSession::HandleCalendarUpdateEvent(WorldPacket& recvData)
return;
}
- TC_LOG_DEBUG("network", "CMSG_CALENDAR_UPDATE_EVENT [%s] EventId [" UI64FMTD
- "], InviteId [" UI64FMTD "] Title %s, Description %s, type %u "
- "Repeatable %u, MaxInvites %u, Dungeon ID %d, Time %u "
- "Time2 %u, Flags %u", guid.ToString().c_str(), eventId, inviteId, title.c_str(),
- description.c_str(), type, repetitionType, maxInvites, dungeonId,
+ TC_LOG_DEBUG("network", "CMSG_CALENDAR_UPDATE_EVENT [{}] EventId [{}], "
+ "InviteId [{}] Title {}, Description {}, type {} "
+ "Repeatable {}, MaxInvites {}, Dungeon ID {}, Time {} "
+ "Time2 {}, Flags {}", guid.ToString(), eventId, inviteId, title,
+ description, type, repetitionType, maxInvites, dungeonId,
eventPackedTime, timeZoneTime, flags);
if (CalendarEvent* calendarEvent = sCalendarMgr->GetEvent(eventId))
@@ -426,8 +426,8 @@ void WorldSession::HandleCalendarCopyEvent(WorldPacket& recvData)
recvData >> eventId >> inviteId;
recvData.ReadPackedTime(eventTime);
- TC_LOG_DEBUG("network", "CMSG_CALENDAR_COPY_EVENT [%s], EventId [" UI64FMTD
- "] inviteId [" UI64FMTD "] Time: %u", guid.ToString().c_str(), eventId, inviteId, eventTime);
+ TC_LOG_DEBUG("network", "CMSG_CALENDAR_COPY_EVENT [{}], EventId [{}] inviteId [{}] Time: {}",
+ guid.ToString(), eventId, inviteId, eventTime);
eventTime = uint32(LocalTimeToUTCTime(eventTime));
@@ -559,7 +559,7 @@ void WorldSession::HandleCalendarEventInvite(WorldPacket& recvData)
return;
}
- if (QueryResult result = CharacterDatabase.PQuery("SELECT flags FROM character_social WHERE guid = %u AND friend = %u", inviteeGuid.GetCounter(), playerGuid.GetCounter()))
+ if (QueryResult result = CharacterDatabase.PQuery("SELECT flags FROM character_social WHERE guid = {} AND friend = {}", inviteeGuid.GetCounter(), playerGuid.GetCounter()))
{
Field* fields = result->Fetch();
if (fields[0].GetUInt8() & SOCIAL_FLAG_IGNORED)
@@ -608,7 +608,7 @@ void WorldSession::HandleCalendarEventSignup(WorldPacket& recvData)
bool tentative;
recvData >> eventId >> tentative;
- TC_LOG_DEBUG("network", "CMSG_CALENDAR_EVENT_SIGNUP [%s] EventId [" UI64FMTD "] Tentative %u", guid.ToString().c_str(), eventId, tentative);
+ TC_LOG_DEBUG("network", "CMSG_CALENDAR_EVENT_SIGNUP [{}] EventId [{}] Tentative {}", guid.ToString(), eventId, tentative);
if (CalendarEvent* calendarEvent = sCalendarMgr->GetEvent(eventId))
{
@@ -635,9 +635,8 @@ void WorldSession::HandleCalendarEventRsvp(WorldPacket& recvData)
uint32 status;
recvData >> eventId >> inviteId >> status;
- TC_LOG_DEBUG("network", "CMSG_CALENDAR_EVENT_RSVP [%s] EventId ["
- UI64FMTD "], InviteId [" UI64FMTD "], status %u", guid.ToString().c_str(), eventId,
- inviteId, status);
+ TC_LOG_DEBUG("network", "CMSG_CALENDAR_EVENT_RSVP [{}] EventId [{}], InviteId [{}], status {}",
+ guid.ToString(), eventId, inviteId, status);
if (CalendarEvent* calendarEvent = sCalendarMgr->GetEvent(eventId))
{
@@ -675,9 +674,8 @@ void WorldSession::HandleCalendarEventRemoveInvite(WorldPacket& recvData)
recvData >> invitee.ReadAsPacked();
recvData >> inviteId >> ownerInviteId >> eventId;
- TC_LOG_DEBUG("network", "CMSG_CALENDAR_EVENT_REMOVE_INVITE [%s] EventId [" UI64FMTD
- "], ownerInviteId [" UI64FMTD "], Invitee ([%s] id: [" UI64FMTD "])",
- guid.ToString().c_str(), eventId, ownerInviteId, invitee.ToString().c_str(), inviteId);
+ TC_LOG_DEBUG("network", "CMSG_CALENDAR_EVENT_REMOVE_INVITE [{}] EventId [{}], ownerInviteId [{}], Invitee ([{}] id: [{}])",
+ guid.ToString(), eventId, ownerInviteId, invitee.ToString(), inviteId);
if (CalendarEvent* calendarEvent = sCalendarMgr->GetEvent(eventId))
{
@@ -704,9 +702,8 @@ void WorldSession::HandleCalendarEventStatus(WorldPacket& recvData)
recvData >> invitee.ReadAsPacked();
recvData >> eventId >> inviteId >> ownerInviteId >> status;
- TC_LOG_DEBUG("network", "CMSG_CALENDAR_EVENT_STATUS [%s] EventId ["
- UI64FMTD "] ownerInviteId [" UI64FMTD "], Invitee ([%s] id: ["
- UI64FMTD "], status %u", guid.ToString().c_str(), eventId, ownerInviteId, invitee.ToString().c_str(), inviteId, status);
+ TC_LOG_DEBUG("network", "CMSG_CALENDAR_EVENT_STATUS [{}] EventId [{}] ownerInviteId [{}], Invitee ([{}] id: [{}], status {}",
+ guid.ToString(), eventId, ownerInviteId, invitee.ToString(), inviteId, status);
if (CalendarEvent* calendarEvent = sCalendarMgr->GetEvent(eventId))
{
@@ -738,9 +735,8 @@ void WorldSession::HandleCalendarEventModeratorStatus(WorldPacket& recvData)
recvData >> invitee.ReadAsPacked();
recvData >> eventId >> inviteId >> ownerInviteId >> rank;
- TC_LOG_DEBUG("network", "CMSG_CALENDAR_EVENT_MODERATOR_STATUS [%s] EventId ["
- UI64FMTD "] ownerInviteId [" UI64FMTD "], Invitee ([%s] id: ["
- UI64FMTD "], rank %u", guid.ToString().c_str(), eventId, ownerInviteId, invitee.ToString().c_str(), inviteId, rank);
+ TC_LOG_DEBUG("network", "CMSG_CALENDAR_EVENT_MODERATOR_STATUS [{}] EventId [{}] ownerInviteId [{}], Invitee ([{}] id: [{}], rank {}",
+ guid.ToString(), eventId, ownerInviteId, invitee.ToString(), inviteId, rank);
if (CalendarEvent* calendarEvent = sCalendarMgr->GetEvent(eventId))
{
@@ -764,8 +760,8 @@ void WorldSession::HandleCalendarComplain(WorldPacket& recvData)
ObjectGuid complainGUID;
recvData >> eventId >> complainGUID;
- TC_LOG_DEBUG("network", "CMSG_CALENDAR_COMPLAIN [%s] EventId ["
- UI64FMTD "] guid [%s]", guid.ToString().c_str(), eventId, complainGUID.ToString().c_str());
+ TC_LOG_DEBUG("network", "CMSG_CALENDAR_COMPLAIN [{}] EventId [{}] guid [{}]",
+ guid.ToString(), eventId, complainGUID.ToString());
// what to do with complains?
}
@@ -775,7 +771,7 @@ void WorldSession::HandleCalendarGetNumPending(WorldPacket& /*recvData*/)
ObjectGuid guid = _player->GetGUID();
uint32 pending = sCalendarMgr->GetPlayerNumPending(guid);
- TC_LOG_DEBUG("network", "CMSG_CALENDAR_GET_NUM_PENDING: [%s] Pending: %u", guid.ToString().c_str(), pending);
+ TC_LOG_DEBUG("network", "CMSG_CALENDAR_GET_NUM_PENDING: [{}] Pending: {}", guid.ToString(), pending);
WorldPacket data(SMSG_CALENDAR_SEND_NUM_PENDING, 4);
data << uint32(pending);
@@ -787,7 +783,7 @@ void WorldSession::HandleSetSavedInstanceExtend(WorldPacket& recvData)
uint32 mapId, difficulty;
uint8 toggleExtend;
recvData >> mapId >> difficulty>> toggleExtend;
- TC_LOG_DEBUG("network", "CMSG_SET_SAVED_INSTANCE_EXTEND - MapId: %u, Difficulty: %u, ToggleExtend: %s", mapId, difficulty, toggleExtend ? "On" : "Off");
+ TC_LOG_DEBUG("network", "CMSG_SET_SAVED_INSTANCE_EXTEND - MapId: {}, Difficulty: {}, ToggleExtend: {}", mapId, difficulty, toggleExtend ? "On" : "Off");
if (Player* player = GetPlayer())
{
@@ -819,7 +815,7 @@ void WorldSession::HandleSetSavedInstanceExtend(WorldPacket& recvData)
void WorldSession::SendCalendarRaidLockout(InstanceSave const* save, bool add)
{
- TC_LOG_DEBUG("network", "%s", add ? "SMSG_CALENDAR_RAID_LOCKOUT_ADDED" : "SMSG_CALENDAR_RAID_LOCKOUT_REMOVED");
+ TC_LOG_DEBUG("network", "{}", add ? "SMSG_CALENDAR_RAID_LOCKOUT_ADDED" : "SMSG_CALENDAR_RAID_LOCKOUT_REMOVED");
time_t currTime = GameTime::GetGameTime();
WorldPacket data(SMSG_CALENDAR_RAID_LOCKOUT_REMOVED, (4) + 4 + 4 + 4 + 8);
@@ -842,8 +838,8 @@ void WorldSession::SendCalendarRaidLockoutUpdated(InstanceSave const* save)
return;
ObjectGuid guid = _player->GetGUID();
- TC_LOG_DEBUG("network", "SMSG_CALENDAR_RAID_LOCKOUT_UPDATED [%s] Map: %u, Difficulty %u",
- guid.ToString().c_str(), save->GetMapId(), static_cast<uint32>(save->GetDifficulty()));
+ TC_LOG_DEBUG("network", "SMSG_CALENDAR_RAID_LOCKOUT_UPDATED [{}] Map: {}, Difficulty {}",
+ guid.ToString(), save->GetMapId(), static_cast<uint32>(save->GetDifficulty()));
time_t currTime = GameTime::GetGameTime();