diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/DataStores/DBCEnums.h | 6 | ||||
-rw-r--r-- | src/server/game/DataStores/DBCStructure.h | 2 | ||||
-rw-r--r-- | src/server/game/DataStores/DBCfmt.h | 2 | ||||
-rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 4 |
4 files changed, 5 insertions, 9 deletions
diff --git a/src/server/game/DataStores/DBCEnums.h b/src/server/game/DataStores/DBCEnums.h index cb2f26e567f..b8440032d83 100644 --- a/src/server/game/DataStores/DBCEnums.h +++ b/src/server/game/DataStores/DBCEnums.h @@ -359,12 +359,6 @@ enum ItemEnchantmentType ITEM_ENCHANTMENT_TYPE_PRISMATIC_SOCKET = 8 }; -enum ItemLimitCategoryMode -{ - ITEM_LIMIT_CATEGORY_MODE_HAVE = 0, // limit applied to amount items in inventory/bank - ITEM_LIMIT_CATEGORY_MODE_EQUIP = 1 // limit applied to amount equipped items (including used gems) -}; - enum SkillRaceClassInfoFlags { SKILL_FLAG_NO_SKILLUP_MESSAGE = 0x2, diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index c85344b9bd1..d93121ae072 100644 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -876,7 +876,7 @@ struct ItemLimitCategoryEntry //char* name[16] // 1-16 m_name_lang // 17 name flags uint32 maxCount; // 18, max allowed equipped as item or in gem slot - uint32 mode; // 19, 0 = have, 1 = equip (enum ItemLimitCategoryMode) + char* mode; // 19, "Jeweler's Gems" = have, empty string = equip }; #define MAX_ITEM_ENCHANTMENT_EFFECTS 3 diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h index 1accc81714b..8c2d541aa81 100644 --- a/src/server/game/DataStores/DBCfmt.h +++ b/src/server/game/DataStores/DBCfmt.h @@ -78,7 +78,7 @@ char const ItemBagFamilyfmt[] = "nxxxxxxxxxxxxxxxxx"; //char const ItemDisplayTemplateEntryfmt[] = "nxxxxxxxxxxixxxxxxxxxxx"; //char const ItemCondExtCostsEntryfmt[] = "xiii"; char const ItemExtendedCostEntryfmt[] = "niiiiiiiiiiiiiix"; -char const ItemLimitCategoryEntryfmt[] = "nxxxxxxxxxxxxxxxxxii"; +char const ItemLimitCategoryEntryfmt[] = "nxxxxxxxxxxxxxxxxxis"; char const ItemRandomPropertiesfmt[] = "nxiiixxssssssssssssssssx"; char const ItemRandomSuffixfmt[] = "nssssssssssssssssxxiiixxiiixx"; char const ItemSetEntryfmt[] = "dssssssssssssssssxiiiiiiiiiixxxxxxxiiiiiiiiiiiiiiiiii"; diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index cfd365b1810..2bc652ed560 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -10213,7 +10213,9 @@ InventoryResult Player::CanTakeMoreSimilarItems(uint32 entry, uint32 count, Item return EQUIP_ERR_ITEM_CANT_BE_EQUIPPED; } - if (limitEntry->mode == ITEM_LIMIT_CATEGORY_MODE_HAVE) + // For some unknown reason, the "mode" field in ItemLimitCategory.dbc is not an integer, but a string that is either empty or contains the value "Jeweler's Gems". + // If it is empty, item limit is applied to owned items (same behavior as Unique flag). If it's not empty, item limit is applied to equipped items (Jewelcrafting gems, normal/heroic ICC trinkets). + if (!*limitEntry->mode) { uint32 curcount = GetItemCountWithLimitCategory(pProto->ItemLimitCategory, pItem); if (curcount + count > uint32(limitEntry->maxCount)) |