diff options
| author | win32 <> | 2010-01-21 11:29:22 +0200 |
|---|---|---|
| committer | win32 <> | 2010-01-21 11:29:22 +0200 |
| commit | 178a881d17e0aa92765a6622d542da46c479f5b9 (patch) | |
| tree | 8b2b8db1e3fecab373f2eb73d6ede232b39af4ae /src/game/Player.cpp | |
| parent | 19ac6f6a3c5385d85edc5c831cd20d6e8ee406b8 (diff) | |
Implement minimal arena team size for some items arena rating requirements.
Autor LordJZ.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Player.cpp')
| -rw-r--r-- | src/game/Player.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 59280f1e7e1..472a5017b35 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -19072,7 +19072,7 @@ bool Player::BuyItemFromVendor(uint64 vendorguid, uint32 item, uint8 count, uint } // check for personal arena rating requirement - if( GetMaxPersonalArenaRatingRequirement() < iece->reqpersonalarenarating ) + if( GetMaxPersonalArenaRatingRequirement(iece->reqarenaslot) < iece->reqpersonalarenarating ) { // probably not the proper equip err SendEquipError(EQUIP_ERR_CANT_EQUIP_RANK,NULL,NULL); @@ -19210,13 +19210,13 @@ bool Player::BuyItemFromVendor(uint64 vendorguid, uint32 item, uint8 count, uint return crItem->maxcount != 0; } -uint32 Player::GetMaxPersonalArenaRatingRequirement() +uint32 Player::GetMaxPersonalArenaRatingRequirement(uint32 minarenaslot) { // returns the maximal personal arena rating that can be used to purchase items requiring this condition // the personal rating of the arena team must match the required limit as well // so return max[in arenateams](min(personalrating[teamtype], teamrating[teamtype])) uint32 max_personal_rating = 0; - for (uint8 i = 0; i < MAX_ARENA_SLOT; ++i) + for (uint8 i = minarenaslot; i < MAX_ARENA_SLOT; ++i) { if(ArenaTeam * at = objmgr.GetArenaTeamById(GetArenaTeamId(i))) { |
