mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/BG: use new GetUniqueBracketID() method to store statistics
Closes #13122
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user