/* * Copyright (C) 2012-2017 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.Database; using System; using System.Collections.Generic; using System.Linq; namespace Game.DataStorage { public class CliDB { internal static int LoadedFileCount; internal static string DataPath; public static void LoadStores(string dataPath, LocaleConstant defaultLocale) { uint oldMSTime = Time.GetMSTime(); LoadedFileCount = 0; DataPath = dataPath + "/dbc/" + defaultLocale + "/"; AchievementStorage = DB6Reader.Read("Achievement.db2", DB6Metas.AchievementMeta, HotfixStatements.SEL_ACHIEVEMENT, HotfixStatements.SEL_ACHIEVEMENT_LOCALE); AnimKitStorage = DB6Reader.Read("AnimKit.db2", DB6Metas.AnimKitMeta, HotfixStatements.SEL_ANIM_KIT); AreaGroupMemberStorage = DB6Reader.Read("AreaGroupMember.db2", DB6Metas.AreaGroupMemberMeta, HotfixStatements.SEL_AREA_GROUP_MEMBER); AreaTableStorage = DB6Reader.Read("AreaTable.db2", DB6Metas.AreaTableMeta, HotfixStatements.SEL_AREA_TABLE, HotfixStatements.SEL_AREA_TABLE_LOCALE); AreaTriggerStorage = DB6Reader.Read("AreaTrigger.db2", DB6Metas.AreaTriggerMeta, HotfixStatements.SEL_AREA_TRIGGER); ArmorLocationStorage = DB6Reader.Read("ArmorLocation.db2", DB6Metas.ArmorLocationMeta, HotfixStatements.SEL_ARMOR_LOCATION); ArtifactStorage = DB6Reader.Read("Artifact.db2", DB6Metas.ArtifactMeta, HotfixStatements.SEL_ARTIFACT, HotfixStatements.SEL_ARTIFACT_APPEARANCE_LOCALE); ArtifactAppearanceStorage = DB6Reader.Read("ArtifactAppearance.db2", DB6Metas.ArtifactAppearanceMeta, HotfixStatements.SEL_ARTIFACT_APPEARANCE, HotfixStatements.SEL_ARTIFACT_APPEARANCE_LOCALE); ArtifactAppearanceSetStorage = DB6Reader.Read("ArtifactAppearanceSet.db2", DB6Metas.ArtifactAppearanceSetMeta, HotfixStatements.SEL_ARTIFACT_APPEARANCE_SET, HotfixStatements.SEL_ARTIFACT_APPEARANCE_SET_LOCALE); ArtifactCategoryStorage = DB6Reader.Read("ArtifactCategory.db2", DB6Metas.ArtifactCategoryMeta, HotfixStatements.SEL_ARTIFACT_CATEGORY); ArtifactPowerStorage = DB6Reader.Read("ArtifactPower.db2", DB6Metas.ArtifactPowerMeta, HotfixStatements.SEL_ARTIFACT_POWER); ArtifactPowerLinkStorage = DB6Reader.Read("ArtifactPowerLink.db2", DB6Metas.ArtifactPowerLinkMeta, HotfixStatements.SEL_ARTIFACT_POWER_LINK); ArtifactPowerPickerStorage = DB6Reader.Read("ArtifactPowerPicker.db2", DB6Metas.ArtifactPowerPickerMeta, HotfixStatements.SEL_ARTIFACT_POWER_PICKER); ArtifactPowerRankStorage = DB6Reader.Read("ArtifactPowerRank.db2", DB6Metas.ArtifactPowerRankMeta, HotfixStatements.SEL_ARTIFACT_POWER_RANK); //ArtifactQuestXPStorage = DB6Reader.Read("ArtifactQuestXP.db2", DB6Metas.ArtifactQuestXPMeta, HotfixStatements.SEL_ARTIFACT_QUEST_XP); AuctionHouseStorage = DB6Reader.Read("AuctionHouse.db2", DB6Metas.AuctionHouseMeta, HotfixStatements.SEL_AUCTION_HOUSE, HotfixStatements.SEL_AUCTION_HOUSE_LOCALE); BankBagSlotPricesStorage = DB6Reader.Read("BankBagSlotPrices.db2", DB6Metas.BankBagSlotPricesMeta, HotfixStatements.SEL_BANK_BAG_SLOT_PRICES); //BannedAddOnsStorage = DB6Reader.Read("BannedAddOns.db2", DB6Metas.BannedAddOnsMeta, HotfixStatements.SEL_BANNED_ADDONS); BarberShopStyleStorage = DB6Reader.Read("BarberShopStyle.db2", DB6Metas.BarberShopStyleMeta, HotfixStatements.SEL_BARBER_SHOP_STYLE, HotfixStatements.SEL_BARBER_SHOP_STYLE_LOCALE); BattlePetBreedQualityStorage = DB6Reader.Read("BattlePetBreedQuality.db2", DB6Metas.BattlePetBreedQualityMeta, HotfixStatements.SEL_BATTLE_PET_BREED_QUALITY); BattlePetBreedStateStorage = DB6Reader.Read("BattlePetBreedState.db2", DB6Metas.BattlePetBreedStateMeta, HotfixStatements.SEL_BATTLE_PET_BREED_STATE); BattlePetSpeciesStorage = DB6Reader.Read("BattlePetSpecies.db2", DB6Metas.BattlePetSpeciesMeta, HotfixStatements.SEL_BATTLE_PET_SPECIES, HotfixStatements.SEL_BATTLE_PET_SPECIES_LOCALE); BattlePetSpeciesStateStorage = DB6Reader.Read("BattlePetSpeciesState.db2", DB6Metas.BattlePetSpeciesStateMeta, HotfixStatements.SEL_BATTLE_PET_SPECIES_STATE); BattlemasterListStorage = DB6Reader.Read("BattlemasterList.db2", DB6Metas.BattlemasterListMeta, HotfixStatements.SEL_BATTLEMASTER_LIST, HotfixStatements.SEL_BATTLEMASTER_LIST_LOCALE); BroadcastTextStorage = DB6Reader.Read("BroadcastText.db2", DB6Metas.BroadcastTextMeta, HotfixStatements.SEL_BROADCAST_TEXT, HotfixStatements.SEL_BROADCAST_TEXT_LOCALE); CharacterFacialHairStylesStorage = DB6Reader.Read("CharacterFacialHairStyles.db2", DB6Metas.CharacterFacialHairStylesMeta, HotfixStatements.SEL_CHARACTER_FACIAL_HAIR_STYLES); CharBaseSectionStorage = DB6Reader.Read("CharBaseSection.db2", DB6Metas.CharBaseSectionMeta, HotfixStatements.SEL_CHAR_BASE_SECTION); CharSectionsStorage = DB6Reader.Read("CharSections.db2", DB6Metas.CharSectionsMeta, HotfixStatements.SEL_CHAR_SECTIONS); CharStartOutfitStorage = DB6Reader.Read("CharStartOutfit.db2", DB6Metas.CharStartOutfitMeta, HotfixStatements.SEL_CHAR_START_OUTFIT); CharTitlesStorage = DB6Reader.Read("CharTitles.db2", DB6Metas.CharTitlesMeta, HotfixStatements.SEL_CHAR_TITLES, HotfixStatements.SEL_CHAR_TITLES_LOCALE); ChatChannelsStorage = DB6Reader.Read("ChatChannels.db2", DB6Metas.ChatChannelsMeta, HotfixStatements.SEL_CHAT_CHANNELS, HotfixStatements.SEL_CHAT_CHANNELS_LOCALE); ChrClassesStorage = DB6Reader.Read("ChrClasses.db2", DB6Metas.ChrClassesMeta, HotfixStatements.SEL_CHR_CLASSES, HotfixStatements.SEL_CHR_CLASSES_LOCALE); ChrClassesXPowerTypesStorage = DB6Reader.Read("ChrClassesXPowerTypes.db2", DB6Metas.ChrClassesXPowerTypesMeta, HotfixStatements.SEL_CHR_CLASSES_X_POWER_TYPES); ChrRacesStorage = DB6Reader.Read("ChrRaces.db2", DB6Metas.ChrRacesMeta, HotfixStatements.SEL_CHR_RACES, HotfixStatements.SEL_CHR_RACES_LOCALE); ChrSpecializationStorage = DB6Reader.Read("ChrSpecialization.db2", DB6Metas.ChrSpecializationMeta, HotfixStatements.SEL_CHR_SPECIALIZATION, HotfixStatements.SEL_CHR_SPECIALIZATION_LOCALE); CinematicCameraStorage = DB6Reader.Read("CinematicCamera.db2", DB6Metas.CinematicCameraMeta, HotfixStatements.SEL_CINEMATIC_CAMERA); CinematicSequencesStorage = DB6Reader.Read("CinematicSequences.db2", DB6Metas.CinematicSequencesMeta, HotfixStatements.SEL_CINEMATIC_SEQUENCES); ConversationLineStorage = DB6Reader.Read("ConversationLine.db2", DB6Metas.ConversationLineMeta, HotfixStatements.SEL_CONVERSATION_LINE); CreatureDisplayInfoStorage = DB6Reader.Read("CreatureDisplayInfo.db2", DB6Metas.CreatureDisplayInfoMeta, HotfixStatements.SEL_CREATURE_DISPLAY_INFO); CreatureDisplayInfoExtraStorage = DB6Reader.Read("CreatureDisplayInfoExtra.db2", DB6Metas.CreatureDisplayInfoExtraMeta, HotfixStatements.SEL_CREATURE_DISPLAY_INFO_EXTRA); CreatureFamilyStorage = DB6Reader.Read("CreatureFamily.db2", DB6Metas.CreatureFamilyMeta, HotfixStatements.SEL_CREATURE_FAMILY, HotfixStatements.SEL_CREATURE_FAMILY_LOCALE); CreatureModelDataStorage = DB6Reader.Read("CreatureModelData.db2", DB6Metas.CreatureModelDataMeta, HotfixStatements.SEL_CREATURE_MODEL_DATA); CreatureTypeStorage = DB6Reader.Read("CreatureType.db2", DB6Metas.CreatureTypeMeta, HotfixStatements.SEL_CREATURE_TYPE, HotfixStatements.SEL_CREATURE_TYPE_LOCALE); CriteriaStorage = DB6Reader.Read("Criteria.db2", DB6Metas.CriteriaMeta, HotfixStatements.SEL_CRITERIA); CriteriaTreeStorage = DB6Reader.Read("CriteriaTree.db2", DB6Metas.CriteriaTreeMeta, HotfixStatements.SEL_CRITERIA_TREE, HotfixStatements.SEL_CRITERIA_TREE_LOCALE); CurrencyTypesStorage = DB6Reader.Read("CurrencyTypes.db2", DB6Metas.CurrencyTypesMeta, HotfixStatements.SEL_CURRENCY_TYPES, HotfixStatements.SEL_CURRENCY_TYPES_LOCALE); CurveStorage = DB6Reader.Read("Curve.db2", DB6Metas.CurveMeta, HotfixStatements.SEL_CURVE); CurvePointStorage = DB6Reader.Read("CurvePoint.db2", DB6Metas.CurvePointMeta, HotfixStatements.SEL_CURVE_POINT); DestructibleModelDataStorage = DB6Reader.Read("DestructibleModelData.db2", DB6Metas.DestructibleModelDataMeta, HotfixStatements.SEL_DESTRUCTIBLE_MODEL_DATA); DifficultyStorage = DB6Reader.Read("Difficulty.db2", DB6Metas.DifficultyMeta, HotfixStatements.SEL_DIFFICULTY, HotfixStatements.SEL_DIFFICULTY_LOCALE); DungeonEncounterStorage = DB6Reader.Read("DungeonEncounter.db2", DB6Metas.DungeonEncounterMeta, HotfixStatements.SEL_DUNGEON_ENCOUNTER, HotfixStatements.SEL_DUNGEON_ENCOUNTER_LOCALE); DurabilityCostsStorage = DB6Reader.Read("DurabilityCosts.db2", DB6Metas.DurabilityCostsMeta, HotfixStatements.SEL_DURABILITY_COSTS); DurabilityQualityStorage = DB6Reader.Read("DurabilityQuality.db2", DB6Metas.DurabilityQualityMeta, HotfixStatements.SEL_DURABILITY_QUALITY); EmotesStorage = DB6Reader.Read("Emotes.db2", DB6Metas.EmotesMeta, HotfixStatements.SEL_EMOTES); EmotesTextStorage = DB6Reader.Read("EmotesText.db2", DB6Metas.EmotesTextMeta, HotfixStatements.SEL_EMOTES_TEXT, HotfixStatements.SEL_EMOTES_TEXT_LOCALE); EmotesTextSoundStorage = DB6Reader.Read("EmotesTextSound.db2", DB6Metas.EmotesTextSoundMeta, HotfixStatements.SEL_EMOTES_TEXT_SOUND); FactionStorage = DB6Reader.Read("Faction.db2", DB6Metas.FactionMeta, HotfixStatements.SEL_FACTION, HotfixStatements.SEL_FACTION_LOCALE); FactionTemplateStorage = DB6Reader.Read("FactionTemplate.db2", DB6Metas.FactionTemplateMeta, HotfixStatements.SEL_FACTION_TEMPLATE); GameObjectsStorage = DB6Reader.Read("GameObjects.db2", DB6Metas.GameObjectsMeta, HotfixStatements.SEL_GAMEOBJECTS, HotfixStatements.SEL_GAMEOBJECTS_LOCALE); GameObjectDisplayInfoStorage = DB6Reader.Read("GameObjectDisplayInfo.db2", DB6Metas.GameObjectDisplayInfoMeta, HotfixStatements.SEL_GAMEOBJECT_DISPLAY_INFO); GarrAbilityStorage = DB6Reader.Read("GarrAbility.db2", DB6Metas.GarrAbilityMeta, HotfixStatements.SEL_GARR_ABILITY, HotfixStatements.SEL_GARR_ABILITY_LOCALE); GarrBuildingStorage = DB6Reader.Read("GarrBuilding.db2", DB6Metas.GarrBuildingMeta, HotfixStatements.SEL_GARR_BUILDING, HotfixStatements.SEL_GARR_BUILDING_LOCALE); GarrBuildingPlotInstStorage = DB6Reader.Read("GarrBuildingPlotInst.db2", DB6Metas.GarrBuildingPlotInstMeta, HotfixStatements.SEL_GARR_BUILDING_PLOT_INST); GarrClassSpecStorage = DB6Reader.Read("GarrClassSpec.db2", DB6Metas.GarrClassSpecMeta, HotfixStatements.SEL_GARR_CLASS_SPEC, HotfixStatements.SEL_GARR_CLASS_SPEC_LOCALE); GarrFollowerStorage = DB6Reader.Read("GarrFollower.db2", DB6Metas.GarrFollowerMeta, HotfixStatements.SEL_GARR_FOLLOWER, HotfixStatements.SEL_GARR_FOLLOWER_LOCALE); GarrFollowerXAbilityStorage = DB6Reader.Read("GarrFollowerXAbility.db2", DB6Metas.GarrFollowerXAbilityMeta, HotfixStatements.SEL_GARR_FOLLOWER_X_ABILITY); GarrPlotBuildingStorage = DB6Reader.Read("GarrPlotBuilding.db2", DB6Metas.GarrPlotBuildingMeta, HotfixStatements.SEL_GARR_PLOT_BUILDING); GarrPlotStorage = DB6Reader.Read("GarrPlot.db2", DB6Metas.GarrPlotMeta, HotfixStatements.SEL_GARR_PLOT, HotfixStatements.SEL_GARR_PLOT_LOCALE); GarrPlotInstanceStorage = DB6Reader.Read("GarrPlotInstance.db2", DB6Metas.GarrPlotInstanceMeta, HotfixStatements.SEL_GARR_PLOT_INSTANCE, HotfixStatements.SEL_GARR_PLOT_INSTANCE_LOCALE); GarrSiteLevelStorage = DB6Reader.Read("GarrSiteLevel.db2", DB6Metas.GarrSiteLevelMeta, HotfixStatements.SEL_GARR_SITE_LEVEL); GarrSiteLevelPlotInstStorage = DB6Reader.Read("GarrSiteLevelPlotInst.db2", DB6Metas.GarrSiteLevelPlotInstMeta, HotfixStatements.SEL_GARR_SITE_LEVEL_PLOT_INST); GemPropertiesStorage = DB6Reader.Read("GemProperties.db2", DB6Metas.GemPropertiesMeta, HotfixStatements.SEL_GEM_PROPERTIES); GlyphBindableSpellStorage = DB6Reader.Read("GlyphBindableSpell.db2", DB6Metas.GlyphBindableSpellMeta, HotfixStatements.SEL_GLYPH_BINDABLE_SPELL); GlyphPropertiesStorage = DB6Reader.Read("GlyphProperties.db2", DB6Metas.GlyphPropertiesMeta, HotfixStatements.SEL_GLYPH_PROPERTIES); GlyphRequiredSpecStorage = DB6Reader.Read("GlyphRequiredSpec.db2", DB6Metas.GlyphRequiredSpecMeta, HotfixStatements.SEL_GLYPH_REQUIRED_SPEC); GuildColorBackgroundStorage = DB6Reader.Read("GuildColorBackground.db2", DB6Metas.GuildColorBackgroundMeta, HotfixStatements.SEL_GUILD_COLOR_BACKGROUND); GuildColorBorderStorage = DB6Reader.Read("GuildColorBorder.db2", DB6Metas.GuildColorBorderMeta, HotfixStatements.SEL_GUILD_COLOR_BORDER); GuildColorEmblemStorage = DB6Reader.Read("GuildColorEmblem.db2", DB6Metas.GuildColorEmblemMeta, HotfixStatements.SEL_GUILD_COLOR_EMBLEM); GuildPerkSpellsStorage = DB6Reader.Read("GuildPerkSpells.db2", DB6Metas.GuildPerkSpellsMeta, HotfixStatements.SEL_GUILD_PERK_SPELLS); HeirloomStorage = DB6Reader.Read("Heirloom.db2", DB6Metas.HeirloomMeta, HotfixStatements.SEL_HEIRLOOM, HotfixStatements.SEL_HEIRLOOM_LOCALE); HolidaysStorage = DB6Reader.Read("Holidays.db2", DB6Metas.HolidaysMeta, HotfixStatements.SEL_HOLIDAYS); ImportPriceArmorStorage = DB6Reader.Read("ImportPriceArmor.db2", DB6Metas.ImportPriceArmorMeta, HotfixStatements.SEL_IMPORT_PRICE_ARMOR); ImportPriceQualityStorage = DB6Reader.Read("ImportPriceQuality.db2", DB6Metas.ImportPriceQualityMeta, HotfixStatements.SEL_IMPORT_PRICE_QUALITY); ImportPriceShieldStorage = DB6Reader.Read("ImportPriceShield.db2", DB6Metas.ImportPriceShieldMeta, HotfixStatements.SEL_IMPORT_PRICE_SHIELD); ImportPriceWeaponStorage = DB6Reader.Read("ImportPriceWeapon.db2", DB6Metas.ImportPriceWeaponMeta, HotfixStatements.SEL_IMPORT_PRICE_WEAPON); ItemAppearanceStorage = DB6Reader.Read("ItemAppearance.db2", DB6Metas.ItemAppearanceMeta, HotfixStatements.SEL_ITEM_APPEARANCE); ItemArmorQualityStorage = DB6Reader.Read("ItemArmorQuality.db2", DB6Metas.ItemArmorQualityMeta, HotfixStatements.SEL_ITEM_ARMOR_QUALITY); ItemArmorShieldStorage = DB6Reader.Read("ItemArmorShield.db2", DB6Metas.ItemArmorShieldMeta, HotfixStatements.SEL_ITEM_ARMOR_SHIELD); ItemArmorTotalStorage = DB6Reader.Read("ItemArmorTotal.db2", DB6Metas.ItemArmorTotalMeta, HotfixStatements.SEL_ITEM_ARMOR_TOTAL); //ItemBagFamilyStorage = DB6Reader.Read("ItemBagFamily.db2", DB6Metas.ItemBagFamilyMeta, HotfixStatements.SEL_ITEM_BAG_FAMILY, HotfixStatements.SEL_ITEM_BAG_FAMILY_LOCALE); ItemBonusStorage = DB6Reader.Read("ItemBonus.db2", DB6Metas.ItemBonusMeta, HotfixStatements.SEL_ITEM_BONUS); ItemBonusListLevelDeltaStorage = DB6Reader.Read("ItemBonusListLevelDelta.db2", DB6Metas.ItemBonusListLevelDeltaMeta, HotfixStatements.SEL_ITEM_BONUS_LIST_LEVEL_DELTA); ItemBonusTreeNodeStorage = DB6Reader.Read("ItemBonusTreeNode.db2", DB6Metas.ItemBonusTreeNodeMeta, HotfixStatements.SEL_ITEM_BONUS_TREE_NODE); ItemChildEquipmentStorage = DB6Reader.Read("ItemChildEquipment.db2", DB6Metas.ItemChildEquipmentMeta, HotfixStatements.SEL_ITEM_CHILD_EQUIPMENT); ItemClassStorage = DB6Reader.Read("ItemClass.db2", DB6Metas.ItemClassMeta, HotfixStatements.SEL_ITEM_CLASS, HotfixStatements.SEL_ITEM_CLASS_LOCALE); ItemCurrencyCostStorage = DB6Reader.Read("ItemCurrencyCost.db2", DB6Metas.ItemCurrencyCostMeta, HotfixStatements.SEL_ITEM_CURRENCY_COST); ItemDamageAmmoStorage = DB6Reader.Read("ItemDamageAmmo.db2", DB6Metas.ItemDamageAmmoMeta, HotfixStatements.SEL_ITEM_DAMAGE_AMMO); ItemDamageOneHandStorage = DB6Reader.Read("ItemDamageOneHand.db2", DB6Metas.ItemDamageOneHandMeta, HotfixStatements.SEL_ITEM_DAMAGE_ONE_HAND); ItemDamageOneHandCasterStorage = DB6Reader.Read("ItemDamageOneHandCaster.db2", DB6Metas.ItemDamageOneHandCasterMeta, HotfixStatements.SEL_ITEM_DAMAGE_ONE_HAND_CASTER); ItemDamageTwoHandStorage = DB6Reader.Read("ItemDamageTwoHand.db2", DB6Metas.ItemDamageTwoHandMeta, HotfixStatements.SEL_ITEM_DAMAGE_TWO_HAND); ItemDamageTwoHandCasterStorage = DB6Reader.Read("ItemDamageTwoHandCaster.db2", DB6Metas.ItemDamageTwoHandCasterMeta, HotfixStatements.SEL_ITEM_DAMAGE_TWO_HAND_CASTER); ItemDisenchantLootStorage = DB6Reader.Read("ItemDisenchantLoot.db2", DB6Metas.ItemDisenchantLootMeta, HotfixStatements.SEL_ITEM_DISENCHANT_LOOT); ItemEffectStorage = DB6Reader.Read("ItemEffect.db2", DB6Metas.ItemEffectMeta, HotfixStatements.SEL_ITEM_EFFECT); ItemStorage = DB6Reader.Read("Item.db2", DB6Metas.ItemMeta, HotfixStatements.SEL_ITEM); ItemExtendedCostStorage = DB6Reader.Read("ItemExtendedCost.db2", DB6Metas.ItemExtendedCostMeta, HotfixStatements.SEL_ITEM_EXTENDED_COST); ItemLevelSelectorStorage = DB6Reader.Read("ItemLevelSelector.db2", DB6Metas.ItemLevelSelectorMeta, HotfixStatements.SEL_ITEM_LEVEL_SELECTOR); ItemLimitCategoryStorage = DB6Reader.Read("ItemLimitCategory.db2", DB6Metas.ItemLimitCategoryMeta, HotfixStatements.SEL_ITEM_LIMIT_CATEGORY, HotfixStatements.SEL_ITEM_LIMIT_CATEGORY_LOCALE); ItemModifiedAppearanceStorage = DB6Reader.Read("ItemModifiedAppearance.db2", DB6Metas.ItemModifiedAppearanceMeta, HotfixStatements.SEL_ITEM_MODIFIED_APPEARANCE); ItemPriceBaseStorage = DB6Reader.Read("ItemPriceBase.db2", DB6Metas.ItemPriceBaseMeta, HotfixStatements.SEL_ITEM_PRICE_BASE); ItemRandomPropertiesStorage = DB6Reader.Read("ItemRandomProperties.db2", DB6Metas.ItemRandomPropertiesMeta, HotfixStatements.SEL_ITEM_RANDOM_PROPERTIES, HotfixStatements.SEL_ITEM_RANDOM_PROPERTIES_LOCALE); ItemRandomSuffixStorage = DB6Reader.Read("ItemRandomSuffix.db2", DB6Metas.ItemRandomSuffixMeta, HotfixStatements.SEL_ITEM_RANDOM_SUFFIX, HotfixStatements.SEL_ITEM_RANDOM_SUFFIX_LOCALE); ItemSearchNameStorage = DB6Reader.Read("ItemSearchName.db2", DB6Metas.ItemSearchNameMeta, HotfixStatements.SEL_ITEM_SEARCH_NAME, HotfixStatements.SEL_ITEM_SEARCH_NAME_LOCALE); ItemSetStorage = DB6Reader.Read("ItemSet.db2", DB6Metas.ItemSetMeta, HotfixStatements.SEL_ITEM_SET, HotfixStatements.SEL_ITEM_SET_LOCALE); ItemSetSpellStorage = DB6Reader.Read("ItemSetSpell.db2", DB6Metas.ItemSetSpellMeta, HotfixStatements.SEL_ITEM_SET_SPELL); ItemSparseStorage = DB6Reader.Read("ItemSparse.db2", DB6Metas.ItemSparseMeta, HotfixStatements.SEL_ITEM_SPARSE, HotfixStatements.SEL_ITEM_SPARSE_LOCALE); ItemSpecStorage = DB6Reader.Read("ItemSpec.db2", DB6Metas.ItemSpecMeta, HotfixStatements.SEL_ITEM_SPEC); ItemSpecOverrideStorage = DB6Reader.Read("ItemSpecOverride.db2", DB6Metas.ItemSpecOverrideMeta, HotfixStatements.SEL_ITEM_SPEC_OVERRIDE); ItemUpgradeStorage = DB6Reader.Read("ItemUpgrade.db2", DB6Metas.ItemUpgradeMeta, HotfixStatements.SEL_ITEM_UPGRADE); ItemXBonusTreeStorage = DB6Reader.Read("ItemXBonusTree.db2", DB6Metas.ItemXBonusTreeMeta, HotfixStatements.SEL_ITEM_X_BONUS_TREE); //KeyChainStorage = DB6Reader.Read("KeyChain.db2", DB6Metas.KeyChainMeta, HotfixStatements.SEL_KEY_CHAIN); LfgDungeonsStorage = DB6Reader.Read("LfgDungeons.db2", DB6Metas.LfgDungeonsMeta, HotfixStatements.SEL_LFG_DUNGEONS, HotfixStatements.SEL_LFG_DUNGEONS_LOCALE); LightStorage = DB6Reader.Read("Light.db2", DB6Metas.LightMeta, HotfixStatements.SEL_LIGHT); LiquidTypeStorage = DB6Reader.Read("LiquidType.db2", DB6Metas.LiquidTypeMeta, HotfixStatements.SEL_LIQUID_TYPE, HotfixStatements.SEL_LIQUID_TYPE_LOCALE); LockStorage = DB6Reader.Read("Lock.db2", DB6Metas.LockMeta, HotfixStatements.SEL_LOCK); MailTemplateStorage = DB6Reader.Read("MailTemplate.db2", DB6Metas.MailTemplateMeta, HotfixStatements.SEL_MAIL_TEMPLATE, HotfixStatements.SEL_MAIL_TEMPLATE_LOCALE); MapStorage = DB6Reader.Read("Map.db2", DB6Metas.MapMeta, HotfixStatements.SEL_MAP, HotfixStatements.SEL_MAP_LOCALE); MapDifficultyStorage = DB6Reader.Read("MapDifficulty.db2", DB6Metas.MapDifficultyMeta, HotfixStatements.SEL_MAP_DIFFICULTY, HotfixStatements.SEL_MAP_DIFFICULTY_LOCALE); ModifierTreeStorage = DB6Reader.Read("ModifierTree.db2", DB6Metas.ModifierTreeMeta, HotfixStatements.SEL_MODIFIER_TREE); MountCapabilityStorage = DB6Reader.Read("MountCapability.db2", DB6Metas.MountCapabilityMeta, HotfixStatements.SEL_MOUNT_CAPABILITY); MountStorage = DB6Reader.Read("Mount.db2", DB6Metas.MountMeta, HotfixStatements.SEL_MOUNT, HotfixStatements.SEL_MOUNT_LOCALE); MountTypeXCapabilityStorage = DB6Reader.Read("MountTypeXCapability.db2", DB6Metas.MountTypeXCapabilityMeta, HotfixStatements.SEL_MOUNT_TYPE_X_CAPABILITY); MountXDisplayStorage = DB6Reader.Read("MountXDisplay.db2", DB6Metas.MountXDisplayMeta, HotfixStatements.SEL_MOUNT_X_DISPLAY); MovieStorage = DB6Reader.Read("Movie.db2", DB6Metas.MovieMeta, HotfixStatements.SEL_MOVIE); NameGenStorage = DB6Reader.Read("NameGen.db2", DB6Metas.NameGenMeta, HotfixStatements.SEL_NAME_GEN, HotfixStatements.SEL_NAME_GEN_LOCALE); NamesProfanityStorage = DB6Reader.Read("NamesProfanity.db2", DB6Metas.NamesProfanityMeta, HotfixStatements.SEL_NAMES_PROFANITY); NamesReservedStorage = DB6Reader.Read("NamesReserved.db2", DB6Metas.NamesReservedMeta, HotfixStatements.SEL_NAMES_RESERVED, HotfixStatements.SEL_NAMES_RESERVED_LOCALE); NamesReservedLocaleStorage = DB6Reader.Read("NamesReservedLocale.db2", DB6Metas.NamesReservedLocaleMeta, HotfixStatements.SEL_NAMES_RESERVED_LOCALE); OverrideSpellDataStorage = DB6Reader.Read("OverrideSpellData.db2", DB6Metas.OverrideSpellDataMeta, HotfixStatements.SEL_OVERRIDE_SPELL_DATA); PhaseStorage = DB6Reader.Read("Phase.db2", DB6Metas.PhaseMeta, HotfixStatements.SEL_PHASE); PhaseXPhaseGroupStorage = DB6Reader.Read("PhaseXPhaseGroup.db2", DB6Metas.PhaseXPhaseGroupMeta, HotfixStatements.SEL_PHASE_X_PHASE_GROUP); PlayerConditionStorage = DB6Reader.Read("PlayerCondition.db2", DB6Metas.PlayerConditionMeta, HotfixStatements.SEL_PLAYER_CONDITION, HotfixStatements.SEL_PLAYER_CONDITION_LOCALE); PowerDisplayStorage = DB6Reader.Read("PowerDisplay.db2", DB6Metas.PowerDisplayMeta, HotfixStatements.SEL_POWER_DISPLAY); PowerTypeStorage = DB6Reader.Read("PowerType.db2", DB6Metas.PowerTypeMeta, HotfixStatements.SEL_POWER_TYPE); PrestigeLevelInfoStorage = DB6Reader.Read("PrestigeLevelInfo.db2", DB6Metas.PrestigeLevelInfoMeta, HotfixStatements.SEL_PRESTIGE_LEVEL_INFO, HotfixStatements.SEL_PRESTIGE_LEVEL_INFO_LOCALE); PvpDifficultyStorage = DB6Reader.Read("PvpDifficulty.db2", DB6Metas.PvpDifficultyMeta, HotfixStatements.SEL_PVP_DIFFICULTY); PvpRewardStorage = DB6Reader.Read("PvpReward.db2", DB6Metas.PvpRewardMeta, HotfixStatements.SEL_PVP_REWARD); QuestFactionRewardStorage = DB6Reader.Read("QuestFactionReward.db2", DB6Metas.QuestFactionRewardMeta, HotfixStatements.SEL_QUEST_FACTION_REWARD); QuestMoneyRewardStorage = DB6Reader.Read("QuestMoneyReward.db2", DB6Metas.QuestMoneyRewardMeta, HotfixStatements.SEL_QUEST_MONEY_REWARD); QuestPackageItemStorage = DB6Reader.Read("QuestPackageItem.db2", DB6Metas.QuestPackageItemMeta, HotfixStatements.SEL_QUEST_PACKAGE_ITEM); QuestSortStorage = DB6Reader.Read("QuestSort.db2", DB6Metas.QuestSortMeta, HotfixStatements.SEL_QUEST_SORT, HotfixStatements.SEL_QUEST_SORT_LOCALE); QuestV2Storage = DB6Reader.Read("QuestV2.db2", DB6Metas.QuestV2Meta, HotfixStatements.SEL_QUEST_V2); QuestXPStorage = DB6Reader.Read("QuestXP.db2", DB6Metas.QuestXPMeta, HotfixStatements.SEL_QUEST_XP); RandPropPointsStorage = DB6Reader.Read("RandPropPoints.db2", DB6Metas.RandPropPointsMeta, HotfixStatements.SEL_RAND_PROP_POINTS); RewardPackStorage = DB6Reader.Read("RewardPack.db2", DB6Metas.RewardPackMeta, HotfixStatements.SEL_REWARD_PACK); RewardPackXItemStorage = DB6Reader.Read("RewardPackXItem.db2", DB6Metas.RewardPackXItemMeta, HotfixStatements.SEL_REWARD_PACK_X_ITEM); RulesetItemUpgradeStorage = DB6Reader.Read("RulesetItemUpgrade.db2", DB6Metas.RulesetItemUpgradeMeta, HotfixStatements.SEL_RULESET_ITEM_UPGRADE); ScalingStatDistributionStorage = DB6Reader.Read("ScalingStatDistribution.db2", DB6Metas.ScalingStatDistributionMeta, HotfixStatements.SEL_SCALING_STAT_DISTRIBUTION); ScenarioStorage = DB6Reader.Read("Scenario.db2", DB6Metas.ScenarioMeta, HotfixStatements.SEL_SCENARIO, HotfixStatements.SEL_SCENARIO_LOCALE); ScenarioStepStorage = DB6Reader.Read("ScenarioStep.db2", DB6Metas.ScenarioStepMeta, HotfixStatements.SEL_SCENARIO_STEP, HotfixStatements.SEL_SCENARIO_STEP_LOCALE); //SceneScriptStorage = DB6Reader.Read("SceneScript.db2", DB6Metas.SceneScriptMeta, HotfixStatements.SEL_SCENE_SCRIPT); SceneScriptPackageStorage = DB6Reader.Read("SceneScriptPackage.db2", DB6Metas.SceneScriptPackageMeta, HotfixStatements.SEL_SCENE_SCRIPT_PACKAGE); SkillLineStorage = DB6Reader.Read("SkillLine.db2", DB6Metas.SkillLineMeta, HotfixStatements.SEL_SKILL_LINE, HotfixStatements.SEL_SKILL_LINE_LOCALE); SkillLineAbilityStorage = DB6Reader.Read("SkillLineAbility.db2", DB6Metas.SkillLineAbilityMeta, HotfixStatements.SEL_SKILL_LINE_ABILITY); SkillRaceClassInfoStorage = DB6Reader.Read("SkillRaceClassInfo.db2", DB6Metas.SkillRaceClassInfoMeta, HotfixStatements.SEL_SKILL_RACE_CLASS_INFO); SoundKitStorage = DB6Reader.Read("SoundKit.db2", DB6Metas.SoundKitMeta, HotfixStatements.SEL_SOUND_KIT, HotfixStatements.SEL_SOUND_KIT_LOCALE); SpecializationSpellsStorage = DB6Reader.Read("SpecializationSpells.db2", DB6Metas.SpecializationSpellsMeta, HotfixStatements.SEL_SPECIALIZATION_SPELLS, HotfixStatements.SEL_SPECIALIZATION_SPELLS_LOCALE); SpellStorage = DB6Reader.Read("Spell.db2", DB6Metas.SpellMeta, HotfixStatements.SEL_SPELL, HotfixStatements.SEL_SPELL_LOCALE); SpellAuraOptionsStorage = DB6Reader.Read("SpellAuraOptions.db2", DB6Metas.SpellAuraOptionsMeta, HotfixStatements.SEL_SPELL_AURA_OPTIONS); SpellAuraRestrictionsStorage = DB6Reader.Read("SpellAuraRestrictions.db2", DB6Metas.SpellAuraRestrictionsMeta, HotfixStatements.SEL_SPELL_AURA_RESTRICTIONS); SpellCastTimesStorage = DB6Reader.Read("SpellCastTimes.db2", DB6Metas.SpellCastTimesMeta, HotfixStatements.SEL_SPELL_CAST_TIMES); SpellCastingRequirementsStorage = DB6Reader.Read("SpellCastingRequirements.db2", DB6Metas.SpellCastingRequirementsMeta, HotfixStatements.SEL_SPELL_CASTING_REQUIREMENTS); SpellCategoriesStorage = DB6Reader.Read("SpellCategories.db2", DB6Metas.SpellCategoriesMeta, HotfixStatements.SEL_SPELL_CATEGORIES); SpellCategoryStorage = DB6Reader.Read("SpellCategory.db2", DB6Metas.SpellCategoryMeta, HotfixStatements.SEL_SPELL_CATEGORY, HotfixStatements.SEL_SPELL_CATEGORY_LOCALE); SpellClassOptionsStorage = DB6Reader.Read("SpellClassOptions.db2", DB6Metas.SpellClassOptionsMeta, HotfixStatements.SEL_SPELL_CLASS_OPTIONS); SpellCooldownsStorage = DB6Reader.Read("SpellCooldowns.db2", DB6Metas.SpellCooldownsMeta, HotfixStatements.SEL_SPELL_COOLDOWNS); SpellDurationStorage = DB6Reader.Read("SpellDuration.db2", DB6Metas.SpellDurationMeta, HotfixStatements.SEL_SPELL_DURATION); SpellEffectStorage = DB6Reader.Read("SpellEffect.db2", DB6Metas.SpellEffectMeta, HotfixStatements.SEL_SPELL_EFFECT); SpellEffectScalingStorage = DB6Reader.Read("SpellEffectScaling.db2", DB6Metas.SpellEffectScalingMeta, HotfixStatements.SEL_SPELL_EFFECT_SCALING); SpellEquippedItemsStorage = DB6Reader.Read("SpellEquippedItems.db2", DB6Metas.SpellEquippedItemsMeta, HotfixStatements.SEL_SPELL_EQUIPPED_ITEMS); SpellFocusObjectStorage = DB6Reader.Read("SpellFocusObject.db2", DB6Metas.SpellFocusObjectMeta, HotfixStatements.SEL_SPELL_FOCUS_OBJECT, HotfixStatements.SEL_SPELL_FOCUS_OBJECT_LOCALE); SpellInterruptsStorage = DB6Reader.Read("SpellInterrupts.db2", DB6Metas.SpellInterruptsMeta, HotfixStatements.SEL_SPELL_INTERRUPTS); SpellItemEnchantmentStorage = DB6Reader.Read("SpellItemEnchantment.db2", DB6Metas.SpellItemEnchantmentMeta, HotfixStatements.SEL_SPELL_ITEM_ENCHANTMENT, HotfixStatements.SEL_SPELL_ITEM_ENCHANTMENT_LOCALE); SpellItemEnchantmentConditionStorage = DB6Reader.Read("SpellItemEnchantmentCondition.db2", DB6Metas.SpellItemEnchantmentConditionMeta, HotfixStatements.SEL_SPELL_ITEM_ENCHANTMENT_CONDITION); SpellLearnSpellStorage = DB6Reader.Read("SpellLearnSpell.db2", DB6Metas.SpellLearnSpellMeta, HotfixStatements.SEL_SPELL_LEARN_SPELL); SpellLevelsStorage = DB6Reader.Read("SpellLevels.db2", DB6Metas.SpellLevelsMeta, HotfixStatements.SEL_SPELL_LEVELS); SpellMiscStorage = DB6Reader.Read("SpellMisc.db2", DB6Metas.SpellMiscMeta, HotfixStatements.SEL_SPELL_MISC); SpellPowerStorage = DB6Reader.Read("SpellPower.db2", DB6Metas.SpellPowerMeta, HotfixStatements.SEL_SPELL_POWER); SpellPowerDifficultyStorage = DB6Reader.Read("SpellPowerDifficulty.db2", DB6Metas.SpellPowerDifficultyMeta, HotfixStatements.SEL_SPELL_POWER_DIFFICULTY); SpellProcsPerMinuteStorage = DB6Reader.Read("SpellProcsPerMinute.db2", DB6Metas.SpellProcsPerMinuteMeta, HotfixStatements.SEL_SPELL_PROCS_PER_MINUTE); SpellProcsPerMinuteModStorage = DB6Reader.Read("SpellProcsPerMinuteMod.db2", DB6Metas.SpellProcsPerMinuteModMeta, HotfixStatements.SEL_SPELL_PROCS_PER_MINUTE_MOD); SpellRadiusStorage = DB6Reader.Read("SpellRadius.db2", DB6Metas.SpellRadiusMeta, HotfixStatements.SEL_SPELL_RADIUS); SpellRangeStorage = DB6Reader.Read("SpellRange.db2", DB6Metas.SpellRangeMeta, HotfixStatements.SEL_SPELL_RANGE, HotfixStatements.SEL_SPELL_RANGE_LOCALE); SpellReagentsStorage = DB6Reader.Read("SpellReagents.db2", DB6Metas.SpellReagentsMeta, HotfixStatements.SEL_SPELL_REAGENTS); SpellScalingStorage = DB6Reader.Read("SpellScaling.db2", DB6Metas.SpellScalingMeta, HotfixStatements.SEL_SPELL_SCALING); SpellShapeshiftStorage = DB6Reader.Read("SpellShapeshift.db2", DB6Metas.SpellShapeshiftMeta, HotfixStatements.SEL_SPELL_SHAPESHIFT); SpellShapeshiftFormStorage = DB6Reader.Read("SpellShapeshiftForm.db2", DB6Metas.SpellShapeshiftFormMeta, HotfixStatements.SEL_SPELL_SHAPESHIFT_FORM, HotfixStatements.SEL_SPELL_SHAPESHIFT_FORM_LOCALE); SpellTargetRestrictionsStorage = DB6Reader.Read("SpellTargetRestrictions.db2", DB6Metas.SpellTargetRestrictionsMeta, HotfixStatements.SEL_SPELL_TARGET_RESTRICTIONS); SpellTotemsStorage = DB6Reader.Read("SpellTotems.db2", DB6Metas.SpellTotemsMeta, HotfixStatements.SEL_SPELL_TOTEMS); SpellXSpellVisualStorage = DB6Reader.Read("SpellXSpellVisual.db2", DB6Metas.SpellXSpellVisualMeta, HotfixStatements.SEL_SPELL_X_SPELL_VISUAL); SummonPropertiesStorage = DB6Reader.Read("SummonProperties.db2", DB6Metas.SummonPropertiesMeta, HotfixStatements.SEL_SUMMON_PROPERTIES); //TactKeyStorage = DB6Reader.Read("TactKey.db2", DB6Metas.TactKeyMeta, HotfixStatements.SEL_TACT_KEY); TalentStorage = DB6Reader.Read("Talent.db2", DB6Metas.TalentMeta, HotfixStatements.SEL_TALENT, HotfixStatements.SEL_TALENT_LOCALE); TaxiNodesStorage = DB6Reader.Read("TaxiNodes.db2", DB6Metas.TaxiNodesMeta, HotfixStatements.SEL_TAXI_NODES, HotfixStatements.SEL_TAXI_NODES_LOCALE); TaxiPathStorage = DB6Reader.Read("TaxiPath.db2", DB6Metas.TaxiPathMeta, HotfixStatements.SEL_TAXI_PATH); TaxiPathNodeStorage = DB6Reader.Read("TaxiPathNode.db2", DB6Metas.TaxiPathNodeMeta, HotfixStatements.SEL_TAXI_PATH_NODE); TotemCategoryStorage = DB6Reader.Read("TotemCategory.db2", DB6Metas.TotemCategoryMeta, HotfixStatements.SEL_TOTEM_CATEGORY, HotfixStatements.SEL_TOTEM_CATEGORY_LOCALE); ToyStorage = DB6Reader.Read("Toy.db2", DB6Metas.ToyMeta, HotfixStatements.SEL_TOY, HotfixStatements.SEL_TOY_LOCALE); TransmogHolidayStorage = DB6Reader.Read("TransmogHoliday.db2", DB6Metas.TransmogHolidayMeta, HotfixStatements.SEL_TRANSMOG_HOLIDAY); TransmogSetStorage = DB6Reader.Read("TransmogSet.db2", DB6Metas.TransmogSetMeta, HotfixStatements.SEL_TRANSMOG_SET, HotfixStatements.SEL_TRANSMOG_SET_LOCALE); TransmogSetGroupStorage = DB6Reader.Read("TransmogSetGroup.db2", DB6Metas.TransmogSetGroupMeta, HotfixStatements.SEL_TRANSMOG_SET_GROUP, HotfixStatements.SEL_TRANSMOG_SET_GROUP_LOCALE); TransmogSetItemStorage = DB6Reader.Read("TransmogSetItem.db2", DB6Metas.TransmogSetItemMeta, HotfixStatements.SEL_TRANSMOG_SET_ITEM); TransportAnimationStorage = DB6Reader.Read("TransportAnimation.db2", DB6Metas.TransportAnimationMeta, HotfixStatements.SEL_TRANSPORT_ANIMATION); TransportRotationStorage = DB6Reader.Read("TransportRotation.db2", DB6Metas.TransportRotationMeta, HotfixStatements.SEL_TRANSPORT_ROTATION); UnitPowerBarStorage = DB6Reader.Read("UnitPowerBar.db2", DB6Metas.UnitPowerBarMeta, HotfixStatements.SEL_UNIT_POWER_BAR, HotfixStatements.SEL_UNIT_POWER_BAR_LOCALE); VehicleStorage = DB6Reader.Read("Vehicle.db2", DB6Metas.VehicleMeta, HotfixStatements.SEL_VEHICLE); VehicleSeatStorage = DB6Reader.Read("VehicleSeat.db2", DB6Metas.VehicleSeatMeta, HotfixStatements.SEL_VEHICLE_SEAT); WMOAreaTableStorage = DB6Reader.Read("WMOAreaTable.db2", DB6Metas.WMOAreaTableMeta, HotfixStatements.SEL_WMO_AREA_TABLE, HotfixStatements.SEL_WMO_AREA_TABLE_LOCALE); WorldMapAreaStorage = DB6Reader.Read("WorldMapArea.db2", DB6Metas.WorldMapAreaMeta, HotfixStatements.SEL_WORLD_MAP_AREA); WorldMapOverlayStorage = DB6Reader.Read("WorldMapOverlay.db2", DB6Metas.WorldMapOverlayMeta, HotfixStatements.SEL_WORLD_MAP_OVERLAY); WorldMapTransformsStorage = DB6Reader.Read("WorldMapTransforms.db2", DB6Metas.WorldMapTransformsMeta, HotfixStatements.SEL_WORLD_MAP_TRANSFORMS); WorldSafeLocsStorage = DB6Reader.Read("WorldSafeLocs.db2", DB6Metas.WorldSafeLocsMeta, HotfixStatements.SEL_WORLD_SAFE_LOCS, HotfixStatements.SEL_WORLD_SAFE_LOCS_LOCALE); foreach (var entry in TaxiPathStorage.Values) { if (!TaxiPathSetBySource.ContainsKey(entry.From)) TaxiPathSetBySource.Add(entry.From, new Dictionary()); TaxiPathSetBySource[entry.From][entry.To] = new TaxiPathBySourceAndDestination(entry.Id, entry.Cost); } uint pathCount = TaxiPathStorage.Keys.Max() + 1; // Calculate path nodes count uint[] pathLength = new uint[pathCount]; // 0 and some other indexes not used foreach (TaxiPathNodeRecord entry in CliDB.TaxiPathNodeStorage.Values) if (pathLength[entry.PathID] < entry.NodeIndex + 1) pathLength[entry.PathID] = entry.NodeIndex + 1u; // Set path length for (uint i = 0; i < pathCount; ++i) TaxiPathNodesByPath[i] = new TaxiPathNodeRecord[pathLength[i]]; // fill data foreach (var entry in TaxiPathNodeStorage.Values) TaxiPathNodesByPath[entry.PathID][entry.NodeIndex] = entry; TaxiPathNodeStorage = null; foreach (var node in TaxiNodesStorage.Values) { if (!node.Flags.HasAnyFlag(TaxiNodeFlags.Alliance | TaxiNodeFlags.Horde)) continue; // valid taxi network node byte field = (byte)((node.Id - 1) / 8); byte submask = (byte)(1 << (int)((node.Id - 1) % 8)); TaxiNodesMask[field] |= submask; if (node.Flags.HasAnyFlag(TaxiNodeFlags.Horde)) HordeTaxiNodesMask[field] |= submask; if (node.Flags.HasAnyFlag(TaxiNodeFlags.Alliance)) AllianceTaxiNodesMask[field] |= submask; uint nodeMap; Global.DB2Mgr.DeterminaAlternateMapPosition(node.MapID, node.Pos.X, node.Pos.Y, node.Pos.Z, out nodeMap); if (nodeMap < 2) OldContinentsNodesMask[field] |= submask; } Global.DB2Mgr.LoadStores(); // Check loaded DB2 files proper version if (!AreaTableStorage.ContainsKey(8485) || // last area (areaflag) added in 7.0.3 (22594) !CharTitlesStorage.ContainsKey(486) || // last char title added in 7.0.3 (22594) !GemPropertiesStorage.ContainsKey(3363) || // last gem property added in 7.0.3 (22594) !ItemStorage.ContainsKey(142526) || // last item added in 7.0.3 (22594) !ItemExtendedCostStorage.ContainsKey(6125) || // last item extended cost added in 7.0.3 (22594) !MapStorage.ContainsKey(1670) || // last map added in 7.0.3 (22594) !SpellStorage.ContainsKey(231371)) // last spell added in 7.0.3 (22594) { Log.outError(LogFilter.Misc, "You have _outdated_ DB2 files. Please extract correct versions from current using client."); Global.WorldMgr.ShutdownServ(10, ShutdownMask.Force, ShutdownExitCode.Error); } Log.outInfo(LogFilter.ServerLoading, "Initialized {0} DB2 data storages in {1} ms", LoadedFileCount, Time.GetMSTimeDiffToNow(oldMSTime)); } public static void LoadGameTables(string dataPath) { uint oldMSTime = Time.GetMSTime(); LoadedFileCount = 0; DataPath = dataPath + "/gt/"; ArmorMitigationByLvlGameTable = GameTableReader.Read("ArmorMitigationByLvl.txt"); ArtifactKnowledgeMultiplierGameTable = GameTableReader.Read("ArtifactKnowledgeMultiplier.txt"); ArtifactLevelXPGameTable = GameTableReader.Read("artifactLevelXP.txt"); BarberShopCostBaseGameTable = GameTableReader.Read("BarberShopCostBase.txt"); BaseMPGameTable = GameTableReader.Read("BaseMp.txt"); CombatRatingsGameTable = GameTableReader.Read("CombatRatings.txt"); CombatRatingsMultByILvlGameTable = GameTableReader.Read("CombatRatingsMultByILvl.txt"); ItemSocketCostPerLevelGameTable = GameTableReader.Read("ItemSocketCostPerLevel.txt"); HonorLevelGameTable = GameTableReader.Read("HonorLevel.txt"); HpPerStaGameTable = GameTableReader.Read("HpPerSta.txt"); NpcDamageByClassGameTable[0] = GameTableReader.Read("NpcDamageByClass.txt"); NpcDamageByClassGameTable[1] = GameTableReader.Read("NpcDamageByClassExp1.txt"); NpcDamageByClassGameTable[2] = GameTableReader.Read("NpcDamageByClassExp2.txt"); NpcDamageByClassGameTable[3] = GameTableReader.Read("NpcDamageByClassExp3.txt"); NpcDamageByClassGameTable[4] = GameTableReader.Read("NpcDamageByClassExp4.txt"); NpcDamageByClassGameTable[5] = GameTableReader.Read("NpcDamageByClassExp5.txt"); NpcDamageByClassGameTable[6] = GameTableReader.Read("NpcDamageByClassExp6.txt"); NpcManaCostScalerGameTable = GameTableReader.Read("NPCManaCostScaler.txt"); NpcTotalHpGameTable[0] = GameTableReader.Read("NpcTotalHp.txt"); NpcTotalHpGameTable[1] = GameTableReader.Read("NpcTotalHpExp1.txt"); NpcTotalHpGameTable[2] = GameTableReader.Read("NpcTotalHpExp2.txt"); NpcTotalHpGameTable[3] = GameTableReader.Read("NpcTotalHpExp3.txt"); NpcTotalHpGameTable[4] = GameTableReader.Read("NpcTotalHpExp4.txt"); NpcTotalHpGameTable[5] = GameTableReader.Read("NpcTotalHpExp5.txt"); NpcTotalHpGameTable[6] = GameTableReader.Read("NpcTotalHpExp6.txt"); SpellScalingGameTable = GameTableReader.Read("SpellScaling.txt"); XpGameTable = GameTableReader.Read("xp.txt"); Log.outInfo(LogFilter.ServerLoading, "Initialized {0} DBC GameTables data stores in {1} ms", LoadedFileCount, Time.GetMSTimeDiffToNow(oldMSTime)); } #region Main Collections public static DB6Storage AchievementStorage; public static DB6Storage AnimKitStorage; public static DB6Storage AreaGroupMemberStorage; public static DB6Storage AreaTableStorage; public static DB6Storage AreaTriggerStorage; public static DB6Storage ArmorLocationStorage; public static DB6Storage ArtifactStorage; public static DB6Storage ArtifactAppearanceStorage; public static DB6Storage ArtifactAppearanceSetStorage; public static DB6Storage ArtifactCategoryStorage; public static DB6Storage ArtifactPowerStorage; public static DB6Storage ArtifactPowerLinkStorage; public static DB6Storage ArtifactPowerPickerStorage; public static DB6Storage ArtifactPowerRankStorage; //public static DB6Storage ArtifactQuestXPStorage; public static DB6Storage AuctionHouseStorage; public static DB6Storage BankBagSlotPricesStorage; //public static DB6Storage BannedAddOnsStorage; public static DB6Storage BarberShopStyleStorage; public static DB6Storage BattlePetBreedQualityStorage; public static DB6Storage BattlePetBreedStateStorage; public static DB6Storage BattlePetSpeciesStorage; public static DB6Storage BattlePetSpeciesStateStorage; public static DB6Storage BattlemasterListStorage; public static DB6Storage BroadcastTextStorage; public static DB6Storage CharacterFacialHairStylesStorage; public static DB6Storage CharBaseSectionStorage; public static DB6Storage CharSectionsStorage; public static DB6Storage CharStartOutfitStorage; public static DB6Storage CharTitlesStorage; public static DB6Storage ChatChannelsStorage; public static DB6Storage ChrClassesStorage; public static DB6Storage ChrClassesXPowerTypesStorage; public static DB6Storage ChrRacesStorage; public static DB6Storage ChrSpecializationStorage; public static DB6Storage CinematicCameraStorage; public static DB6Storage CinematicSequencesStorage; public static DB6Storage ConversationLineStorage; public static DB6Storage CreatureDisplayInfoStorage; public static DB6Storage CreatureDisplayInfoExtraStorage; public static DB6Storage CreatureFamilyStorage; public static DB6Storage CreatureModelDataStorage; public static DB6Storage CreatureTypeStorage; public static DB6Storage CriteriaStorage; public static DB6Storage CriteriaTreeStorage; public static DB6Storage CurrencyTypesStorage; public static DB6Storage CurveStorage; public static DB6Storage CurvePointStorage; public static DB6Storage DestructibleModelDataStorage; public static DB6Storage DifficultyStorage; public static DB6Storage DungeonEncounterStorage; public static DB6Storage DurabilityCostsStorage; public static DB6Storage DurabilityQualityStorage; public static DB6Storage EmotesStorage; public static DB6Storage EmotesTextStorage; public static DB6Storage EmotesTextSoundStorage; public static DB6Storage FactionStorage; public static DB6Storage FactionTemplateStorage; public static DB6Storage GameObjectsStorage; public static DB6Storage GameObjectDisplayInfoStorage; public static DB6Storage GarrAbilityStorage; public static DB6Storage GarrBuildingStorage; public static DB6Storage GarrBuildingPlotInstStorage; public static DB6Storage GarrClassSpecStorage; public static DB6Storage GarrFollowerStorage; public static DB6Storage GarrFollowerXAbilityStorage; public static DB6Storage GarrPlotBuildingStorage; public static DB6Storage GarrPlotStorage; public static DB6Storage GarrPlotInstanceStorage; public static DB6Storage GarrSiteLevelStorage; public static DB6Storage GarrSiteLevelPlotInstStorage; public static DB6Storage GemPropertiesStorage; public static DB6Storage GlyphBindableSpellStorage; public static DB6Storage GlyphPropertiesStorage; public static DB6Storage GlyphRequiredSpecStorage; public static DB6Storage GuildColorBackgroundStorage; public static DB6Storage GuildColorBorderStorage; public static DB6Storage GuildColorEmblemStorage; public static DB6Storage GuildPerkSpellsStorage; public static DB6Storage HeirloomStorage; public static DB6Storage HolidaysStorage; public static DB6Storage ImportPriceArmorStorage; public static DB6Storage ImportPriceQualityStorage; public static DB6Storage ImportPriceShieldStorage; public static DB6Storage ImportPriceWeaponStorage; public static DB6Storage ItemAppearanceStorage; public static DB6Storage ItemArmorQualityStorage; public static DB6Storage ItemArmorShieldStorage; public static DB6Storage ItemArmorTotalStorage; //public static DB6Storage ItemBagFamilyStorage; public static DB6Storage ItemBonusStorage; public static DB6Storage ItemBonusListLevelDeltaStorage; public static DB6Storage ItemBonusTreeNodeStorage; public static DB6Storage ItemClassStorage; public static DB6Storage ItemChildEquipmentStorage; public static DB6Storage ItemCurrencyCostStorage; public static DB6Storage ItemDamageAmmoStorage; public static DB6Storage ItemDamageOneHandStorage; public static DB6Storage ItemDamageOneHandCasterStorage; public static DB6Storage ItemDamageTwoHandStorage; public static DB6Storage ItemDamageTwoHandCasterStorage; public static DB6Storage ItemDisenchantLootStorage; public static DB6Storage ItemEffectStorage; public static DB6Storage ItemStorage; public static DB6Storage ItemExtendedCostStorage; public static DB6Storage ItemLevelSelectorStorage; public static DB6Storage ItemLimitCategoryStorage; public static DB6Storage ItemModifiedAppearanceStorage; public static DB6Storage ItemPriceBaseStorage; public static DB6Storage ItemRandomPropertiesStorage; public static DB6Storage ItemRandomSuffixStorage; public static DB6Storage ItemSearchNameStorage; public static DB6Storage ItemSetStorage; public static DB6Storage ItemSetSpellStorage; public static DB6Storage ItemSparseStorage; public static DB6Storage ItemSpecStorage; public static DB6Storage ItemSpecOverrideStorage; public static DB6Storage ItemUpgradeStorage; public static DB6Storage ItemXBonusTreeStorage; //public static DB6Storage KeyChainStorage; public static DB6Storage LfgDungeonsStorage; public static DB6Storage LightStorage; public static DB6Storage LiquidTypeStorage; public static DB6Storage LockStorage; public static DB6Storage MailTemplateStorage; public static DB6Storage MapStorage; public static DB6Storage MapDifficultyStorage; public static DB6Storage ModifierTreeStorage; public static DB6Storage MountCapabilityStorage; public static DB6Storage MountStorage; public static DB6Storage MountTypeXCapabilityStorage; public static DB6Storage MountXDisplayStorage; public static DB6Storage MovieStorage; public static DB6Storage NameGenStorage; public static DB6Storage NamesProfanityStorage; public static DB6Storage NamesReservedStorage; public static DB6Storage NamesReservedLocaleStorage; public static DB6Storage OverrideSpellDataStorage; public static DB6Storage PhaseStorage; public static DB6Storage PhaseXPhaseGroupStorage; public static DB6Storage PlayerConditionStorage; public static DB6Storage PowerDisplayStorage; public static DB6Storage PowerTypeStorage; public static DB6Storage PrestigeLevelInfoStorage; public static DB6Storage PvpDifficultyStorage; public static DB6Storage PvpRewardStorage; public static DB6Storage QuestFactionRewardStorage; public static DB6Storage QuestMoneyRewardStorage; public static DB6Storage QuestPackageItemStorage; public static DB6Storage QuestSortStorage; public static DB6Storage QuestV2Storage; public static DB6Storage QuestXPStorage; public static DB6Storage RandPropPointsStorage; public static DB6Storage RewardPackStorage; public static DB6Storage RewardPackXItemStorage; public static DB6Storage RulesetItemUpgradeStorage; public static DB6Storage ScalingStatDistributionStorage; public static DB6Storage ScenarioStorage; public static DB6Storage ScenarioStepStorage; //public static DB6Storage SceneScriptStorage; public static DB6Storage SceneScriptPackageStorage; public static DB6Storage SkillLineStorage; public static DB6Storage SkillLineAbilityStorage; public static DB6Storage SkillRaceClassInfoStorage; public static DB6Storage SoundKitStorage; public static DB6Storage SpecializationSpellsStorage; public static DB6Storage SpellStorage; public static DB6Storage SpellAuraOptionsStorage; public static DB6Storage SpellAuraRestrictionsStorage; public static DB6Storage SpellCastTimesStorage; public static DB6Storage SpellCastingRequirementsStorage; public static DB6Storage SpellCategoriesStorage; public static DB6Storage SpellCategoryStorage; public static DB6Storage SpellClassOptionsStorage; public static DB6Storage SpellCooldownsStorage; public static DB6Storage SpellDurationStorage; public static DB6Storage SpellEffectStorage; public static DB6Storage SpellEffectScalingStorage; public static DB6Storage SpellEquippedItemsStorage; public static DB6Storage SpellFocusObjectStorage; public static DB6Storage SpellInterruptsStorage; public static DB6Storage SpellItemEnchantmentStorage; public static DB6Storage SpellItemEnchantmentConditionStorage; public static DB6Storage SpellLearnSpellStorage; public static DB6Storage SpellLevelsStorage; public static DB6Storage SpellMiscStorage; public static DB6Storage SpellPowerStorage; public static DB6Storage SpellPowerDifficultyStorage; public static DB6Storage SpellProcsPerMinuteStorage; public static DB6Storage SpellProcsPerMinuteModStorage; public static DB6Storage SpellRadiusStorage; public static DB6Storage SpellRangeStorage; public static DB6Storage SpellReagentsStorage; public static DB6Storage SpellScalingStorage; public static DB6Storage SpellShapeshiftStorage; public static DB6Storage SpellShapeshiftFormStorage; public static DB6Storage SpellTargetRestrictionsStorage; public static DB6Storage SpellTotemsStorage; public static DB6Storage SpellXSpellVisualStorage; public static DB6Storage SummonPropertiesStorage; //public static DB6Storage TactKeyStorage; public static DB6Storage TalentStorage; public static DB6Storage TaxiNodesStorage; public static DB6Storage TaxiPathStorage; public static DB6Storage TaxiPathNodeStorage; public static DB6Storage TotemCategoryStorage; public static DB6Storage ToyStorage; public static DB6Storage TransmogHolidayStorage; public static DB6Storage TransmogSetStorage; public static DB6Storage TransmogSetGroupStorage; public static DB6Storage TransmogSetItemStorage; public static DB6Storage TransportAnimationStorage; public static DB6Storage TransportRotationStorage; public static DB6Storage UnitPowerBarStorage; public static DB6Storage VehicleStorage; public static DB6Storage VehicleSeatStorage; public static DB6Storage WMOAreaTableStorage; public static DB6Storage WorldMapAreaStorage; public static DB6Storage WorldMapOverlayStorage; public static DB6Storage WorldMapTransformsStorage; public static DB6Storage WorldSafeLocsStorage; #endregion #region GameTables public static GameTable ArmorMitigationByLvlGameTable; public static GameTable ArtifactKnowledgeMultiplierGameTable; public static GameTable ArtifactLevelXPGameTable; public static GameTable BarberShopCostBaseGameTable; public static GameTable BaseMPGameTable; public static GameTable CombatRatingsGameTable; public static GameTable CombatRatingsMultByILvlGameTable; public static GameTable HonorLevelGameTable; public static GameTable HpPerStaGameTable; public static GameTable ItemSocketCostPerLevelGameTable; public static GameTable[] NpcDamageByClassGameTable = new GameTable[(int)Expansion.Max]; public static GameTable NpcManaCostScalerGameTable; public static GameTable[] NpcTotalHpGameTable = new GameTable[(int)Expansion.Max]; public static GameTable SpellScalingGameTable; public static GameTable XpGameTable; #endregion #region Taxi Collections public static byte[] TaxiNodesMask = new byte[PlayerConst.TaxiMaskSize]; public static byte[] OldContinentsNodesMask = new byte[PlayerConst.TaxiMaskSize]; public static byte[] HordeTaxiNodesMask = new byte[PlayerConst.TaxiMaskSize]; public static byte[] AllianceTaxiNodesMask = new byte[PlayerConst.TaxiMaskSize]; public static Dictionary> TaxiPathSetBySource = new Dictionary>(); public static Dictionary TaxiPathNodesByPath = new Dictionary(); #endregion #region Helper Methods public static float GetGameTableColumnForClass(dynamic row, Class class_) { switch (class_) { case Class.Warrior: return row.Warrior; case Class.Paladin: return row.Paladin; case Class.Hunter: return row.Hunter; case Class.Rogue: return row.Rogue; case Class.Priest: return row.Priest; case Class.Deathknight: return row.DeathKnight; case Class.Shaman: return row.Shaman; case Class.Mage: return row.Mage; case Class.Warlock: return row.Warlock; case Class.Monk: return row.Monk; case Class.Druid: return row.Druid; case Class.DemonHunter: return row.DemonHunter; default: break; } return 0.0f; } public static float GetSpellScalingColumnForClass(GtSpellScalingRecord row, int class_) { switch (class_) { case (int)Class.Warrior: return row.Warrior; case (int)Class.Paladin: return row.Paladin; case (int)Class.Hunter: return row.Hunter; case (int)Class.Rogue: return row.Rogue; case (int)Class.Priest: return row.Priest; case (int)Class.Deathknight: return row.DeathKnight; case (int)Class.Shaman: return row.Shaman; case (int)Class.Mage: return row.Mage; case (int)Class.Warlock: return row.Warlock; case (int)Class.Monk: return row.Monk; case (int)Class.Druid: return row.Druid; case (int)Class.DemonHunter: return row.DemonHunter; case -1: return row.Item; case -2: return row.Consumable; case -3: return row.Gem1; case -4: return row.Gem2; case -5: return row.Gem3; case -6: return row.Health; default: break; } return 0.0f; } #endregion } }