Use PVPDificulty.dbc for bg/arena bracket selection (levels and difficulty). Rename BG/arena queue_id to bracket_id and related functions/etc. Author: VladimirMangos.
--HG-- branch : trunk
This commit is contained in:
+6
-13
@@ -20687,24 +20687,17 @@ bool Player::GetBGAccessByLevel(BattleGroundTypeId bgTypeId) const
|
||||
if(!bg)
|
||||
return false;
|
||||
|
||||
if(getLevel() < bg->GetMinLevel() || getLevel() > bg->GetMaxLevel())
|
||||
// limit check leel to dbc compatible level range
|
||||
uint32 level = getLevel();
|
||||
if (level > DEFAULT_MAX_LEVEL)
|
||||
level = DEFAULT_MAX_LEVEL;
|
||||
|
||||
if(level < bg->GetMinLevel() || level > bg->GetMaxLevel())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
BGQueueIdBasedOnLevel Player::GetBattleGroundQueueIdFromLevel(BattleGroundTypeId bgTypeId) const
|
||||
{
|
||||
// for ranges 0 - 19, 20 - 29, 30 - 39, 40 - 49, 50 - 59, 60 - 69, 70 - 79, 80
|
||||
uint32 queue_id = ( getLevel() / 10) - 1;
|
||||
if (queue_id >= MAX_BATTLEGROUND_QUEUES)
|
||||
{
|
||||
sLog.outError("BattleGround: too high queue_id %u this shouldn't happen", queue_id);
|
||||
return QUEUE_ID_MAX_LEVEL_80;
|
||||
}
|
||||
return BGQueueIdBasedOnLevel(queue_id);
|
||||
}
|
||||
|
||||
float Player::GetReputationPriceDiscount( Creature const* pCreature ) const
|
||||
{
|
||||
FactionTemplateEntry const* vendor_faction = pCreature->getFactionTemplateEntry();
|
||||
|
||||
Reference in New Issue
Block a user