refactor(Core/Game): restyle game lib with astyle (#3466)

This commit is contained in:
Kargatum
2020-10-12 15:08:15 +07:00
committed by GitHub
parent e99b526e17
commit a2b26272d2
338 changed files with 52196 additions and 50944 deletions

View File

@@ -97,7 +97,7 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket& /*recvData*/)
time_t resetTime = itr->second.extended ? save->GetExtendedResetTime() : save->GetResetTime();
dataBuffer << uint32(save->GetMapId());
dataBuffer << uint32(save->GetDifficulty());
dataBuffer << uint32(resetTime >= currTime ? resetTime-currTime : 0);
dataBuffer << uint32(resetTime >= currTime ? resetTime - currTime : 0);
dataBuffer << uint64(MAKE_NEW_GUID(save->GetInstanceId(), 0, HIGHGUID_INSTANCE)); // instance save id as unique instance copy id
++boundCounter;
}
@@ -172,7 +172,7 @@ void WorldSession::HandleCalendarGetEvent(WorldPacket& recvData)
recvData >> eventId;
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_GET_EVENT. Player ["
UI64FMTD "] Event [" UI64FMTD "]", _player->GetGUID(), eventId);
UI64FMTD "] Event [" UI64FMTD "]", _player->GetGUID(), eventId);
if (CalendarEvent* calendarEvent = sCalendarMgr->GetEvent(eventId))
sCalendarMgr->SendCalendarEvent(_player->GetGUID(), *calendarEvent, CALENDAR_SENDTYPE_GET);
@@ -290,7 +290,7 @@ void WorldSession::HandleCalendarAddEvent(WorldPacket& recvData)
SetCalendarEventCreationCooldown(time(nullptr) + CALENDAR_CREATE_EVENT_COOLDOWN);
CalendarEvent* calendarEvent = new CalendarEvent(sCalendarMgr->GetFreeEventId(), guid, 0, CalendarEventType(type), dungeonId,
time_t(eventPackedTime), flags, time_t(unkPackedTime), title, description);
time_t(eventPackedTime), flags, time_t(unkPackedTime), title, description);
if (calendarEvent->IsGuildEvent() || calendarEvent->IsGuildAnnouncement())
if (Player* creator = ObjectAccessor::FindPlayerInOrOutOfWorld(guid))
@@ -383,11 +383,11 @@ void WorldSession::HandleCalendarUpdateEvent(WorldPacket& recvData)
}
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_UPDATE_EVENT [" UI64FMTD "] EventId [" UI64FMTD
"], InviteId [" UI64FMTD "] Title %s, Description %s, type %u "
"Repeatable %u, MaxInvites %u, Dungeon ID %d, Time %u "
"Time2 %u, Flags %u", guid, eventId, inviteId, title.c_str(),
description.c_str(), type, repetitionType, maxInvites, dungeonId,
eventPackedTime, timeZoneTime, flags);
"], InviteId [" UI64FMTD "] Title %s, Description %s, type %u "
"Repeatable %u, MaxInvites %u, Dungeon ID %d, Time %u "
"Time2 %u, Flags %u", guid, eventId, inviteId, title.c_str(),
description.c_str(), type, repetitionType, maxInvites, dungeonId,
eventPackedTime, timeZoneTime, flags);
if (CalendarEvent* calendarEvent = sCalendarMgr->GetEvent(eventId))
{
@@ -429,7 +429,7 @@ void WorldSession::HandleCalendarCopyEvent(WorldPacket& recvData)
recvData >> eventId >> inviteId;
recvData.ReadPackedTime(eventTime);
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_COPY_EVENT [" UI64FMTD "], EventId [" UI64FMTD
"] inviteId [" UI64FMTD "] Time: %u", guid, eventId, inviteId, eventTime);
"] inviteId [" UI64FMTD "] Time: %u", guid, eventId, inviteId, eventTime);
// prevent events in the past
// To Do: properly handle timezones and remove the "- time_t(86400L)" hack
@@ -634,8 +634,8 @@ void WorldSession::HandleCalendarEventRsvp(WorldPacket& recvData)
recvData >> eventId >> inviteId >> status;
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_EVENT_RSVP [" UI64FMTD"] EventId ["
UI64FMTD "], InviteId [" UI64FMTD "], status %u", guid, eventId,
inviteId, status);
UI64FMTD "], InviteId [" UI64FMTD "], status %u", guid, eventId,
inviteId, status);
if (CalendarEvent* calendarEvent = sCalendarMgr->GetEvent(eventId))
{
@@ -674,9 +674,9 @@ void WorldSession::HandleCalendarEventRemoveInvite(WorldPacket& recvData)
recvData >> inviteId >> ownerInviteId >> eventId;
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_EVENT_REMOVE_INVITE ["
UI64FMTD "] EventId [" UI64FMTD "], ownerInviteId ["
UI64FMTD "], Invitee ([" UI64FMTD "] id: [" UI64FMTD "])",
guid, eventId, ownerInviteId, invitee, inviteId);
UI64FMTD "] EventId [" UI64FMTD "], ownerInviteId ["
UI64FMTD "], Invitee ([" UI64FMTD "] id: [" UI64FMTD "])",
guid, eventId, ownerInviteId, invitee, inviteId);
if (CalendarEvent* calendarEvent = sCalendarMgr->GetEvent(eventId))
{
@@ -704,8 +704,8 @@ void WorldSession::HandleCalendarEventStatus(WorldPacket& recvData)
recvData.readPackGUID(invitee);
recvData >> eventId >> inviteId >> ownerInviteId >> status;
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_EVENT_STATUS [" UI64FMTD"] EventId ["
UI64FMTD "] ownerInviteId [" UI64FMTD "], Invitee ([" UI64FMTD "] id: ["
UI64FMTD "], status %u", guid, eventId, ownerInviteId, invitee, inviteId, status);
UI64FMTD "] ownerInviteId [" UI64FMTD "], Invitee ([" UI64FMTD "] id: ["
UI64FMTD "], status %u", guid, eventId, ownerInviteId, invitee, inviteId, status);
if (CalendarEvent* calendarEvent = sCalendarMgr->GetEvent(eventId))
{
@@ -738,8 +738,8 @@ void WorldSession::HandleCalendarEventModeratorStatus(WorldPacket& recvData)
recvData.readPackGUID(invitee);
recvData >> eventId >> inviteId >> ownerInviteId >> rank;
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_EVENT_MODERATOR_STATUS [" UI64FMTD "] EventId ["
UI64FMTD "] ownerInviteId [" UI64FMTD "], Invitee ([" UI64FMTD "] id: ["
UI64FMTD "], rank %u", guid, eventId, ownerInviteId, invitee, inviteId, rank);
UI64FMTD "] ownerInviteId [" UI64FMTD "], Invitee ([" UI64FMTD "] id: ["
UI64FMTD "], rank %u", guid, eventId, ownerInviteId, invitee, inviteId, rank);
if (CalendarEvent* calendarEvent = sCalendarMgr->GetEvent(eventId))
{
@@ -764,7 +764,7 @@ void WorldSession::HandleCalendarComplain(WorldPacket& recvData)
recvData >> eventId >> complainGUID;
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_COMPLAIN [" UI64FMTD "] EventId ["
UI64FMTD "] guid [" UI64FMTD "]", guid, eventId, complainGUID);
UI64FMTD "] guid [" UI64FMTD "]", guid, eventId, complainGUID);
// what to do with complains?
}
@@ -775,7 +775,7 @@ void WorldSession::HandleCalendarGetNumPending(WorldPacket& /*recvData*/)
uint32 pending = sCalendarMgr->GetPlayerNumPending(guid);
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_GET_NUM_PENDING: [" UI64FMTD
"] Pending: %u", guid, pending);
"] Pending: %u", guid, pending);
WorldPacket data(SMSG_CALENDAR_SEND_NUM_PENDING, 4);
data << uint32(pending);
@@ -786,7 +786,7 @@ void WorldSession::HandleSetSavedInstanceExtend(WorldPacket& recvData)
{
uint32 mapId, difficulty;
uint8 toggleExtendOn;
recvData >> mapId >> difficulty>> toggleExtendOn;
recvData >> mapId >> difficulty >> toggleExtendOn;
const MapEntry* entry = sMapStore.LookupEntry(mapId);
if (!entry || !entry->IsRaid())
@@ -824,7 +824,7 @@ void WorldSession::SendCalendarRaidLockout(InstanceSave const* save, bool add)
data << uint32(save->GetMapId());
data << uint32(save->GetDifficulty());
data << uint32(save->GetResetTime() >= currTime ? save->GetResetTime()-currTime : 0);
data << uint32(save->GetResetTime() >= currTime ? save->GetResetTime() - currTime : 0);
data << uint64(MAKE_NEW_GUID(save->GetInstanceId(), 0, HIGHGUID_INSTANCE));
SendPacket(&data);
}
@@ -838,7 +838,7 @@ void WorldSession::SendCalendarRaidLockoutUpdated(InstanceSave const* save, bool
data.AppendPackedTime(currTime);
data << uint32(save->GetMapId());
data << uint32(save->GetDifficulty());
data << uint32(resetTimeOp >= currTime ? resetTimeOp-currTime : resetTimeOp); // pussywizard: old time in secs to reset
data << uint32(resetTime >= currTime ? resetTime-currTime : 0); // pussywizard: new time in secs to reset
data << uint32(resetTimeOp >= currTime ? resetTimeOp - currTime : resetTimeOp); // pussywizard: old time in secs to reset
data << uint32(resetTime >= currTime ? resetTime - currTime : 0); // pussywizard: new time in secs to reset
SendPacket(&data);
}