Core/Battleground: Fix typo and small cleanup (again thx @joschiwald)
This commit is contained in:
@@ -233,13 +233,9 @@ void Arena::EndBattleground(uint32 winner)
|
||||
if (!guildAwarded)
|
||||
{
|
||||
guildAwarded = true;
|
||||
if (uint32 guildId = GetBgMap()->GetOwnerGuildId(player->GetTeam()))
|
||||
if (uint32 guildId = GetBgMap()->GetOwnerGuildId(player->GetBGTeam()))
|
||||
if (Guild* guild = sGuildMgr->GetGuildById(guildId))
|
||||
{
|
||||
guild->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_WIN_BG, 1, 0, 0, NULL, player);
|
||||
if (isArena() && isRated() && winnerArenaTeam && loserArenaTeam && winnerArenaTeam != loserArenaTeam)
|
||||
guild->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_WIN_RATED_ARENA, std::max<uint32>(winnerArenaTeam->GetRating(), 1), 0, 0, NULL, player);
|
||||
}
|
||||
guild->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_WIN_RATED_ARENA, std::max<uint32>(winnerArenaTeam->GetRating(), 1), 0, 0, NULL, player);
|
||||
}
|
||||
|
||||
winnerArenaTeam->MemberWon(player, loserMatchmakerRating, winnerMatchmakerChange);
|
||||
|
||||
@@ -828,7 +828,7 @@ void Battleground::EndBattleground(uint32 winner)
|
||||
if (!guildAwarded)
|
||||
{
|
||||
guildAwarded = true;
|
||||
if (uint32 guildId = GetBgMap()->GetOwnerGuildId(player->GetTeam()))
|
||||
if (uint32 guildId = GetBgMap()->GetOwnerGuildId(player->GetBGTeam()))
|
||||
{
|
||||
if (Guild* guild = sGuildMgr->GetGuildById(guildId))
|
||||
guild->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_WIN_BG, 1, 0, 0, NULL, player);
|
||||
|
||||
Reference in New Issue
Block a user