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

@@ -74,8 +74,7 @@ void CalendarMgr::LoadFromDB()
_maxEventId = std::max(_maxEventId, eventId);
++count;
}
while (result->NextRow());
} while (result->NextRow());
sLog->outString(">> Loaded %u calendar events", count);
count = 0;
@@ -101,8 +100,7 @@ void CalendarMgr::LoadFromDB()
_maxInviteId = std::max(_maxInviteId, inviteId);
++count;
}
while (result->NextRow());
} while (result->NextRow());
sLog->outString(">> Loaded %u calendar invites", count);
@@ -510,7 +508,7 @@ void CalendarMgr::SendCalendarEventInvite(CalendarInvite const& invite)
void CalendarMgr::SendCalendarEventUpdateAlert(CalendarEvent const& calendarEvent, time_t oldEventTime)
{
WorldPacket data(SMSG_CALENDAR_EVENT_UPDATED_ALERT, 1 + 8 + 4 + 4 + 4 + 1 + 4 +
calendarEvent.GetTitle().size() + calendarEvent.GetDescription().size() + 1 + 4 + 4);
calendarEvent.GetTitle().size() + calendarEvent.GetDescription().size() + 1 + 4 + 4);
data << uint8(1); // unk
data << uint64(calendarEvent.GetEventId());
data.AppendPackedTime(oldEventTime);
@@ -593,9 +591,8 @@ void CalendarMgr::SendCalendarEventInviteAlert(CalendarEvent const& calendarEven
if (Guild* guild = sGuildMgr->GetGuildById(calendarEvent.GetGuildId()))
guild->BroadcastPacket(&data);
}
else
if (Player* player = ObjectAccessor::FindPlayerInOrOutOfWorld(invite.GetInviteeGUID()))
player->SendDirectMessage(&data);
else if (Player* player = ObjectAccessor::FindPlayerInOrOutOfWorld(invite.GetInviteeGUID()))
player->SendDirectMessage(&data);
}
void CalendarMgr::SendCalendarEvent(uint64 guid, CalendarEvent const& calendarEvent, CalendarSendEventType sendType)