Use PVPDificulty.dbc for bg/arena bracket selection (levels and difficulty)

This commit is contained in:
VladimirMangos 2010-01-09 03:36:27 +03:00
parent 75c81894b2
commit 63709fdc49
15 changed files with 167 additions and 98 deletions

View file

@ -1129,7 +1129,6 @@ void BattleGround::RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPac
// this method is called when no players remains in battleground
void BattleGround::Reset()
{
SetBracketId(BG_BRACKET_ID_FIRST);
SetWinner(WINNER_NONE);
SetStatus(STATUS_WAIT_QUEUE);
SetStartTime(0);
@ -1835,3 +1834,9 @@ bool BattleGround::IsTeamScoreInRange(uint32 team, uint32 minScore, uint32 maxSc
uint32 score = (m_TeamScores[team_idx] < 0) ? 0 : uint32(m_TeamScores[team_idx]);
return score >= minScore && score <= maxScore;
}
void BattleGround::SetBracket( PvPDifficultyEntry const* bracketEntry )
{
m_BracketId = bracketEntry->GetBracketId();
SetLevelRange(bracketEntry->minLevel,bracketEntry->maxLevel);
}