Core/BG: use new GetUniqueBracketID() method to store statistics

Closes #13122
This commit is contained in:
ShinDarth
2014-09-13 13:53:15 +01:00
committed by DDuarte
parent c7639ca6a1
commit dbbc5bfb50
2 changed files with 9 additions and 1 deletions

View File

@@ -738,7 +738,7 @@ void Battleground::EndBattleground(uint32 winner)
stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_PVPSTATS_BATTLEGROUND);
stmt->setUInt64(0, battlegroundId);
stmt->setUInt8(1, GetWinner());
stmt->setUInt8(2, m_BracketId + 1);
stmt->setUInt8(2, GetUniqueBracketId());
stmt->setUInt8(3, GetTypeID(true));
CharacterDatabase.Execute(stmt);
}
@@ -1832,3 +1832,8 @@ bool Battleground::CheckAchievementCriteriaMeet(uint32 criteriaId, Player const*
TC_LOG_ERROR("bg.battleground", "Battleground::CheckAchievementCriteriaMeet: No implementation for criteria %u", criteriaId);
return false;
}
uint8 Battleground::GetUniqueBracketId() const
{
return GetMinLevel() / 10;
}

View File

@@ -469,6 +469,9 @@ class Battleground
virtual uint32 GetPrematureWinner();
// because BattleGrounds with different types and same level range has different m_BracketId
uint8 GetUniqueBracketId() const;
protected:
// this method is called, when BG cannot spawn its own spirit guide, or something is wrong, It correctly ends Battleground
void EndNow();