diff options
author | Brian <runningnak3d@gmail.com> | 2010-02-15 07:55:01 -0700 |
---|---|---|
committer | Brian <runningnak3d@gmail.com> | 2010-02-15 07:55:01 -0700 |
commit | 51dae1505d30fa1c2216f76284cc76bf3e3c45d1 (patch) | |
tree | 40f81c1204bd4f53413af19a6f7b40b4ed5b2169 /src/game/Player.cpp | |
parent | b9a4bd8a26ec74a1dede6129764db85a3b6710aa (diff) | |
parent | 3dd6fdedf739ac87fa9da9a294bdc9ffdca28441 (diff) |
* Merge
--HG--
branch : trunk
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r-- | src/game/Player.cpp | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 8bf3371fb98..31959d83ec6 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -3676,10 +3676,10 @@ void Player::RemoveArenaSpellCooldowns() next = itr; ++next; SpellEntry const * entry = sSpellStore.LookupEntry(itr->first); - // check if spellentry is present and if the cooldown is less than 15 mins + // check if spellentry is present and if the cooldown is less than 10 mins if( entry && - entry->RecoveryTime <= 15 * MINUTE * IN_MILISECONDS && - entry->CategoryRecoveryTime <= 15 * MINUTE * IN_MILISECONDS ) + entry->RecoveryTime <= 10 * MINUTE * IN_MILISECONDS && + entry->CategoryRecoveryTime <= 10 * MINUTE * IN_MILISECONDS ) { // remove & notify RemoveSpellCooldown(itr->first, true); @@ -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(); |