Core/Battleground: Fix typo and small cleanup (again thx @joschiwald)

This commit is contained in:
Vincent-Michael
2014-07-14 21:31:16 +02:00
parent 06d9d33de3
commit 524cc6c2d9
2 changed files with 3 additions and 7 deletions
+2 -6
View File
@@ -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);