Implement minimal arena team size for some items arena rating requirements.

Autor LordJZ.

--HG--
branch : trunk
This commit is contained in:
win32
2010-01-21 11:29:22 +02:00
parent 19ac6f6a3c
commit 178a881d17
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -1044,7 +1044,7 @@ struct ItemExtendedCostEntry
uint32 ID; // 0 extended-cost entry id
uint32 reqhonorpoints; // 1 required honor points
uint32 reqarenapoints; // 2 required arena points
//uint32 unk1; // 4 probably indicates new 2v2 bracket restrictions
uint32 reqarenaslot; // 4 arena slot restrctions (min slot value)
uint32 reqitem[5]; // 5-8 required item id
uint32 reqitemcount[5]; // 9-13 required count of 1st item
uint32 reqpersonalarenarating; // 14 required personal arena rating};
+1 -1
View File
@@ -68,7 +68,7 @@ const char Itemfmt[]="niiiiiii";
const char ItemBagFamilyfmt[]="nxxxxxxxxxxxxxxxxx";
//const char ItemDisplayTemplateEntryfmt[]="nxxxxxxxxxxixxxxxxxxxxx";
//const char ItemCondExtCostsEntryfmt[]="xiii";
const char ItemExtendedCostEntryfmt[]="niixiiiiiiiiiiix";
const char ItemExtendedCostEntryfmt[]="niiiiiiiiiiiiiix";
const char ItemLimitCategoryEntryfmt[]="nxxxxxxxxxxxxxxxxxix";
const char ItemRandomPropertiesfmt[]="nxiiiiissssssssssssssssx";
const char ItemRandomSuffixfmt[]="nssssssssssssssssxxiiiiiiiiii";
+3 -3
View File
@@ -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)))
{
+1 -1
View File
@@ -1893,7 +1893,7 @@ class TRINITY_DLL_SPEC Player : public Unit, public GridObject<Player>
uint32 GetArenaPoints() { return GetUInt32Value(PLAYER_FIELD_ARENA_CURRENCY); }
void ModifyHonorPoints( int32 value );
void ModifyArenaPoints( int32 value );
uint32 GetMaxPersonalArenaRatingRequirement();
uint32 GetMaxPersonalArenaRatingRequirement(uint32 minarenaslot);
//End of PvP System