mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
Implemented limit category check for item/gem at equip or gem inserting.
This commit is contained in:
parent
1eadd9b7b4
commit
b052777f71
10 changed files with 249 additions and 70 deletions
|
|
@ -1679,6 +1679,12 @@ void ObjectMgr::LoadItemPrototypes()
|
|||
sLog.outErrorDb("Item (Entry: %u) has wrong FoodType value (%u)",i,proto->FoodType);
|
||||
const_cast<ItemPrototype*>(proto)->FoodType = 0;
|
||||
}
|
||||
|
||||
if(proto->ItemLimitCategory && !sItemLimitCategoryStore.LookupEntry(proto->ItemLimitCategory))
|
||||
{
|
||||
sLog.outErrorDb("Item (Entry: %u) has wrong LimitCategory value (%u)",i,proto->ItemLimitCategory);
|
||||
const_cast<ItemPrototype*>(proto)->ItemLimitCategory = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -6449,7 +6455,7 @@ bool PlayerCondition::Meets(Player const * player) const
|
|||
case CONDITION_ITEM:
|
||||
return player->HasItemCount(value1, value2);
|
||||
case CONDITION_ITEM_EQUIPPED:
|
||||
return player->GetItemOrItemWithGemEquipped(value1) != NULL;
|
||||
return player->HasItemOrGemWithIdEquipped(value1,1);
|
||||
case CONDITION_ZONEID:
|
||||
return player->GetZoneId() == value1;
|
||||
case CONDITION_REPUTATION_RANK:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue