mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-21 20:56:23 +00:00
refactor(Core/Game): restyle game lib with astyle (#3466)
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
|
||||
ArenaTeam::ArenaTeam()
|
||||
: TeamId(0), Type(0), TeamName(), CaptainGuid(0), BackgroundColor(0), EmblemStyle(0), EmblemColor(0),
|
||||
BorderStyle(0), BorderColor(0)
|
||||
BorderStyle(0), BorderColor(0)
|
||||
{
|
||||
Stats.WeekGames = 0;
|
||||
Stats.SeasonGames = 0;
|
||||
@@ -250,8 +250,7 @@ bool ArenaTeam::LoadMembersFromDB(QueryResult result)
|
||||
// Put the player in the team
|
||||
Members.push_back(newMember);
|
||||
sWorld->UpdateGlobalPlayerArenaTeam(GUID_LOPART(newMember.Guid), GetSlot(), GetId());
|
||||
}
|
||||
while (result->NextRow());
|
||||
} while (result->NextRow());
|
||||
|
||||
if (Empty() || !captainPresentInTeam)
|
||||
{
|
||||
@@ -434,7 +433,7 @@ void ArenaTeam::Roster(WorldSession* session)
|
||||
|
||||
void ArenaTeam::Query(WorldSession* session)
|
||||
{
|
||||
WorldPacket data(SMSG_ARENA_TEAM_QUERY_RESPONSE, 4*7+GetName().size()+1);
|
||||
WorldPacket data(SMSG_ARENA_TEAM_QUERY_RESPONSE, 4 * 7 + GetName().size() + 1);
|
||||
data << uint32(GetId()); // team id
|
||||
data << GetName(); // team name
|
||||
data << uint32(GetType()); // arena team type (2=2x2, 3=3x3 or 5=5x5)
|
||||
@@ -451,7 +450,7 @@ void ArenaTeam::Query(WorldSession* session)
|
||||
|
||||
void ArenaTeam::SendStats(WorldSession* session)
|
||||
{
|
||||
WorldPacket data(SMSG_ARENA_TEAM_STATS, 4*7);
|
||||
WorldPacket data(SMSG_ARENA_TEAM_STATS, 4 * 7);
|
||||
data << uint32(GetId()); // team id
|
||||
data << uint32(Stats.Rating); // rating
|
||||
data << uint32(Stats.WeekGames); // games this week
|
||||
@@ -477,7 +476,7 @@ void ArenaTeam::Inspect(WorldSession* session, uint64 guid)
|
||||
if (!member)
|
||||
return;
|
||||
|
||||
WorldPacket data(MSG_INSPECT_ARENA_TEAMS, 8+1+4*6);
|
||||
WorldPacket data(MSG_INSPECT_ARENA_TEAMS, 8 + 1 + 4 * 6);
|
||||
data << uint64(guid); // player guid
|
||||
data << uint8(GetSlot()); // slot (0...2)
|
||||
data << uint32(GetId()); // arena team id
|
||||
@@ -530,7 +529,7 @@ void ArenaTeam::BroadcastPacket(WorldPacket* packet)
|
||||
|
||||
void ArenaTeam::BroadcastEvent(ArenaTeamEvents event, uint64 guid, uint8 strCount, std::string const& str1, std::string const& str2, std::string const& str3)
|
||||
{
|
||||
WorldPacket data(SMSG_ARENA_TEAM_EVENT, 1+1+1);
|
||||
WorldPacket data(SMSG_ARENA_TEAM_EVENT, 1 + 1 + 1);
|
||||
data << uint8(event);
|
||||
data << uint8(strCount);
|
||||
switch (strCount)
|
||||
@@ -582,9 +581,12 @@ uint8 ArenaTeam::GetSlotByType(uint32 type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case ARENA_TEAM_2v2: return 0;
|
||||
case ARENA_TEAM_3v3: return 1;
|
||||
case ARENA_TEAM_5v5: return 2;
|
||||
case ARENA_TEAM_2v2:
|
||||
return 0;
|
||||
case ARENA_TEAM_3v3:
|
||||
return 1;
|
||||
case ARENA_TEAM_5v5:
|
||||
return 2;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -803,8 +805,8 @@ void ArenaTeam::MemberLost(Player* player, uint32 againstMatchmakerRating, int32
|
||||
itr->ModifyMatchmakerRating(MatchmakerRatingChange, GetSlot());
|
||||
|
||||
// Update personal played stats
|
||||
itr->WeekGames +=1;
|
||||
itr->SeasonGames +=1;
|
||||
itr->WeekGames += 1;
|
||||
itr->SeasonGames += 1;
|
||||
|
||||
// update the unit fields
|
||||
player->SetArenaTeamInfoField(GetSlot(), ARENA_TEAM_GAMES_WEEK, itr->WeekGames);
|
||||
@@ -833,8 +835,8 @@ void ArenaTeam::MemberWon(Player* player, uint32 againstMatchmakerRating, int32
|
||||
}
|
||||
|
||||
// update personal stats
|
||||
itr->WeekGames +=1;
|
||||
itr->SeasonGames +=1;
|
||||
itr->WeekGames += 1;
|
||||
itr->SeasonGames += 1;
|
||||
itr->SeasonWins += 1;
|
||||
itr->WeekWins += 1;
|
||||
// update unit fields
|
||||
|
||||
Reference in New Issue
Block a user