From 97ac3aba05cfc56c6c8a7c5dbfb7071b02239181 Mon Sep 17 00:00:00 2001 From: megamage Date: Sun, 15 Feb 2009 11:58:27 -0600 Subject: Implemented limit category check for item/gem at equip or gem inserting. Author: VladimirMangos --HG-- branch : trunk --- src/shared/Database/DBCStores.cpp | 4 +++- src/shared/Database/DBCStores.h | 1 + src/shared/Database/DBCStructure.h | 9 +++++++++ src/shared/Database/DBCfmt.cpp | 1 + 4 files changed, 14 insertions(+), 1 deletion(-) (limited to 'src/shared') diff --git a/src/shared/Database/DBCStores.cpp b/src/shared/Database/DBCStores.cpp index b4fb79f2dd0..6e49a344b1a 100644 --- a/src/shared/Database/DBCStores.cpp +++ b/src/shared/Database/DBCStores.cpp @@ -81,6 +81,7 @@ DBCStorage sItemStore(Itemfmt); //DBCStorage sItemCondExtCostsStore(ItemCondExtCostsEntryfmt); //DBCStorage sItemDisplayInfoStore(ItemDisplayTemplateEntryfmt); -- not used currently DBCStorage sItemExtendedCostStore(ItemExtendedCostEntryfmt); +DBCStorage sItemLimitCategoryStore(ItemLimitCategoryEntryfmt); DBCStorage sItemRandomPropertiesStore(ItemRandomPropertiesfmt); DBCStorage sItemRandomSuffixStore(ItemRandomSuffixfmt); DBCStorage sItemSetStore(ItemSetEntryfmt); @@ -194,7 +195,7 @@ void LoadDBCStores(const std::string& dataPath) { std::string dbcPath = dataPath+"dbc/"; - const uint32 DBCFilesCount = 71; + const uint32 DBCFilesCount = 72; barGoLink bar( DBCFilesCount ); @@ -271,6 +272,7 @@ void LoadDBCStores(const std::string& dataPath) //LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemDisplayInfoStore, dbcPath,"ItemDisplayInfo.dbc"); -- not used currently //LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemCondExtCostsStore, dbcPath,"ItemCondExtCosts.dbc"); LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemExtendedCostStore, dbcPath,"ItemExtendedCost.dbc"); + LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemLimitCategoryStore, dbcPath,"ItemLimitCategory.dbc"); LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemRandomPropertiesStore,dbcPath,"ItemRandomProperties.dbc"); LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemRandomSuffixStore, dbcPath,"ItemRandomSuffix.dbc"); LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemSetStore, dbcPath,"ItemSet.dbc"); diff --git a/src/shared/Database/DBCStores.h b/src/shared/Database/DBCStores.h index 6aec6db3bed..4a67164a773 100644 --- a/src/shared/Database/DBCStores.h +++ b/src/shared/Database/DBCStores.h @@ -172,6 +172,7 @@ extern DBCStorage sGtRegenMPPerSptStore; extern DBCStorage sItemStore; //extern DBCStorage sItemDisplayInfoStore; -- not used currently extern DBCStorage sItemExtendedCostStore; +extern DBCStorage sItemLimitCategoryStore; extern DBCStorage sItemRandomPropertiesStore; extern DBCStorage sItemRandomSuffixStore; extern DBCStorage sItemSetStore; diff --git a/src/shared/Database/DBCStructure.h b/src/shared/Database/DBCStructure.h index 86079fb417a..4be24d9e24b 100644 --- a/src/shared/Database/DBCStructure.h +++ b/src/shared/Database/DBCStructure.h @@ -877,6 +877,15 @@ struct ItemExtendedCostEntry uint32 reqpersonalarenarating; // 13 required personal arena rating }; +struct ItemLimitCategoryEntry +{ + uint32 ID; // 0 Id + //char* name[16] // 1-16 m_name_lang + // 17 name flags + uint32 maxCount; // max allowed equipped as item or in gem slot + //uint32 unk; // 1 for prismatic gems only... +}; + struct ItemRandomPropertiesEntry { uint32 ID; // 0 m_ID diff --git a/src/shared/Database/DBCfmt.cpp b/src/shared/Database/DBCfmt.cpp index 481303406b1..0420c2b9a85 100644 --- a/src/shared/Database/DBCfmt.cpp +++ b/src/shared/Database/DBCfmt.cpp @@ -59,6 +59,7 @@ const char Itemfmt[]="nixiiiii"; //const char ItemDisplayTemplateEntryfmt[]="nxxxxxxxxxxixxxxxxxxxxx"; //const char ItemCondExtCostsEntryfmt[]="xiii"; const char ItemExtendedCostEntryfmt[]="niiiiiiiiiiiiix"; +const char ItemLimitCategoryEntryfmt[]="nxxxxxxxxxxxxxxxxxix"; const char ItemRandomPropertiesfmt[]="nxiiiiixxxxxxxxxxxxxxxxx"; const char ItemRandomSuffixfmt[]="nxxxxxxxxxxxxxxxxxxiiiiiiiiii"; const char ItemSetEntryfmt[]="dssssssssssssssssxxxxxxxxxxxxxxxxxxiiiiiiiiiiiiiiiiii"; -- cgit v1.2.3