Core/Items: Implemented ItemLimitCategoryCondition.db2

This commit is contained in:
hondacrx
2018-04-18 19:43:29 -04:00
parent 9b927f8093
commit ef05e1f113
7 changed files with 59 additions and 7 deletions
+2
View File
@@ -144,6 +144,7 @@ namespace Game.DataStorage
ItemLevelSelectorQualityStorage = DBReader.Read<ItemLevelSelectorQualityRecord>("ItemLevelSelectorQuality.db2", HotfixStatements.SEL_ITEM_LEVEL_SELECTOR_QUALITY);
ItemLevelSelectorQualitySetStorage = DBReader.Read<ItemLevelSelectorQualitySetRecord>("ItemLevelSelectorQualitySet.db2", HotfixStatements.SEL_ITEM_LEVEL_SELECTOR_QUALITY_SET);
ItemLimitCategoryStorage = DBReader.Read<ItemLimitCategoryRecord>("ItemLimitCategory.db2", HotfixStatements.SEL_ITEM_LIMIT_CATEGORY, HotfixStatements.SEL_ITEM_LIMIT_CATEGORY_LOCALE);
ItemLimitCategoryConditionStorage = DBReader.Read<ItemLimitCategoryConditionRecord>("ItemLimitCategoryCondition.db2", HotfixStatements.SEL_ITEM_LIMIT_CATEGORY_CONDITION);
ItemModifiedAppearanceStorage = DBReader.Read<ItemModifiedAppearanceRecord>("ItemModifiedAppearance.db2", HotfixStatements.SEL_ITEM_MODIFIED_APPEARANCE);
ItemPriceBaseStorage = DBReader.Read<ItemPriceBaseRecord>("ItemPriceBase.db2", HotfixStatements.SEL_ITEM_PRICE_BASE);
ItemRandomPropertiesStorage = DBReader.Read<ItemRandomPropertiesRecord>("ItemRandomProperties.db2", HotfixStatements.SEL_ITEM_RANDOM_PROPERTIES, HotfixStatements.SEL_ITEM_RANDOM_PROPERTIES_LOCALE);
@@ -476,6 +477,7 @@ namespace Game.DataStorage
public static DB6Storage<ItemLevelSelectorQualityRecord> ItemLevelSelectorQualityStorage;
public static DB6Storage<ItemLevelSelectorQualitySetRecord> ItemLevelSelectorQualitySetStorage;
public static DB6Storage<ItemLimitCategoryRecord> ItemLimitCategoryStorage;
public static DB6Storage<ItemLimitCategoryConditionRecord> ItemLimitCategoryConditionStorage;
public static DB6Storage<ItemModifiedAppearanceRecord> ItemModifiedAppearanceStorage;
public static DB6Storage<ItemPriceBaseRecord> ItemPriceBaseStorage;
public static DB6Storage<ItemRandomPropertiesRecord> ItemRandomPropertiesStorage;
+9
View File
@@ -227,6 +227,9 @@ namespace Game.DataStorage
CliDB.ItemCurrencyCostStorage.Clear();
foreach (ItemLimitCategoryConditionRecord condition in CliDB.ItemLimitCategoryConditionStorage.Values)
_itemCategoryConditions.Add((uint)condition.ParentItemLimitCategoryID, condition);
foreach (ItemLevelSelectorQualityRecord itemLevelSelectorQuality in CliDB.ItemLevelSelectorQualityStorage.Values)
_itemLevelQualitySelectorQualities.Add(itemLevelSelectorQuality.ParentILSQualitySetID, itemLevelSelectorQuality);
@@ -944,6 +947,11 @@ namespace Game.DataStorage
return _itemClassByOldEnum[(int)itemClass];
}
public List<ItemLimitCategoryConditionRecord> GetItemLimitCategoryConditions(uint categoryId)
{
return _itemCategoryConditions.LookupByKey(categoryId);
}
public uint GetItemDisplayId(uint itemId, uint appearanceModId)
{
ItemModifiedAppearanceRecord modifiedAppearance = GetItemModifiedAppearance(itemId, appearanceModId);
@@ -1511,6 +1519,7 @@ namespace Game.DataStorage
Dictionary<uint, ItemChildEquipmentRecord> _itemChildEquipment = new Dictionary<uint, ItemChildEquipmentRecord>();
Array<ItemClassRecord> _itemClassByOldEnum = new Array<ItemClassRecord>(19);
List<uint> _itemsWithCurrencyCost = new List<uint>();
MultiMap<uint, ItemLimitCategoryConditionRecord> _itemCategoryConditions = new MultiMap<uint, ItemLimitCategoryConditionRecord>();
MultiMap<uint, ItemLevelSelectorQualityRecord> _itemLevelQualitySelectorQualities = new MultiMap<uint, ItemLevelSelectorQualityRecord>();
Dictionary<uint, ItemModifiedAppearanceRecord> _itemModifiedAppearancesByItem = new Dictionary<uint, ItemModifiedAppearanceRecord>();
MultiMap<uint, uint> _itemToBonusTree = new MultiMap<uint, uint>();
@@ -233,6 +233,14 @@ namespace Game.DataStorage
public byte Flags;
}
public sealed class ItemLimitCategoryConditionRecord
{
public uint Id;
public sbyte AddQuantity;
public uint PlayerConditionID;
public int ParentItemLimitCategoryID;
}
public sealed class ItemModifiedAppearanceRecord
{
public uint ItemID;