diff options
author | SnapperRy <snapperryen@gmail.com> | 2016-10-13 22:36:50 +0200 |
---|---|---|
committer | SnapperRy <snapperryen@gmail.com> | 2016-10-13 22:38:08 +0200 |
commit | 8f09c7e867c0814ca12c72319d01ebcbf4be40af (patch) | |
tree | 404565347131b77167c53f8f65d10a26c2a4a3ec /src | |
parent | f9068a02f059f296f04a76262d5f93716819181f (diff) |
Revert "Core/DBC: fix wrong field type for ItemLimitCategory.dbc."
I messed up, sorry.
This reverts commit 857c7bd06c31109a05cdc93c6d463f0df7978602.
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, 9 insertions, 5 deletions
diff --git a/src/server/game/DataStores/DBCEnums.h b/src/server/game/DataStores/DBCEnums.h index b8440032d83..cb2f26e567f 100644 --- a/src/server/game/DataStores/DBCEnums.h +++ b/src/server/game/DataStores/DBCEnums.h @@ -359,6 +359,12 @@ 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 d93121ae072..c85344b9bd1 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 - char* mode; // 19, "Jeweler's Gems" = have, empty string = equip + uint32 mode; // 19, 0 = have, 1 = equip (enum ItemLimitCategoryMode) }; #define MAX_ITEM_ENCHANTMENT_EFFECTS 3 diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h index 8c2d541aa81..1accc81714b 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[] = "nxxxxxxxxxxxxxxxxxis"; +char const ItemLimitCategoryEntryfmt[] = "nxxxxxxxxxxxxxxxxxii"; 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 d57702bb38c..b61820034ea 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -10233,9 +10233,7 @@ InventoryResult Player::CanTakeMoreSimilarItems(uint32 entry, uint32 count, Item return EQUIP_ERR_ITEM_CANT_BE_EQUIPPED; } - // 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) + if (limitEntry->mode == ITEM_LIMIT_CATEGORY_MODE_HAVE) { uint32 curcount = GetItemCountWithLimitCategory(pProto->ItemLimitCategory, pItem); if (curcount + count > uint32(limitEntry->maxCount)) |