Core/DataStores: Load CurrencyContainer, GarrMission, JournalEncounter, JournalEncounterSection, JournalInstance, JournalTier, KeystoneAffix, MapChallengeMode, MawPower and SoulbindConduitRank

Port From (https://github.com/TrinityCore/TrinityCore/commit/70a62c39785e65711c5068289e2eaba7fc0880c3)
This commit is contained in:
hondacrx
2021-11-03 17:02:14 -04:00
parent dce33d2b71
commit e2673c627d
9 changed files with 301 additions and 0 deletions
@@ -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,
+20
View File
@@ -125,6 +125,7 @@ namespace Game.DataStorage
CreatureTypeStorage = ReadDB2<CreatureTypeRecord>("CreatureType.db2", HotfixStatements.SEL_CREATURE_TYPE, HotfixStatements.SEL_CREATURE_TYPE_LOCALE);
CriteriaStorage = ReadDB2<CriteriaRecord>("Criteria.db2", HotfixStatements.SEL_CRITERIA);
CriteriaTreeStorage = ReadDB2<CriteriaTreeRecord>("CriteriaTree.db2", HotfixStatements.SEL_CRITERIA_TREE, HotfixStatements.SEL_CRITERIA_TREE_LOCALE);
CurrencyContainerStorage = ReadDB2<CurrencyContainerRecord>("CurrencyContainer.db2", HotfixStatements.SEL_CURRENCY_CONTAINER, HotfixStatements.SEL_CURRENCY_CONTAINER_LOCALE);
CurrencyTypesStorage = ReadDB2<CurrencyTypesRecord>("CurrencyTypes.db2", HotfixStatements.SEL_CURRENCY_TYPES, HotfixStatements.SEL_CURRENCY_TYPES_LOCALE);
CurveStorage = ReadDB2<CurveRecord>("Curve.db2", HotfixStatements.SEL_CURVE);
CurvePointStorage = ReadDB2<CurvePointRecord>("CurvePoint.db2", HotfixStatements.SEL_CURVE_POINT);
@@ -150,6 +151,7 @@ namespace Game.DataStorage
GarrClassSpecStorage = ReadDB2<GarrClassSpecRecord>("GarrClassSpec.db2", HotfixStatements.SEL_GARR_CLASS_SPEC, HotfixStatements.SEL_GARR_CLASS_SPEC_LOCALE);
GarrFollowerStorage = ReadDB2<GarrFollowerRecord>("GarrFollower.db2", HotfixStatements.SEL_GARR_FOLLOWER, HotfixStatements.SEL_GARR_FOLLOWER_LOCALE);
GarrFollowerXAbilityStorage = ReadDB2<GarrFollowerXAbilityRecord>("GarrFollowerXAbility.db2", HotfixStatements.SEL_GARR_FOLLOWER_X_ABILITY);
GarrMissionStorage = ReadDB2<GarrMissionRecord>("GarrMission.db2", HotfixStatements.SEL_GARR_MISSION, HotfixStatements.SEL_GARR_MISSION_LOCALE);
GarrPlotStorage = ReadDB2<GarrPlotRecord>("GarrPlot.db2", HotfixStatements.SEL_GARR_PLOT);
GarrPlotBuildingStorage = ReadDB2<GarrPlotBuildingRecord>("GarrPlotBuilding.db2", HotfixStatements.SEL_GARR_PLOT_BUILDING);
GarrPlotInstanceStorage = ReadDB2<GarrPlotInstanceRecord>("GarrPlotInstance.db2", HotfixStatements.SEL_GARR_PLOT_INSTANCE);
@@ -207,7 +209,12 @@ namespace Game.DataStorage
ItemSpecOverrideStorage = ReadDB2<ItemSpecOverrideRecord>("ItemSpecOverride.db2", HotfixStatements.SEL_ITEM_SPEC_OVERRIDE);
ItemXBonusTreeStorage = ReadDB2<ItemXBonusTreeRecord>("ItemXBonusTree.db2", HotfixStatements.SEL_ITEM_X_BONUS_TREE);
ItemXItemEffectStorage = ReadDB2<ItemXItemEffectRecord>("ItemXItemEffect.db2", HotfixStatements.SEL_ITEM_X_ITEM_EFFECT);
JournalEncounterStorage = ReadDB2<JournalEncounterRecord>("JournalEncounter.db2", HotfixStatements.SEL_JOURNAL_ENCOUNTER, HotfixStatements.SEL_JOURNAL_ENCOUNTER_LOCALE);
JournalEncounterSectionStorage = ReadDB2<JournalEncounterSectionRecord>("JournalEncounterSection.db2", HotfixStatements.SEL_JOURNAL_ENCOUNTER_SECTION, HotfixStatements.SEL_JOURNAL_ENCOUNTER_SECTION_LOCALE);
JournalInstanceStorage = ReadDB2<JournalInstanceRecord>("JournalInstance.db2", HotfixStatements.SEL_JOURNAL_INSTANCE, HotfixStatements.SEL_JOURNAL_INSTANCE_LOCALE);
JournalTierStorage = ReadDB2<JournalTierRecord>("JournalTier.db2", HotfixStatements.SEL_JOURNAL_TIER, HotfixStatements.SEL_JOURNAL_TIER_LOCALE);
//KeyChainStorage = ReadDB2<KeyChainRecord>("KeyChain.db2", HotfixStatements.SEL_KEYCHAIN);
KeystoneAffixStorage = ReadDB2<KeystoneAffixRecord>("KeystoneAffix.db2", HotfixStatements.SEL_KEYSTONE_AFFIX, HotfixStatements.SEL_KEYSTONE_AFFIX_LOCALE);
LanguageWordsStorage = ReadDB2<LanguageWordsRecord>("LanguageWords.db2", HotfixStatements.SEL_LANGUAGE_WORDS);
LanguagesStorage = ReadDB2<LanguagesRecord>("Languages.db2", HotfixStatements.SEL_LANGUAGES, HotfixStatements.SEL_LANGUAGES_LOCALE);
LFGDungeonsStorage = ReadDB2<LFGDungeonsRecord>("LFGDungeons.db2", HotfixStatements.SEL_LFG_DUNGEONS, HotfixStatements.SEL_LFG_DUNGEONS_LOCALE);
@@ -216,8 +223,10 @@ namespace Game.DataStorage
LockStorage = ReadDB2<LockRecord>("Lock.db2", HotfixStatements.SEL_LOCK);
MailTemplateStorage = ReadDB2<MailTemplateRecord>("MailTemplate.db2", HotfixStatements.SEL_MAIL_TEMPLATE, HotfixStatements.SEL_MAIL_TEMPLATE_LOCALE);
MapStorage = ReadDB2<MapRecord>("Map.db2", HotfixStatements.SEL_MAP, HotfixStatements.SEL_MAP_LOCALE);
MapChallengeModeStorage = ReadDB2<MapChallengeModeRecord>("MapChallengeMode.db2", HotfixStatements.SEL_MAP_CHALLENGE_MODE, HotfixStatements.SEL_MAP_CHALLENGE_MODE_LOCALE);
MapDifficultyStorage = ReadDB2<MapDifficultyRecord>("MapDifficulty.db2", HotfixStatements.SEL_MAP_DIFFICULTY, HotfixStatements.SEL_MAP_DIFFICULTY_LOCALE);
MapDifficultyXConditionStorage = ReadDB2<MapDifficultyXConditionRecord>("MapDifficultyXCondition.db2", HotfixStatements.SEL_MAP_DIFFICULTY_X_CONDITION, HotfixStatements.SEL_MAP_DIFFICULTY_X_CONDITION_LOCALE);
MawPowerStorage = ReadDB2<MawPowerRecord>("MawPower.db2", HotfixStatements.SEL_MAW_POWER);
ModifierTreeStorage = ReadDB2<ModifierTreeRecord>("ModifierTree.db2", HotfixStatements.SEL_MODIFIER_TREE);
MountCapabilityStorage = ReadDB2<MountCapabilityRecord>("MountCapability.db2", HotfixStatements.SEL_MOUNT_CAPABILITY);
MountStorage = ReadDB2<MountRecord>("Mount.db2", HotfixStatements.SEL_MOUNT, HotfixStatements.SEL_MOUNT_LOCALE);
@@ -264,6 +273,7 @@ namespace Game.DataStorage
SkillLineStorage = ReadDB2<SkillLineRecord>("SkillLine.db2", HotfixStatements.SEL_SKILL_LINE, HotfixStatements.SEL_SKILL_LINE_LOCALE);
SkillLineAbilityStorage = ReadDB2<SkillLineAbilityRecord>("SkillLineAbility.db2", HotfixStatements.SEL_SKILL_LINE_ABILITY);
SkillRaceClassInfoStorage = ReadDB2<SkillRaceClassInfoRecord>("SkillRaceClassInfo.db2", HotfixStatements.SEL_SKILL_RACE_CLASS_INFO);
SoulbindConduitRankStorage = ReadDB2<SoulbindConduitRankRecord>("SoulbindConduitRank.db2", HotfixStatements.SEL_SOULBIND_CONDUIT_RANK);
SoundKitStorage = ReadDB2<SoundKitRecord>("SoundKit.db2", HotfixStatements.SEL_SOUND_KIT);
SpecializationSpellsStorage = ReadDB2<SpecializationSpellsRecord>("SpecializationSpells.db2", HotfixStatements.SEL_SPECIALIZATION_SPELLS, HotfixStatements.SEL_SPECIALIZATION_SPELLS_LOCALE);
SpecSetMemberStorage = ReadDB2<SpecSetMemberRecord>("SpecSetMember.db2", HotfixStatements.SEL_SPEC_SET_MEMBER);
@@ -499,6 +509,7 @@ namespace Game.DataStorage
public static DB6Storage<CreatureTypeRecord> CreatureTypeStorage;
public static DB6Storage<CriteriaRecord> CriteriaStorage;
public static DB6Storage<CriteriaTreeRecord> CriteriaTreeStorage;
public static DB6Storage<CurrencyContainerRecord> CurrencyContainerStorage;
public static DB6Storage<CurrencyTypesRecord> CurrencyTypesStorage;
public static DB6Storage<CurveRecord> CurveStorage;
public static DB6Storage<CurvePointRecord> CurvePointStorage;
@@ -524,6 +535,7 @@ namespace Game.DataStorage
public static DB6Storage<GarrClassSpecRecord> GarrClassSpecStorage;
public static DB6Storage<GarrFollowerRecord> GarrFollowerStorage;
public static DB6Storage<GarrFollowerXAbilityRecord> GarrFollowerXAbilityStorage;
public static DB6Storage<GarrMissionRecord> GarrMissionStorage;
public static DB6Storage<GarrPlotBuildingRecord> GarrPlotBuildingStorage;
public static DB6Storage<GarrPlotRecord> GarrPlotStorage;
public static DB6Storage<GarrPlotInstanceRecord> GarrPlotInstanceStorage;
@@ -581,7 +593,12 @@ namespace Game.DataStorage
public static DB6Storage<ItemSpecOverrideRecord> ItemSpecOverrideStorage;
public static DB6Storage<ItemXBonusTreeRecord> ItemXBonusTreeStorage;
public static DB6Storage<ItemXItemEffectRecord> ItemXItemEffectStorage;
public static DB6Storage<JournalEncounterRecord> JournalEncounterStorage;
public static DB6Storage<JournalEncounterSectionRecord> JournalEncounterSectionStorage;
public static DB6Storage<JournalInstanceRecord> JournalInstanceStorage;
public static DB6Storage<JournalTierRecord> JournalTierStorage;
//public static DB6Storage<KeyChainRecord> KeyChainStorage;
public static DB6Storage<KeystoneAffixRecord> KeystoneAffixStorage;
public static DB6Storage<LanguageWordsRecord> LanguageWordsStorage;
public static DB6Storage<LanguagesRecord> LanguagesStorage;
public static DB6Storage<LFGDungeonsRecord> LFGDungeonsStorage;
@@ -590,8 +607,10 @@ namespace Game.DataStorage
public static DB6Storage<LockRecord> LockStorage;
public static DB6Storage<MailTemplateRecord> MailTemplateStorage;
public static DB6Storage<MapRecord> MapStorage;
public static DB6Storage<MapChallengeModeRecord> MapChallengeModeStorage;
public static DB6Storage<MapDifficultyRecord> MapDifficultyStorage;
public static DB6Storage<MapDifficultyXConditionRecord> MapDifficultyXConditionStorage;
public static DB6Storage<MawPowerRecord> MawPowerStorage;
public static DB6Storage<ModifierTreeRecord> ModifierTreeStorage;
public static DB6Storage<MountCapabilityRecord> MountCapabilityStorage;
public static DB6Storage<MountRecord> MountStorage;
@@ -638,6 +657,7 @@ namespace Game.DataStorage
public static DB6Storage<SkillLineRecord> SkillLineStorage;
public static DB6Storage<SkillLineAbilityRecord> SkillLineAbilityStorage;
public static DB6Storage<SkillRaceClassInfoRecord> SkillRaceClassInfoStorage;
public static DB6Storage<SoulbindConduitRankRecord> SoulbindConduitRankStorage;
public static DB6Storage<SoundKitRecord> SoundKitStorage;
public static DB6Storage<SpecializationSpellsRecord> SpecializationSpellsStorage;
public static DB6Storage<SpecSetMemberRecord> SpecSetMemberStorage;
+42
View File
@@ -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<CurvePointRecord> 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<SpecializationSpellsRecord> 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<TransmogSetRecord> GetTransmogSetsForItemModifiedAppearance(uint itemModifiedAppearanceId)
{
return _transmogSetsByItemModifiedAppearance.LookupByKey(itemModifiedAppearanceId);
@@ -2324,6 +2362,7 @@ namespace Game.DataStorage
MultiMap<Tuple<byte, byte>, ChrCustomizationOptionRecord> _chrCustomizationOptionsByRaceAndGender = new();
Dictionary<uint, MultiMap<uint, uint>> _chrCustomizationRequiredChoices = new();
ChrSpecializationRecord[][] _chrSpecializationsByIndex = new ChrSpecializationRecord[(int)Class.Max + 1][];
MultiMap<uint, CurrencyContainerRecord> _currencyContainers = new();
MultiMap<uint, CurvePointRecord> _curvePoints = new();
Dictionary<Tuple<uint, byte, byte, byte>, EmotesTextSoundRecord> _emoteTextSounds = new();
Dictionary<Tuple<uint, int>, ExpectedStatRecord> _expectedStatsByLevel = new();
@@ -2345,6 +2384,7 @@ namespace Game.DataStorage
MultiMap<uint, uint> _itemToBonusTree = new();
MultiMap<uint, ItemSetSpellRecord> _itemSetSpells = new();
MultiMap<uint, ItemSpecOverrideRecord> _itemSpecOverrides = new();
List<JournalTierRecord> _journalTiersByIndex = new();
Dictionary<uint, Dictionary<uint, MapDifficultyRecord>> _mapDifficulties = new();
MultiMap<uint, Tuple<uint, PlayerConditionRecord>> _mapDifficultyConditions = new();
Dictionary<uint, MountRecord> _mountsBySpellId = new();
@@ -2364,12 +2404,14 @@ namespace Game.DataStorage
MultiMap<uint, SkillLineRecord> _skillLinesByParentSkillLine = new();
MultiMap<uint, SkillLineAbilityRecord> _skillLineAbilitiesBySkillupSkill = new();
MultiMap<uint, SkillRaceClassInfoRecord> _skillRaceClassInfoBySkill = new();
Dictionary<Tuple<int, int>, SoulbindConduitRankRecord> _soulbindConduitRanks = new();
MultiMap<uint, SpecializationSpellsRecord> _specializationSpellsBySpec = new();
List<Tuple<int, uint>> _specsBySpecSet = new();
List<byte> _spellFamilyNames = new();
MultiMap<uint, SpellProcsPerMinuteModRecord> _spellProcsPerMinuteMods = new();
List<TalentRecord>[][][] _talentsByPosition = new List<TalentRecord>[(int)Class.Max][][];
List<uint> _toys = new();
Dictionary<uint, TransmogIllusionRecord> _transmogIllusionsByEnchantmentId = new();
MultiMap<uint, TransmogSetRecord> _transmogSetsByItemModifiedAppearance = new();
MultiMap<uint, TransmogSetItemRecord> _transmogSetItemsByTransmogSet = new();
Dictionary<int, UiMapBounds> _uiMapBounds = new();
@@ -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;
@@ -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;
@@ -0,0 +1,80 @@
/*
* Copyright (C) 2012-2020 CypherCore <http://github.com/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 <http://www.gnu.org/licenses/>.
*/
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;
}
}
@@ -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;
}
}
@@ -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;
@@ -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;