diff options
author | megamage <none@none> | 2009-02-15 11:58:27 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-02-15 11:58:27 -0600 |
commit | 97ac3aba05cfc56c6c8a7c5dbfb7071b02239181 (patch) | |
tree | 283dc5898154b7b1654e193657d32ea1f94bdfcf /src/game/ObjectMgr.cpp | |
parent | 419b74952002c0605ca829227f55a6354d8bd1c8 (diff) |
Implemented limit category check for item/gem at equip or gem inserting. Author: VladimirMangos
--HG--
branch : trunk
Diffstat (limited to 'src/game/ObjectMgr.cpp')
-rw-r--r-- | src/game/ObjectMgr.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index a981e06bc31..32be0e9ca41 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -1777,6 +1777,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; + } } } @@ -6668,7 +6674,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: |