diff --git a/Source/Framework/Database/Databases/HotfixDatabase.cs b/Source/Framework/Database/Databases/HotfixDatabase.cs index 98745eef2..ea8698b3b 100644 --- a/Source/Framework/Database/Databases/HotfixDatabase.cs +++ b/Source/Framework/Database/Databases/HotfixDatabase.cs @@ -341,6 +341,11 @@ namespace Framework.Database PrepareStatement(HotfixStatements.SEL_CRITERIA_TREE, "SELECT ID, Description, Parent, Amount, Operator, CriteriaID, OrderIndex, Flags FROM criteria_tree"); PrepareStatement(HotfixStatements.SEL_CRITERIA_TREE_LOCALE, "SELECT ID, Description_lang FROM criteria_tree_locale WHERE locale = ?"); + // CurrencyContainer.db2 + PrepareStatement(HotfixStatements.SEL_CURRENCY_CONTAINER, "SELECT ID, ContainerName, ContainerDescription, MinAmount, MaxAmount, ContainerIconID, " + + "ContainerQuality, OnLootSpellVisualKitID, CurrencyTypesID FROM currency_container"); + PrepareStatement(HotfixStatements.SEL_CURRENCY_CONTAINER_LOCALE, "SELECT ID, ContainerName_lang, ContainerDescription_lang FROM currency_container_locale WHERE locale = ?"); + // CurrencyTypes.db2 PrepareStatement(HotfixStatements.SEL_CURRENCY_TYPES, "SELECT ID, Name, Description, CategoryID, InventoryIconFileID, SpellWeight, SpellCategory, MaxQty, " + "MaxEarnablePerWeek, Quality, FactionID, ItemGroupSoundsID, XpQuestDifficulty, AwardConditionID, MaxQtyWorldStateID, Flags1, Flags2 FROM currency_types"); @@ -464,6 +469,14 @@ namespace Framework.Database PrepareStatement(HotfixStatements.SEL_GARR_FOLLOWER_X_ABILITY, "SELECT ID, OrderIndex, FactionIndex, GarrAbilityID, GarrFollowerID" + " FROM garr_follower_x_ability"); + // GarrMission.db2 + PrepareStatement(HotfixStatements.SEL_GARR_MISSION, "SELECT ID, Name, Location, Description, MapPosX, MapPosY, WorldPosX, WorldPosY, GarrTypeID, " + + "GarrMissionTypeID, GarrFollowerTypeID, MaxFollowers, MissionCost, MissionCostCurrencyTypesID, OfferedGarrMissionTextureID, UiTextureKitID, " + + "EnvGarrMechanicID, EnvGarrMechanicTypeID, PlayerConditionID, GarrMissionSetID, TargetLevel, TargetItemLevel, MissionDuration, " + + "TravelDuration, OfferDuration, BaseCompletionChance, BaseFollowerXP, OvermaxRewardPackID, FollowerDeathChance, AreaID, Flags, " + + "AutoMissionScalar, AutoMissionScalarCurveID, AutoCombatantEnvCasterID FROM garr_mission"); + PrepareStatement(HotfixStatements.SEL_GARR_MISSION_LOCALE, "SELECT ID, Name_lang, Location_lang, Description_lang FROM garr_mission_locale WHERE locale = ?"); + // GarrPlot.db2 PrepareStatement(HotfixStatements.SEL_GARR_PLOT, "SELECT ID, Name, PlotType, HordeConstructObjID, AllianceConstructObjID, Flags, UiCategoryID, " + "UpgradeRequirement1, UpgradeRequirement2 FROM garr_plot"); @@ -687,10 +700,35 @@ namespace Framework.Database // ItemXItemEffect.db2 PrepareStatement(HotfixStatements.SEL_ITEM_X_ITEM_EFFECT, "SELECT ID, ItemEffectID, ItemID FROM item_x_item_effect"); + // JournalEncounter.db2 + PrepareStatement(HotfixStatements.SEL_JOURNAL_ENCOUNTER, "SELECT Name, Description, MapX, MapY, ID, JournalInstanceID, DungeonEncounterID, OrderIndex, " + + "FirstSectionID, UiMapID, MapDisplayConditionID, Flags, DifficultyMask FROM journal_encounter"); + PrepareStatement(HotfixStatements.SEL_JOURNAL_ENCOUNTER_LOCALE, "SELECT ID, Name_lang, Description_lang FROM journal_encounter_locale WHERE locale = ?"); + + // JournalEncounterSection.db2 + PrepareStatement(HotfixStatements.SEL_JOURNAL_ENCOUNTER_SECTION, "SELECT ID, Title, BodyText, JournalEncounterID, OrderIndex, ParentSectionID, " + + "FirstChildSectionID, NextSiblingSectionID, Type, IconCreatureDisplayInfoID, UiModelSceneID, SpellID, IconFileDataID, Flags, IconFlags, " + + "DifficultyMask FROM journal_encounter_section"); + PrepareStatement(HotfixStatements.SEL_JOURNAL_ENCOUNTER_SECTION_LOCALE, "SELECT ID, Title_lang, BodyText_lang FROM journal_encounter_section_locale WHERE locale = ?"); + + // JournalInstance.db2 + PrepareStatement(HotfixStatements.SEL_JOURNAL_INSTANCE, "SELECT ID, Name, Description, MapID, BackgroundFileDataID, ButtonFileDataID, " + + "ButtonSmallFileDataID, LoreFileDataID, OrderIndex, Flags, AreaID FROM journal_instance"); + PrepareStatement(HotfixStatements.SEL_JOURNAL_INSTANCE_LOCALE, "SELECT ID, Name_lang, Description_lang FROM journal_instance_locale WHERE locale = ?"); + + // JournalTier.db2 + PrepareStatement(HotfixStatements.SEL_JOURNAL_TIER, "SELECT ID, Name, PlayerConditionID FROM journal_tier"); + PrepareStatement(HotfixStatements.SEL_JOURNAL_TIER_LOCALE, "SELECT ID, Name_lang FROM journal_tier_locale WHERE locale = ?"); + + // Keychain.db2 PrepareStatement(HotfixStatements.SEL_KEYCHAIN, "SELECT ID, Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8, Key9, Key10, Key11, Key12, Key13, Key14, Key15, " + "Key16, Key17, Key18, Key19, Key20, Key21, Key22, Key23, Key24, Key25, Key26, Key27, Key28, Key29, Key30, Key31, Key32 FROM keychain"); + // KeystoneAffix.db2 + PrepareStatement(HotfixStatements.SEL_KEYSTONE_AFFIX, "SELECT ID, Name, Description, FiledataID FROM keystone_affix"); + PrepareStatement(HotfixStatements.SEL_KEYSTONE_AFFIX_LOCALE, "SELECT ID, Name_lang, Description_lang FROM keystone_affix_locale WHERE locale = ?"); + // LanguageWords.db2 PrepareStatement(HotfixStatements.SEL_LANGUAGE_WORDS, "SELECT ID, Word, LanguageID FROM language_words"); @@ -733,6 +771,10 @@ namespace Framework.Database PrepareStatement(HotfixStatements.SEL_MAP_LOCALE, "SELECT ID, MapName_lang, MapDescription0_lang, MapDescription1_lang, PvpShortDescription_lang, " + "PvpLongDescription_lang FROM map_locale WHERE locale = ?"); + // MapChallengeMode.db2 + PrepareStatement(HotfixStatements.SEL_MAP_CHALLENGE_MODE, "SELECT Name, ID, MapID, Flags, ExpansionLevel, CriteriaCount1, CriteriaCount2, CriteriaCount3 FROM map_challenge_mode"); + PrepareStatement(HotfixStatements.SEL_MAP_CHALLENGE_MODE_LOCALE, "SELECT ID, Name_lang FROM map_challenge_mode_locale WHERe locale = ?"); + // MapDifficulty.db2 PrepareStatement(HotfixStatements.SEL_MAP_DIFFICULTY, "SELECT ID, Message, DifficultyID, LockID, ResetInterval, MaxPlayers, ItemContext, " + "ItemContextPickerID, Flags, ContentTuningID, MapID FROM map_difficulty"); @@ -743,6 +785,9 @@ namespace Framework.Database " FROM map_difficulty_x_condition"); PrepareStatement(HotfixStatements.SEL_MAP_DIFFICULTY_X_CONDITION_LOCALE, "SELECT ID, FailureDescription_lang FROM map_difficulty_x_condition_locale WHERE locale = ?"); + // MawPower.db2 + PrepareStatement(HotfixStatements.SEL_MAW_POWER, "SELECT ID, SpellID, MawPowerRarityID FROM maw_power"); + // ModifierTree.db2 PrepareStatement(HotfixStatements.SEL_MODIFIER_TREE, "SELECT ID, Parent, Operator, Amount, Type, Asset, SecondaryAsset, TertiaryAsset FROM modifier_tree"); @@ -926,6 +971,9 @@ namespace Framework.Database PrepareStatement(HotfixStatements.SEL_SKILL_RACE_CLASS_INFO, "SELECT ID, RaceMask, SkillID, ClassMask, Flags, Availability, MinLevel, SkillTierID" + " FROM skill_race_class_info"); + // SoulbindConduitRank.db2 + PrepareStatement(HotfixStatements.SEL_SOULBIND_CONDUIT_RANK, "SELECT ID, RankIndex, SpellID, AuraPointsOverride, SoulbindConduitID FROM soulbind_conduit_rank"); + // SoundKit.db2 PrepareStatement(HotfixStatements.SEL_SOUND_KIT, "SELECT ID, SoundType, VolumeFloat, Flags, MinDistance, DistanceCutoff, EAXDef, SoundKitAdvancedID, " + "VolumeVariationPlus, VolumeVariationMinus, PitchVariationPlus, PitchVariationMinus, DialogType, PitchAdjust, BusOverwriteID, MaxInstances" + @@ -1378,6 +1426,9 @@ namespace Framework.Database SEL_CRITERIA_TREE, SEL_CRITERIA_TREE_LOCALE, + SEL_CURRENCY_CONTAINER, + SEL_CURRENCY_CONTAINER_LOCALE, + SEL_CURRENCY_TYPES, SEL_CURRENCY_TYPES_LOCALE, @@ -1439,6 +1490,9 @@ namespace Framework.Database SEL_GARR_FOLLOWER_X_ABILITY, + SEL_GARR_MISSION, + SEL_GARR_MISSION_LOCALE, + SEL_GARR_PLOT, SEL_GARR_PLOT_BUILDING, @@ -1561,8 +1615,23 @@ namespace Framework.Database SEL_ITEM_X_ITEM_EFFECT, + SEL_JOURNAL_ENCOUNTER, + SEL_JOURNAL_ENCOUNTER_LOCALE, + + SEL_JOURNAL_ENCOUNTER_SECTION, + SEL_JOURNAL_ENCOUNTER_SECTION_LOCALE, + + SEL_JOURNAL_INSTANCE, + SEL_JOURNAL_INSTANCE_LOCALE, + + SEL_JOURNAL_TIER, + SEL_JOURNAL_TIER_LOCALE, + SEL_KEYCHAIN, + SEL_KEYSTONE_AFFIX, + SEL_KEYSTONE_AFFIX_LOCALE, + SEL_LANGUAGE_WORDS, SEL_LANGUAGES, @@ -1583,12 +1652,17 @@ namespace Framework.Database SEL_MAP, SEL_MAP_LOCALE, + SEL_MAP_CHALLENGE_MODE, + SEL_MAP_CHALLENGE_MODE_LOCALE, + SEL_MAP_DIFFICULTY, SEL_MAP_DIFFICULTY_LOCALE, SEL_MAP_DIFFICULTY_X_CONDITION, SEL_MAP_DIFFICULTY_X_CONDITION_LOCALE, + SEL_MAW_POWER, + SEL_MODIFIER_TREE, SEL_MOUNT, @@ -1691,6 +1765,8 @@ namespace Framework.Database SEL_SKILL_RACE_CLASS_INFO, + SEL_SOULBIND_CONDUIT_RANK, + SEL_SOUND_KIT, SEL_SPECIALIZATION_SPELLS, diff --git a/Source/Game/DataStorage/CliDB.cs b/Source/Game/DataStorage/CliDB.cs index e1d4bc2f2..3ef3cd502 100644 --- a/Source/Game/DataStorage/CliDB.cs +++ b/Source/Game/DataStorage/CliDB.cs @@ -125,6 +125,7 @@ namespace Game.DataStorage CreatureTypeStorage = ReadDB2("CreatureType.db2", HotfixStatements.SEL_CREATURE_TYPE, HotfixStatements.SEL_CREATURE_TYPE_LOCALE); CriteriaStorage = ReadDB2("Criteria.db2", HotfixStatements.SEL_CRITERIA); CriteriaTreeStorage = ReadDB2("CriteriaTree.db2", HotfixStatements.SEL_CRITERIA_TREE, HotfixStatements.SEL_CRITERIA_TREE_LOCALE); + CurrencyContainerStorage = ReadDB2("CurrencyContainer.db2", HotfixStatements.SEL_CURRENCY_CONTAINER, HotfixStatements.SEL_CURRENCY_CONTAINER_LOCALE); CurrencyTypesStorage = ReadDB2("CurrencyTypes.db2", HotfixStatements.SEL_CURRENCY_TYPES, HotfixStatements.SEL_CURRENCY_TYPES_LOCALE); CurveStorage = ReadDB2("Curve.db2", HotfixStatements.SEL_CURVE); CurvePointStorage = ReadDB2("CurvePoint.db2", HotfixStatements.SEL_CURVE_POINT); @@ -150,6 +151,7 @@ namespace Game.DataStorage GarrClassSpecStorage = ReadDB2("GarrClassSpec.db2", HotfixStatements.SEL_GARR_CLASS_SPEC, HotfixStatements.SEL_GARR_CLASS_SPEC_LOCALE); GarrFollowerStorage = ReadDB2("GarrFollower.db2", HotfixStatements.SEL_GARR_FOLLOWER, HotfixStatements.SEL_GARR_FOLLOWER_LOCALE); GarrFollowerXAbilityStorage = ReadDB2("GarrFollowerXAbility.db2", HotfixStatements.SEL_GARR_FOLLOWER_X_ABILITY); + GarrMissionStorage = ReadDB2("GarrMission.db2", HotfixStatements.SEL_GARR_MISSION, HotfixStatements.SEL_GARR_MISSION_LOCALE); GarrPlotStorage = ReadDB2("GarrPlot.db2", HotfixStatements.SEL_GARR_PLOT); GarrPlotBuildingStorage = ReadDB2("GarrPlotBuilding.db2", HotfixStatements.SEL_GARR_PLOT_BUILDING); GarrPlotInstanceStorage = ReadDB2("GarrPlotInstance.db2", HotfixStatements.SEL_GARR_PLOT_INSTANCE); @@ -207,7 +209,12 @@ namespace Game.DataStorage ItemSpecOverrideStorage = ReadDB2("ItemSpecOverride.db2", HotfixStatements.SEL_ITEM_SPEC_OVERRIDE); ItemXBonusTreeStorage = ReadDB2("ItemXBonusTree.db2", HotfixStatements.SEL_ITEM_X_BONUS_TREE); ItemXItemEffectStorage = ReadDB2("ItemXItemEffect.db2", HotfixStatements.SEL_ITEM_X_ITEM_EFFECT); + JournalEncounterStorage = ReadDB2("JournalEncounter.db2", HotfixStatements.SEL_JOURNAL_ENCOUNTER, HotfixStatements.SEL_JOURNAL_ENCOUNTER_LOCALE); + JournalEncounterSectionStorage = ReadDB2("JournalEncounterSection.db2", HotfixStatements.SEL_JOURNAL_ENCOUNTER_SECTION, HotfixStatements.SEL_JOURNAL_ENCOUNTER_SECTION_LOCALE); + JournalInstanceStorage = ReadDB2("JournalInstance.db2", HotfixStatements.SEL_JOURNAL_INSTANCE, HotfixStatements.SEL_JOURNAL_INSTANCE_LOCALE); + JournalTierStorage = ReadDB2("JournalTier.db2", HotfixStatements.SEL_JOURNAL_TIER, HotfixStatements.SEL_JOURNAL_TIER_LOCALE); //KeyChainStorage = ReadDB2("KeyChain.db2", HotfixStatements.SEL_KEYCHAIN); + KeystoneAffixStorage = ReadDB2("KeystoneAffix.db2", HotfixStatements.SEL_KEYSTONE_AFFIX, HotfixStatements.SEL_KEYSTONE_AFFIX_LOCALE); LanguageWordsStorage = ReadDB2("LanguageWords.db2", HotfixStatements.SEL_LANGUAGE_WORDS); LanguagesStorage = ReadDB2("Languages.db2", HotfixStatements.SEL_LANGUAGES, HotfixStatements.SEL_LANGUAGES_LOCALE); LFGDungeonsStorage = ReadDB2("LFGDungeons.db2", HotfixStatements.SEL_LFG_DUNGEONS, HotfixStatements.SEL_LFG_DUNGEONS_LOCALE); @@ -216,8 +223,10 @@ namespace Game.DataStorage LockStorage = ReadDB2("Lock.db2", HotfixStatements.SEL_LOCK); MailTemplateStorage = ReadDB2("MailTemplate.db2", HotfixStatements.SEL_MAIL_TEMPLATE, HotfixStatements.SEL_MAIL_TEMPLATE_LOCALE); MapStorage = ReadDB2("Map.db2", HotfixStatements.SEL_MAP, HotfixStatements.SEL_MAP_LOCALE); + MapChallengeModeStorage = ReadDB2("MapChallengeMode.db2", HotfixStatements.SEL_MAP_CHALLENGE_MODE, HotfixStatements.SEL_MAP_CHALLENGE_MODE_LOCALE); MapDifficultyStorage = ReadDB2("MapDifficulty.db2", HotfixStatements.SEL_MAP_DIFFICULTY, HotfixStatements.SEL_MAP_DIFFICULTY_LOCALE); MapDifficultyXConditionStorage = ReadDB2("MapDifficultyXCondition.db2", HotfixStatements.SEL_MAP_DIFFICULTY_X_CONDITION, HotfixStatements.SEL_MAP_DIFFICULTY_X_CONDITION_LOCALE); + MawPowerStorage = ReadDB2("MawPower.db2", HotfixStatements.SEL_MAW_POWER); ModifierTreeStorage = ReadDB2("ModifierTree.db2", HotfixStatements.SEL_MODIFIER_TREE); MountCapabilityStorage = ReadDB2("MountCapability.db2", HotfixStatements.SEL_MOUNT_CAPABILITY); MountStorage = ReadDB2("Mount.db2", HotfixStatements.SEL_MOUNT, HotfixStatements.SEL_MOUNT_LOCALE); @@ -264,6 +273,7 @@ namespace Game.DataStorage SkillLineStorage = ReadDB2("SkillLine.db2", HotfixStatements.SEL_SKILL_LINE, HotfixStatements.SEL_SKILL_LINE_LOCALE); SkillLineAbilityStorage = ReadDB2("SkillLineAbility.db2", HotfixStatements.SEL_SKILL_LINE_ABILITY); SkillRaceClassInfoStorage = ReadDB2("SkillRaceClassInfo.db2", HotfixStatements.SEL_SKILL_RACE_CLASS_INFO); + SoulbindConduitRankStorage = ReadDB2("SoulbindConduitRank.db2", HotfixStatements.SEL_SOULBIND_CONDUIT_RANK); SoundKitStorage = ReadDB2("SoundKit.db2", HotfixStatements.SEL_SOUND_KIT); SpecializationSpellsStorage = ReadDB2("SpecializationSpells.db2", HotfixStatements.SEL_SPECIALIZATION_SPELLS, HotfixStatements.SEL_SPECIALIZATION_SPELLS_LOCALE); SpecSetMemberStorage = ReadDB2("SpecSetMember.db2", HotfixStatements.SEL_SPEC_SET_MEMBER); @@ -499,6 +509,7 @@ namespace Game.DataStorage public static DB6Storage CreatureTypeStorage; public static DB6Storage CriteriaStorage; public static DB6Storage CriteriaTreeStorage; + public static DB6Storage CurrencyContainerStorage; public static DB6Storage CurrencyTypesStorage; public static DB6Storage CurveStorage; public static DB6Storage CurvePointStorage; @@ -524,6 +535,7 @@ namespace Game.DataStorage public static DB6Storage GarrClassSpecStorage; public static DB6Storage GarrFollowerStorage; public static DB6Storage GarrFollowerXAbilityStorage; + public static DB6Storage GarrMissionStorage; public static DB6Storage GarrPlotBuildingStorage; public static DB6Storage GarrPlotStorage; public static DB6Storage GarrPlotInstanceStorage; @@ -581,7 +593,12 @@ namespace Game.DataStorage public static DB6Storage ItemSpecOverrideStorage; public static DB6Storage ItemXBonusTreeStorage; public static DB6Storage ItemXItemEffectStorage; + public static DB6Storage JournalEncounterStorage; + public static DB6Storage JournalEncounterSectionStorage; + public static DB6Storage JournalInstanceStorage; + public static DB6Storage JournalTierStorage; //public static DB6Storage KeyChainStorage; + public static DB6Storage KeystoneAffixStorage; public static DB6Storage LanguageWordsStorage; public static DB6Storage LanguagesStorage; public static DB6Storage LFGDungeonsStorage; @@ -590,8 +607,10 @@ namespace Game.DataStorage public static DB6Storage LockStorage; public static DB6Storage MailTemplateStorage; public static DB6Storage MapStorage; + public static DB6Storage MapChallengeModeStorage; public static DB6Storage MapDifficultyStorage; public static DB6Storage MapDifficultyXConditionStorage; + public static DB6Storage MawPowerStorage; public static DB6Storage ModifierTreeStorage; public static DB6Storage MountCapabilityStorage; public static DB6Storage MountStorage; @@ -638,6 +657,7 @@ namespace Game.DataStorage public static DB6Storage SkillLineStorage; public static DB6Storage SkillLineAbilityStorage; public static DB6Storage SkillRaceClassInfoStorage; + public static DB6Storage SoulbindConduitRankStorage; public static DB6Storage SoundKitStorage; public static DB6Storage SpecializationSpellsStorage; public static DB6Storage SpecSetMemberStorage; diff --git a/Source/Game/DataStorage/DB2Manager.cs b/Source/Game/DataStorage/DB2Manager.cs index 91e7f1b2b..5e7204c1f 100644 --- a/Source/Game/DataStorage/DB2Manager.cs +++ b/Source/Game/DataStorage/DB2Manager.cs @@ -249,6 +249,9 @@ namespace Game.DataStorage _expectedStatModsByContentTuning.Add(contentTuningXExpectedStat.ContentTuningID, contentTuningXExpectedStat); } + foreach (CurrencyContainerRecord currencyContainer in CurrencyContainerStorage.Values) + _currencyContainers.Add(currencyContainer.CurrencyTypesID, currencyContainer); + foreach (CurvePointRecord curvePoint in CurvePointStorage.Values) { if (CurveStorage.ContainsKey(curvePoint.CurveID)) @@ -342,6 +345,9 @@ namespace Game.DataStorage foreach (var pair in _azeriteEmpoweredItems) LoadAzeriteEmpoweredItemUnlockMappings(azeriteUnlockMappings, pair.Key); + foreach (JournalTierRecord journalTier in JournalTierStorage.Values) + _journalTiersByIndex.Add(journalTier); + foreach (MapDifficultyRecord entry in MapDifficultyStorage.Values) { if (!_mapDifficulties.ContainsKey(entry.MapID)) @@ -488,6 +494,9 @@ namespace Game.DataStorage _skillRaceClassInfoBySkill.Add((uint)entry.SkillID, entry); } + foreach (SoulbindConduitRankRecord soulbindConduitRank in SoulbindConduitRankStorage.Values) + _soulbindConduitRanks[Tuple.Create((int)soulbindConduitRank.SoulbindConduitID, soulbindConduitRank.RankIndex)] = soulbindConduitRank; + foreach (var specSpells in SpecializationSpellsStorage.Values) _specializationSpellsBySpec.Add(specSpells.SpecID, specSpells); @@ -523,6 +532,9 @@ namespace Game.DataStorage foreach (ToyRecord toy in ToyStorage.Values) _toys.Add(toy.ItemID); + foreach (TransmogIllusionRecord transmogIllusion in TransmogIllusionStorage.Values) + _transmogIllusionsByEnchantmentId[(uint)transmogIllusion.SpellItemEnchantmentID] = transmogIllusion; + foreach (TransmogSetItemRecord transmogSetItem in TransmogSetItemStorage.Values) { TransmogSetRecord set = TransmogSetStorage.LookupByKey(transmogSetItem.TransmogSetID); @@ -1068,6 +1080,15 @@ namespace Game.DataStorage return petFamily.Name[locale][0] != '\0' ? petFamily.Name[locale] : ""; } + public CurrencyContainerRecord GetCurrencyContainerForCurrencyQuantity(uint currencyId, int quantity) + { + foreach (var record in _currencyContainers.LookupByKey(currencyId)) + if (quantity >= record.MinAmount && (record.MaxAmount == 0 || quantity <= record.MaxAmount)) + return record; + + return null; + } + static CurveInterpolationMode DetermineCurveType(CurveRecord curve, List points) { switch (curve.Type) @@ -1624,6 +1645,13 @@ namespace Game.DataStorage return _itemSpecOverrides.LookupByKey(itemId); } + public JournalTierRecord GetJournalTier(uint index) + { + if (index < _journalTiersByIndex.Count) + return _journalTiersByIndex[(int)index]; + return null; + } + public LFGDungeonsRecord GetLfgDungeon(uint mapId, Difficulty difficulty) { foreach (LFGDungeonsRecord dungeon in LFGDungeonsStorage.Values) @@ -1956,6 +1984,11 @@ namespace Game.DataStorage return null; } + public SoulbindConduitRankRecord GetSoulbindConduitRank(int soulbindConduitId, int rank) + { + return _soulbindConduitRanks.LookupByKey(Tuple.Create(soulbindConduitId, rank)); + } + public List GetSpecializationSpells(uint specId) { return _specializationSpellsBySpec.LookupByKey(specId); @@ -2006,6 +2039,11 @@ namespace Game.DataStorage return _toys.Contains(toy); } + public TransmogIllusionRecord GetTransmogIllusionForEnchantment(uint spellItemEnchantmentId) + { + return _transmogIllusionsByEnchantmentId.LookupByKey(spellItemEnchantmentId); + } + public List GetTransmogSetsForItemModifiedAppearance(uint itemModifiedAppearanceId) { return _transmogSetsByItemModifiedAppearance.LookupByKey(itemModifiedAppearanceId); @@ -2324,6 +2362,7 @@ namespace Game.DataStorage MultiMap, ChrCustomizationOptionRecord> _chrCustomizationOptionsByRaceAndGender = new(); Dictionary> _chrCustomizationRequiredChoices = new(); ChrSpecializationRecord[][] _chrSpecializationsByIndex = new ChrSpecializationRecord[(int)Class.Max + 1][]; + MultiMap _currencyContainers = new(); MultiMap _curvePoints = new(); Dictionary, EmotesTextSoundRecord> _emoteTextSounds = new(); Dictionary, ExpectedStatRecord> _expectedStatsByLevel = new(); @@ -2345,6 +2384,7 @@ namespace Game.DataStorage MultiMap _itemToBonusTree = new(); MultiMap _itemSetSpells = new(); MultiMap _itemSpecOverrides = new(); + List _journalTiersByIndex = new(); Dictionary> _mapDifficulties = new(); MultiMap> _mapDifficultyConditions = new(); Dictionary _mountsBySpellId = new(); @@ -2364,12 +2404,14 @@ namespace Game.DataStorage MultiMap _skillLinesByParentSkillLine = new(); MultiMap _skillLineAbilitiesBySkillupSkill = new(); MultiMap _skillRaceClassInfoBySkill = new(); + Dictionary, SoulbindConduitRankRecord> _soulbindConduitRanks = new(); MultiMap _specializationSpellsBySpec = new(); List> _specsBySpecSet = new(); List _spellFamilyNames = new(); MultiMap _spellProcsPerMinuteMods = new(); List[][][] _talentsByPosition = new List[(int)Class.Max][][]; List _toys = new(); + Dictionary _transmogIllusionsByEnchantmentId = new(); MultiMap _transmogSetsByItemModifiedAppearance = new(); MultiMap _transmogSetItemsByTransmogSet = new(); Dictionary _uiMapBounds = new(); diff --git a/Source/Game/DataStorage/Structs/C_Records.cs b/Source/Game/DataStorage/Structs/C_Records.cs index 5db6ceaf0..d00a4685d 100644 --- a/Source/Game/DataStorage/Structs/C_Records.cs +++ b/Source/Game/DataStorage/Structs/C_Records.cs @@ -505,6 +505,19 @@ namespace Game.DataStorage public CriteriaTreeFlags Flags; } + public sealed class CurrencyContainerRecord + { + public uint Id; + public LocalizedString ContainerName; + public LocalizedString ContainerDescription; + public int MinAmount; + public int MaxAmount; + public int ContainerIconID; + public int ContainerQuality; + public int OnLootSpellVisualKitID; + public uint CurrencyTypesID; + } + public sealed class CurrencyTypesRecord { public uint Id; diff --git a/Source/Game/DataStorage/Structs/G_Records.cs b/Source/Game/DataStorage/Structs/G_Records.cs index e31f0afb7..938794b52 100644 --- a/Source/Game/DataStorage/Structs/G_Records.cs +++ b/Source/Game/DataStorage/Structs/G_Records.cs @@ -166,6 +166,42 @@ namespace Game.DataStorage public uint GarrFollowerID; } + public sealed class GarrMissionRecord + { + public uint Id; + public LocalizedString Name; + public LocalizedString Location; + public LocalizedString Description; + public Vector2 MapPos; + public Vector2 WorldPos; + public byte GarrTypeID; + public byte GarrMissionTypeID; + public byte GarrFollowerTypeID; + public byte MaxFollowers; + public uint MissionCost; + public ushort MissionCostCurrencyTypesID; + public byte OfferedGarrMissionTextureID; + public ushort UiTextureKitID; + public uint EnvGarrMechanicID; + public int EnvGarrMechanicTypeID; + public uint PlayerConditionID; + public int GarrMissionSetID; + public sbyte TargetLevel; + public ushort TargetItemLevel; + public int MissionDuration; + public int TravelDuration; + public uint OfferDuration; + public byte BaseCompletionChance; + public uint BaseFollowerXP; + public uint OvermaxRewardPackID; + public byte FollowerDeathChance; + public uint AreaID; + public uint Flags; + public float AutoMissionScalar; + public int AutoMissionScalarCurveID; + public int AutoCombatantEnvCasterID; + } + public sealed class GarrPlotRecord { public uint Id; diff --git a/Source/Game/DataStorage/Structs/J_Records.cs b/Source/Game/DataStorage/Structs/J_Records.cs new file mode 100644 index 000000000..280b3f76b --- /dev/null +++ b/Source/Game/DataStorage/Structs/J_Records.cs @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2012-2020 CypherCore + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +using Framework.Constants; +using Framework.GameMath; + +namespace Game.DataStorage +{ + public sealed class JournalEncounterRecord + { + public LocalizedString Name; + public LocalizedString Description; + public Vector2 Map; + public uint Id; + public ushort JournalInstanceID; + public ushort DungeonEncounterID; + public uint OrderIndex; + public ushort FirstSectionID; + public ushort UiMapID; + public uint MapDisplayConditionID; + public byte Flags; + public sbyte DifficultyMask; + } + + public sealed class JournalEncounterSectionRecord + { + public uint Id; + public LocalizedString Title; + public LocalizedString BodyText; + public ushort JournalEncounterID; + public byte OrderIndex; + public ushort ParentSectionID; + public ushort FirstChildSectionID; + public ushort NextSiblingSectionID; + public byte Type; + public uint IconCreatureDisplayInfoID; + public int UiModelSceneID; + public int SpellID; + public int IconFileDataID; + public ushort Flags; + public ushort IconFlags; + public sbyte DifficultyMask; + } + + public sealed class JournalInstanceRecord + { + public uint Id; + public LocalizedString Name; + public LocalizedString Description; + public ushort MapID; + public int BackgroundFileDataID; + public int ButtonFileDataID; + public int ButtonSmallFileDataID; + public int LoreFileDataID; + public byte OrderIndex; + public byte Flags; + public ushort AreaID; + } + + public sealed class JournalTierRecord + { + public uint Id; + public LocalizedString Name; + public int PlayerConditionID; + } +} diff --git a/Source/Game/DataStorage/Structs/K_Records.cs b/Source/Game/DataStorage/Structs/K_Records.cs index 2cb18613e..38bd4e3d3 100644 --- a/Source/Game/DataStorage/Structs/K_Records.cs +++ b/Source/Game/DataStorage/Structs/K_Records.cs @@ -22,4 +22,12 @@ namespace Game.DataStorage public uint Id; public byte[] Key = new byte[32]; } + + public sealed class KeystoneAffixRecord + { + public uint Id; + public LocalizedString Name; + public LocalizedString Description; + public int FiledataID; + } } diff --git a/Source/Game/DataStorage/Structs/M_Records.cs b/Source/Game/DataStorage/Structs/M_Records.cs index cdbbbf00c..3eb461237 100644 --- a/Source/Game/DataStorage/Structs/M_Records.cs +++ b/Source/Game/DataStorage/Structs/M_Records.cs @@ -91,6 +91,16 @@ namespace Game.DataStorage public bool IsGarrison() { return (Flags[0] & MapFlags.Garrison) != 0; } } + public sealed class MapChallengeModeRecord + { + public LocalizedString Name; + public uint Id; + public ushort MapID; + public byte Flags; + public uint ExpansionLevel; + public short[] CriteriaCount = new short[3]; + } + public sealed class MapDifficultyRecord { public uint Id; @@ -124,6 +134,13 @@ namespace Game.DataStorage public uint MapDifficultyID; } + public sealed class MawPowerRecord + { + public uint Id; + public int SpellID; + public int MawPowerRarityID; + } + public sealed class ModifierTreeRecord { public uint Id; diff --git a/Source/Game/DataStorage/Structs/S_Records.cs b/Source/Game/DataStorage/Structs/S_Records.cs index cd47a8287..c899d6809 100644 --- a/Source/Game/DataStorage/Structs/S_Records.cs +++ b/Source/Game/DataStorage/Structs/S_Records.cs @@ -128,6 +128,15 @@ namespace Game.DataStorage public ushort SkillTierID; } + public sealed class SoulbindConduitRankRecord + { + public uint Id; + public int RankIndex; + public int SpellID; + public float AuraPointsOverride; + public uint SoulbindConduitID; + } + public sealed class SoundKitRecord { public uint Id;