/* * Copyright (C) 2012-2018 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 = DBReader.Read("Achievement.db2", HotfixStatements.SEL_ACHIEVEMENT, HotfixStatements.SEL_ACHIEVEMENT_LOCALE); AnimationDataStorage = DBReader.Read("AnimationData.db2", HotfixStatements.SEL_ANIMATION_DATA); AnimKitStorage = DBReader.Read("AnimKit.db2", HotfixStatements.SEL_ANIM_KIT); AreaGroupMemberStorage = DBReader.Read("AreaGroupMember.db2", HotfixStatements.SEL_AREA_GROUP_MEMBER); AreaTableStorage = DBReader.Read("AreaTable.db2", HotfixStatements.SEL_AREA_TABLE, HotfixStatements.SEL_AREA_TABLE_LOCALE); AreaTriggerStorage = DBReader.Read("AreaTrigger.db2", HotfixStatements.SEL_AREA_TRIGGER); ArmorLocationStorage = DBReader.Read("ArmorLocation.db2", HotfixStatements.SEL_ARMOR_LOCATION); ArtifactStorage = DBReader.Read("Artifact.db2", HotfixStatements.SEL_ARTIFACT, HotfixStatements.SEL_ARTIFACT_APPEARANCE_LOCALE); ArtifactAppearanceStorage = DBReader.Read("ArtifactAppearance.db2", HotfixStatements.SEL_ARTIFACT_APPEARANCE, HotfixStatements.SEL_ARTIFACT_APPEARANCE_LOCALE); ArtifactAppearanceSetStorage = DBReader.Read("ArtifactAppearanceSet.db2", HotfixStatements.SEL_ARTIFACT_APPEARANCE_SET, HotfixStatements.SEL_ARTIFACT_APPEARANCE_SET_LOCALE); ArtifactCategoryStorage = DBReader.Read("ArtifactCategory.db2", HotfixStatements.SEL_ARTIFACT_CATEGORY); ArtifactPowerStorage = DBReader.Read("ArtifactPower.db2", HotfixStatements.SEL_ARTIFACT_POWER); ArtifactPowerLinkStorage = DBReader.Read("ArtifactPowerLink.db2", HotfixStatements.SEL_ARTIFACT_POWER_LINK); ArtifactPowerPickerStorage = DBReader.Read("ArtifactPowerPicker.db2", HotfixStatements.SEL_ARTIFACT_POWER_PICKER); ArtifactPowerRankStorage = DBReader.Read("ArtifactPowerRank.db2", HotfixStatements.SEL_ARTIFACT_POWER_RANK); //ArtifactQuestXPStorage = DBReader.Read("ArtifactQuestXP.db2", HotfixStatements.SEL_ARTIFACT_QUEST_XP); ArtifactTierStorage = DBReader.Read ("ArtifactTier.db2", HotfixStatements.SEL_ARTIFACT_TIER); ArtifactUnlockStorage = DBReader.Read ("ArtifactUnlock.db2", HotfixStatements.SEL_ARTIFACT_UNLOCK); AuctionHouseStorage = DBReader.Read("AuctionHouse.db2", HotfixStatements.SEL_AUCTION_HOUSE, HotfixStatements.SEL_AUCTION_HOUSE_LOCALE); BankBagSlotPricesStorage = DBReader.Read("BankBagSlotPrices.db2", HotfixStatements.SEL_BANK_BAG_SLOT_PRICES); //BannedAddOnsStorage = DBReader.Read("BannedAddons.db2", HotfixStatements.SEL_BANNED_ADDONS); BarberShopStyleStorage = DBReader.Read("BarberShopStyle.db2", HotfixStatements.SEL_BARBER_SHOP_STYLE, HotfixStatements.SEL_BARBER_SHOP_STYLE_LOCALE); BattlePetBreedQualityStorage = DBReader.Read("BattlePetBreedQuality.db2", HotfixStatements.SEL_BATTLE_PET_BREED_QUALITY); BattlePetBreedStateStorage = DBReader.Read("BattlePetBreedState.db2", HotfixStatements.SEL_BATTLE_PET_BREED_STATE); BattlePetSpeciesStorage = DBReader.Read("BattlePetSpecies.db2", HotfixStatements.SEL_BATTLE_PET_SPECIES, HotfixStatements.SEL_BATTLE_PET_SPECIES_LOCALE); BattlePetSpeciesStateStorage = DBReader.Read("BattlePetSpeciesState.db2", HotfixStatements.SEL_BATTLE_PET_SPECIES_STATE); BattlemasterListStorage = DBReader.Read("BattlemasterList.db2", HotfixStatements.SEL_BATTLEMASTER_LIST, HotfixStatements.SEL_BATTLEMASTER_LIST_LOCALE); BroadcastTextStorage = DBReader.Read("BroadcastText.db2", HotfixStatements.SEL_BROADCAST_TEXT, HotfixStatements.SEL_BROADCAST_TEXT_LOCALE); CharacterFacialHairStylesStorage = DBReader.Read("CharacterFacialHairStyles.db2", HotfixStatements.SEL_CHARACTER_FACIAL_HAIR_STYLES); CharBaseSectionStorage = DBReader.Read("CharBaseSection.db2", HotfixStatements.SEL_CHAR_BASE_SECTION); CharSectionsStorage = DBReader.Read("CharSections.db2", HotfixStatements.SEL_CHAR_SECTIONS); CharStartOutfitStorage = DBReader.Read("CharStartOutfit.db2", HotfixStatements.SEL_CHAR_START_OUTFIT); CharTitlesStorage = DBReader.Read("CharTitles.db2", HotfixStatements.SEL_CHAR_TITLES, HotfixStatements.SEL_CHAR_TITLES_LOCALE); ChatChannelsStorage = DBReader.Read("ChatChannels.db2", HotfixStatements.SEL_CHAT_CHANNELS, HotfixStatements.SEL_CHAT_CHANNELS_LOCALE); ChrClassesStorage = DBReader.Read("ChrClasses.db2", HotfixStatements.SEL_CHR_CLASSES, HotfixStatements.SEL_CHR_CLASSES_LOCALE); ChrClassesXPowerTypesStorage = DBReader.Read("ChrClassesXPowerTypes.db2", HotfixStatements.SEL_CHR_CLASSES_X_POWER_TYPES); ChrRacesStorage = DBReader.Read("ChrRaces.db2", HotfixStatements.SEL_CHR_RACES, HotfixStatements.SEL_CHR_RACES_LOCALE); ChrSpecializationStorage = DBReader.Read("ChrSpecialization.db2", HotfixStatements.SEL_CHR_SPECIALIZATION, HotfixStatements.SEL_CHR_SPECIALIZATION_LOCALE); CinematicCameraStorage = DBReader.Read("CinematicCamera.db2", HotfixStatements.SEL_CINEMATIC_CAMERA); CinematicSequencesStorage = DBReader.Read("CinematicSequences.db2", HotfixStatements.SEL_CINEMATIC_SEQUENCES); ContentTuningStorage = DBReader.Read("ContentTuning.db2", HotfixStatements.SEL_CONTENT_TUNING); ConversationLineStorage = DBReader.Read("ConversationLine.db2", HotfixStatements.SEL_CONVERSATION_LINE); CreatureDisplayInfoStorage = DBReader.Read("CreatureDisplayInfo.db2", HotfixStatements.SEL_CREATURE_DISPLAY_INFO); CreatureDisplayInfoExtraStorage = DBReader.Read("CreatureDisplayInfoExtra.db2", HotfixStatements.SEL_CREATURE_DISPLAY_INFO_EXTRA); CreatureFamilyStorage = DBReader.Read("CreatureFamily.db2", HotfixStatements.SEL_CREATURE_FAMILY, HotfixStatements.SEL_CREATURE_FAMILY_LOCALE); CreatureModelDataStorage = DBReader.Read("CreatureModelData.db2", HotfixStatements.SEL_CREATURE_MODEL_DATA); CreatureTypeStorage = DBReader.Read("CreatureType.db2", HotfixStatements.SEL_CREATURE_TYPE, HotfixStatements.SEL_CREATURE_TYPE_LOCALE); CriteriaStorage = DBReader.Read("Criteria.db2", HotfixStatements.SEL_CRITERIA); CriteriaTreeStorage = DBReader.Read("CriteriaTree.db2", HotfixStatements.SEL_CRITERIA_TREE, HotfixStatements.SEL_CRITERIA_TREE_LOCALE); CurrencyTypesStorage = DBReader.Read("CurrencyTypes.db2", HotfixStatements.SEL_CURRENCY_TYPES, HotfixStatements.SEL_CURRENCY_TYPES_LOCALE); CurveStorage = DBReader.Read("Curve.db2", HotfixStatements.SEL_CURVE); CurvePointStorage = DBReader.Read("CurvePoint.db2", HotfixStatements.SEL_CURVE_POINT); DestructibleModelDataStorage = DBReader.Read("DestructibleModelData.db2", HotfixStatements.SEL_DESTRUCTIBLE_MODEL_DATA); DifficultyStorage = DBReader.Read("Difficulty.db2", HotfixStatements.SEL_DIFFICULTY, HotfixStatements.SEL_DIFFICULTY_LOCALE); DungeonEncounterStorage = DBReader.Read("DungeonEncounter.db2", HotfixStatements.SEL_DUNGEON_ENCOUNTER, HotfixStatements.SEL_DUNGEON_ENCOUNTER_LOCALE); DurabilityCostsStorage = DBReader.Read("DurabilityCosts.db2", HotfixStatements.SEL_DURABILITY_COSTS); DurabilityQualityStorage = DBReader.Read("DurabilityQuality.db2", HotfixStatements.SEL_DURABILITY_QUALITY); EmotesStorage = DBReader.Read("Emotes.db2", HotfixStatements.SEL_EMOTES); EmotesTextStorage = DBReader.Read("EmotesText.db2", HotfixStatements.SEL_EMOTES_TEXT); EmotesTextSoundStorage = DBReader.Read("EmotesTextSound.db2", HotfixStatements.SEL_EMOTES_TEXT_SOUND); ExpectedStatStorage = DBReader.Read ("ExpectedStat.db2", HotfixStatements.SEL_EXPECTED_STAT); ExpectedStatModStorage = DBReader.Read ("ExpectedStatMod.db2", HotfixStatements.SEL_EXPECTED_STAT_MOD); FactionStorage = DBReader.Read("Faction.db2", HotfixStatements.SEL_FACTION, HotfixStatements.SEL_FACTION_LOCALE); FactionTemplateStorage = DBReader.Read("FactionTemplate.db2", HotfixStatements.SEL_FACTION_TEMPLATE); GameObjectDisplayInfoStorage = DBReader.Read("GameObjectDisplayInfo.db2", HotfixStatements.SEL_GAMEOBJECT_DISPLAY_INFO); GameObjectsStorage = DBReader.Read("GameObjects.db2", HotfixStatements.SEL_GAMEOBJECTS, HotfixStatements.SEL_GAMEOBJECTS_LOCALE); GarrAbilityStorage = DBReader.Read("GarrAbility.db2", HotfixStatements.SEL_GARR_ABILITY, HotfixStatements.SEL_GARR_ABILITY_LOCALE); GarrBuildingStorage = DBReader.Read("GarrBuilding.db2", HotfixStatements.SEL_GARR_BUILDING, HotfixStatements.SEL_GARR_BUILDING_LOCALE); GarrBuildingPlotInstStorage = DBReader.Read("GarrBuildingPlotInst.db2", HotfixStatements.SEL_GARR_BUILDING_PLOT_INST); GarrClassSpecStorage = DBReader.Read("GarrClassSpec.db2", HotfixStatements.SEL_GARR_CLASS_SPEC, HotfixStatements.SEL_GARR_CLASS_SPEC_LOCALE); GarrFollowerStorage = DBReader.Read("GarrFollower.db2", HotfixStatements.SEL_GARR_FOLLOWER, HotfixStatements.SEL_GARR_FOLLOWER_LOCALE); GarrFollowerXAbilityStorage = DBReader.Read("GarrFollowerXAbility.db2", HotfixStatements.SEL_GARR_FOLLOWER_X_ABILITY); GarrPlotStorage = DBReader.Read("GarrPlot.db2", HotfixStatements.SEL_GARR_PLOT); GarrPlotBuildingStorage = DBReader.Read("GarrPlotBuilding.db2", HotfixStatements.SEL_GARR_PLOT_BUILDING); GarrPlotInstanceStorage = DBReader.Read("GarrPlotInstance.db2", HotfixStatements.SEL_GARR_PLOT_INSTANCE); GarrSiteLevelStorage = DBReader.Read("GarrSiteLevel.db2", HotfixStatements.SEL_GARR_SITE_LEVEL); GarrSiteLevelPlotInstStorage = DBReader.Read("GarrSiteLevelPlotInst.db2", HotfixStatements.SEL_GARR_SITE_LEVEL_PLOT_INST); GemPropertiesStorage = DBReader.Read("GemProperties.db2", HotfixStatements.SEL_GEM_PROPERTIES); GlyphBindableSpellStorage = DBReader.Read("GlyphBindableSpell.db2", HotfixStatements.SEL_GLYPH_BINDABLE_SPELL); GlyphPropertiesStorage = DBReader.Read("GlyphProperties.db2", HotfixStatements.SEL_GLYPH_PROPERTIES); GlyphRequiredSpecStorage = DBReader.Read("GlyphRequiredSpec.db2", HotfixStatements.SEL_GLYPH_REQUIRED_SPEC); GuildColorBackgroundStorage = DBReader.Read("GuildColorBackground.db2", HotfixStatements.SEL_GUILD_COLOR_BACKGROUND); GuildColorBorderStorage = DBReader.Read("GuildColorBorder.db2", HotfixStatements.SEL_GUILD_COLOR_BORDER); GuildColorEmblemStorage = DBReader.Read("GuildColorEmblem.db2", HotfixStatements.SEL_GUILD_COLOR_EMBLEM); GuildPerkSpellsStorage = DBReader.Read("GuildPerkSpells.db2", HotfixStatements.SEL_GUILD_PERK_SPELLS); HeirloomStorage = DBReader.Read("Heirloom.db2", HotfixStatements.SEL_HEIRLOOM, HotfixStatements.SEL_HEIRLOOM_LOCALE); HolidaysStorage = DBReader.Read("Holidays.db2", HotfixStatements.SEL_HOLIDAYS); ImportPriceArmorStorage = DBReader.Read("ImportPriceArmor.db2", HotfixStatements.SEL_IMPORT_PRICE_ARMOR); ImportPriceQualityStorage = DBReader.Read("ImportPriceQuality.db2", HotfixStatements.SEL_IMPORT_PRICE_QUALITY); ImportPriceShieldStorage = DBReader.Read("ImportPriceShield.db2", HotfixStatements.SEL_IMPORT_PRICE_SHIELD); ImportPriceWeaponStorage = DBReader.Read("ImportPriceWeapon.db2", HotfixStatements.SEL_IMPORT_PRICE_WEAPON); ItemAppearanceStorage = DBReader.Read("ItemAppearance.db2", HotfixStatements.SEL_ITEM_APPEARANCE); ItemArmorQualityStorage = DBReader.Read("ItemArmorQuality.db2", HotfixStatements.SEL_ITEM_ARMOR_QUALITY); ItemArmorShieldStorage = DBReader.Read("ItemArmorShield.db2", HotfixStatements.SEL_ITEM_ARMOR_SHIELD); ItemArmorTotalStorage = DBReader.Read("ItemArmorTotal.db2", HotfixStatements.SEL_ITEM_ARMOR_TOTAL); //ItemBagFamilyStorage = DBReader.Read("ItemBagFamily.db2", HotfixStatements.SEL_ITEM_BAG_FAMILY, HotfixStatements.SEL_ITEM_BAG_FAMILY_LOCALE); ItemBonusStorage = DBReader.Read("ItemBonus.db2", HotfixStatements.SEL_ITEM_BONUS); ItemBonusListLevelDeltaStorage = DBReader.Read("ItemBonusListLevelDelta.db2", HotfixStatements.SEL_ITEM_BONUS_LIST_LEVEL_DELTA); ItemBonusTreeNodeStorage = DBReader.Read("ItemBonusTreeNode.db2", HotfixStatements.SEL_ITEM_BONUS_TREE_NODE); ItemChildEquipmentStorage = DBReader.Read("ItemChildEquipment.db2", HotfixStatements.SEL_ITEM_CHILD_EQUIPMENT); ItemClassStorage = DBReader.Read("ItemClass.db2", HotfixStatements.SEL_ITEM_CLASS, HotfixStatements.SEL_ITEM_CLASS_LOCALE); ItemCurrencyCostStorage = DBReader.Read("ItemCurrencyCost.db2", HotfixStatements.SEL_ITEM_CURRENCY_COST); ItemDamageAmmoStorage = DBReader.Read("ItemDamageAmmo.db2", HotfixStatements.SEL_ITEM_DAMAGE_AMMO); ItemDamageOneHandStorage = DBReader.Read("ItemDamageOneHand.db2", HotfixStatements.SEL_ITEM_DAMAGE_ONE_HAND); ItemDamageOneHandCasterStorage = DBReader.Read("ItemDamageOneHandCaster.db2", HotfixStatements.SEL_ITEM_DAMAGE_ONE_HAND_CASTER); ItemDamageTwoHandStorage = DBReader.Read("ItemDamageTwoHand.db2", HotfixStatements.SEL_ITEM_DAMAGE_TWO_HAND); ItemDamageTwoHandCasterStorage = DBReader.Read("ItemDamageTwoHandCaster.db2", HotfixStatements.SEL_ITEM_DAMAGE_TWO_HAND_CASTER); ItemDisenchantLootStorage = DBReader.Read("ItemDisenchantLoot.db2", HotfixStatements.SEL_ITEM_DISENCHANT_LOOT); ItemEffectStorage = DBReader.Read("ItemEffect.db2", HotfixStatements.SEL_ITEM_EFFECT); ItemStorage = DBReader.Read("Item.db2", HotfixStatements.SEL_ITEM); ItemExtendedCostStorage = DBReader.Read("ItemExtendedCost.db2", HotfixStatements.SEL_ITEM_EXTENDED_COST); ItemLevelSelectorStorage = DBReader.Read("ItemLevelSelector.db2", HotfixStatements.SEL_ITEM_LEVEL_SELECTOR); ItemLevelSelectorQualityStorage = DBReader.Read("ItemLevelSelectorQuality.db2", HotfixStatements.SEL_ITEM_LEVEL_SELECTOR_QUALITY); ItemLevelSelectorQualitySetStorage = DBReader.Read("ItemLevelSelectorQualitySet.db2", HotfixStatements.SEL_ITEM_LEVEL_SELECTOR_QUALITY_SET); ItemLimitCategoryStorage = DBReader.Read("ItemLimitCategory.db2", HotfixStatements.SEL_ITEM_LIMIT_CATEGORY, HotfixStatements.SEL_ITEM_LIMIT_CATEGORY_LOCALE); ItemLimitCategoryConditionStorage = DBReader.Read("ItemLimitCategoryCondition.db2", HotfixStatements.SEL_ITEM_LIMIT_CATEGORY_CONDITION); ItemModifiedAppearanceStorage = DBReader.Read("ItemModifiedAppearance.db2", HotfixStatements.SEL_ITEM_MODIFIED_APPEARANCE); ItemPriceBaseStorage = DBReader.Read("ItemPriceBase.db2", HotfixStatements.SEL_ITEM_PRICE_BASE); ItemRandomPropertiesStorage = DBReader.Read("ItemRandomProperties.db2", HotfixStatements.SEL_ITEM_RANDOM_PROPERTIES, HotfixStatements.SEL_ITEM_RANDOM_PROPERTIES_LOCALE); ItemRandomSuffixStorage = DBReader.Read("ItemRandomSuffix.db2", HotfixStatements.SEL_ITEM_RANDOM_SUFFIX, HotfixStatements.SEL_ITEM_RANDOM_SUFFIX_LOCALE); ItemSearchNameStorage = DBReader.Read("ItemSearchName.db2", HotfixStatements.SEL_ITEM_SEARCH_NAME, HotfixStatements.SEL_ITEM_SEARCH_NAME_LOCALE); ItemSetStorage = DBReader.Read("ItemSet.db2", HotfixStatements.SEL_ITEM_SET, HotfixStatements.SEL_ITEM_SET_LOCALE); ItemSetSpellStorage = DBReader.Read("ItemSetSpell.db2", HotfixStatements.SEL_ITEM_SET_SPELL); ItemSparseStorage = DBReader.Read("ItemSparse.db2", HotfixStatements.SEL_ITEM_SPARSE, HotfixStatements.SEL_ITEM_SPARSE_LOCALE); ItemSpecStorage = DBReader.Read("ItemSpec.db2", HotfixStatements.SEL_ITEM_SPEC); ItemSpecOverrideStorage = DBReader.Read("ItemSpecOverride.db2", HotfixStatements.SEL_ITEM_SPEC_OVERRIDE); ItemUpgradeStorage = DBReader.Read("ItemUpgrade.db2", HotfixStatements.SEL_ITEM_UPGRADE); ItemXBonusTreeStorage = DBReader.Read("ItemXBonusTree.db2", HotfixStatements.SEL_ITEM_X_BONUS_TREE); //KeyChainStorage = DBReader.Read("KeyChain.db2", HotfixStatements.SEL_KEYCHAIN); LFGDungeonsStorage = DBReader.Read("LFGDungeons.db2", HotfixStatements.SEL_LFG_DUNGEONS, HotfixStatements.SEL_LFG_DUNGEONS_LOCALE); LightStorage = DBReader.Read("Light.db2", HotfixStatements.SEL_LIGHT); LiquidTypeStorage = DBReader.Read("LiquidType.db2", HotfixStatements.SEL_LIQUID_TYPE); LockStorage = DBReader.Read("Lock.db2", HotfixStatements.SEL_LOCK); MailTemplateStorage = DBReader.Read("MailTemplate.db2", HotfixStatements.SEL_MAIL_TEMPLATE, HotfixStatements.SEL_MAIL_TEMPLATE_LOCALE); MapStorage = DBReader.Read("Map.db2", HotfixStatements.SEL_MAP, HotfixStatements.SEL_MAP_LOCALE); MapDifficultyStorage = DBReader.Read("MapDifficulty.db2", HotfixStatements.SEL_MAP_DIFFICULTY, HotfixStatements.SEL_MAP_DIFFICULTY_LOCALE); ModifierTreeStorage = DBReader.Read("ModifierTree.db2", HotfixStatements.SEL_MODIFIER_TREE); MountCapabilityStorage = DBReader.Read("MountCapability.db2", HotfixStatements.SEL_MOUNT_CAPABILITY); MountStorage = DBReader.Read("Mount.db2", HotfixStatements.SEL_MOUNT, HotfixStatements.SEL_MOUNT_LOCALE); MountTypeXCapabilityStorage = DBReader.Read("MountTypeXCapability.db2", HotfixStatements.SEL_MOUNT_TYPE_X_CAPABILITY); MountXDisplayStorage = DBReader.Read("MountXDisplay.db2", HotfixStatements.SEL_MOUNT_X_DISPLAY); MovieStorage = DBReader.Read("Movie.db2", HotfixStatements.SEL_MOVIE); NameGenStorage = DBReader.Read("NameGen.db2", HotfixStatements.SEL_NAME_GEN); NamesProfanityStorage = DBReader.Read("NamesProfanity.db2", HotfixStatements.SEL_NAMES_PROFANITY); NamesReservedStorage = DBReader.Read("NamesReserved.db2", HotfixStatements.SEL_NAMES_RESERVED, HotfixStatements.SEL_NAMES_RESERVED_LOCALE); NamesReservedLocaleStorage = DBReader.Read("NamesReservedLocale.db2", HotfixStatements.SEL_NAMES_RESERVED_LOCALE); NumTalentsAtLevelStorage = DBReader.Read("NumTalentsAtLevel.db2", HotfixStatements.SEL_NUM_TALENTS_AT_LEVEL); OverrideSpellDataStorage = DBReader.Read("OverrideSpellData.db2", HotfixStatements.SEL_OVERRIDE_SPELL_DATA); PhaseStorage = DBReader.Read("Phase.db2", HotfixStatements.SEL_PHASE); PhaseXPhaseGroupStorage = DBReader.Read("PhaseXPhaseGroup.db2", HotfixStatements.SEL_PHASE_X_PHASE_GROUP); PlayerConditionStorage = DBReader.Read("PlayerCondition.db2", HotfixStatements.SEL_PLAYER_CONDITION, HotfixStatements.SEL_PLAYER_CONDITION_LOCALE); PowerDisplayStorage = DBReader.Read("PowerDisplay.db2", HotfixStatements.SEL_POWER_DISPLAY); PowerTypeStorage = DBReader.Read("PowerType.db2", HotfixStatements.SEL_POWER_TYPE); PrestigeLevelInfoStorage = DBReader.Read("PrestigeLevelInfo.db2", HotfixStatements.SEL_PRESTIGE_LEVEL_INFO, HotfixStatements.SEL_PRESTIGE_LEVEL_INFO_LOCALE); PvpDifficultyStorage = DBReader.Read("PVPDifficulty.db2", HotfixStatements.SEL_PVP_DIFFICULTY); PvpItemStorage = DBReader.Read("PVPItem.db2", HotfixStatements.SEL_PVP_ITEM); PvpTalentStorage = DBReader.Read("PvpTalent.db2", HotfixStatements.SEL_PVP_TALENT, HotfixStatements.SEL_PVP_TALENT_LOCALE); PvpTalentCategoryStorage = DBReader.Read("PvpTalentCategory.db2", HotfixStatements.SEL_PVP_TALENT_CATEGORY); PvpTalentSlotUnlockStorage = DBReader.Read("PvpTalentSlotUnlock.db2", HotfixStatements.SEL_PVP_TALENT_SLOT_UNLOCK); QuestFactionRewardStorage = DBReader.Read("QuestFactionReward.db2", HotfixStatements.SEL_QUEST_FACTION_REWARD); QuestMoneyRewardStorage = DBReader.Read("QuestMoneyReward.db2", HotfixStatements.SEL_QUEST_MONEY_REWARD); QuestPackageItemStorage = DBReader.Read("QuestPackageItem.db2", HotfixStatements.SEL_QUEST_PACKAGE_ITEM); QuestSortStorage = DBReader.Read("QuestSort.db2", HotfixStatements.SEL_QUEST_SORT, HotfixStatements.SEL_QUEST_SORT_LOCALE); QuestV2Storage = DBReader.Read("QuestV2.db2", HotfixStatements.SEL_QUEST_V2); QuestXPStorage = DBReader.Read("QuestXP.db2", HotfixStatements.SEL_QUEST_XP); RandPropPointsStorage = DBReader.Read("RandPropPoints.db2", HotfixStatements.SEL_RAND_PROP_POINTS); RewardPackStorage = DBReader.Read("RewardPack.db2", HotfixStatements.SEL_REWARD_PACK); RewardPackXCurrencyTypeStorage = DBReader.Read("RewardPackXCurrencyType.db2", HotfixStatements.SEL_REWARD_PACK_X_CURRENCY_TYPE); RewardPackXItemStorage = DBReader.Read("RewardPackXItem.db2", HotfixStatements.SEL_REWARD_PACK_X_ITEM); RulesetItemUpgradeStorage = DBReader.Read("RulesetItemUpgrade.db2", HotfixStatements.SEL_RULESET_ITEM_UPGRADE); ScalingStatDistributionStorage = DBReader.Read("ScalingStatDistribution.db2", HotfixStatements.SEL_SCALING_STAT_DISTRIBUTION); ScenarioStorage = DBReader.Read("Scenario.db2", HotfixStatements.SEL_SCENARIO, HotfixStatements.SEL_SCENARIO_LOCALE); ScenarioStepStorage = DBReader.Read("ScenarioStep.db2", HotfixStatements.SEL_SCENARIO_STEP, HotfixStatements.SEL_SCENARIO_STEP_LOCALE); //SceneScriptStorage = DBReader.Read("SceneScript.db2", HotfixStatements.SEL_SCENE_SCRIPT); SceneScriptGlobalTextStorage = DBReader.Read("SceneScriptGlobalText.db2", HotfixStatements.SEL_SCENE_SCRIPT_GLOBAL_TEXT); SceneScriptPackageStorage = DBReader.Read("SceneScriptPackage.db2", HotfixStatements.SEL_SCENE_SCRIPT_PACKAGE); SceneScriptTextStorage = DBReader.Read("SceneScriptText.db2", HotfixStatements.SEL_SCENE_SCRIPT_TEXT); SkillLineStorage = DBReader.Read("SkillLine.db2", HotfixStatements.SEL_SKILL_LINE, HotfixStatements.SEL_SKILL_LINE_LOCALE); SkillLineAbilityStorage = DBReader.Read("SkillLineAbility.db2", HotfixStatements.SEL_SKILL_LINE_ABILITY); SkillRaceClassInfoStorage = DBReader.Read("SkillRaceClassInfo.db2", HotfixStatements.SEL_SKILL_RACE_CLASS_INFO); SoundKitStorage = DBReader.Read("SoundKit.db2", HotfixStatements.SEL_SOUND_KIT); SpecializationSpellsStorage = DBReader.Read("SpecializationSpells.db2", HotfixStatements.SEL_SPECIALIZATION_SPELLS, HotfixStatements.SEL_SPECIALIZATION_SPELLS_LOCALE); SpellNameStorage = DBReader.Read("SpellName.db2", HotfixStatements.SEL_SPELL_NAME, HotfixStatements.SEL_SPELL_NAME_LOCALE); SpellAuraOptionsStorage = DBReader.Read("SpellAuraOptions.db2", HotfixStatements.SEL_SPELL_AURA_OPTIONS); SpellAuraRestrictionsStorage = DBReader.Read("SpellAuraRestrictions.db2", HotfixStatements.SEL_SPELL_AURA_RESTRICTIONS); SpellCastTimesStorage = DBReader.Read("SpellCastTimes.db2", HotfixStatements.SEL_SPELL_CAST_TIMES); SpellCastingRequirementsStorage = DBReader.Read("SpellCastingRequirements.db2", HotfixStatements.SEL_SPELL_CASTING_REQUIREMENTS); SpellCategoriesStorage = DBReader.Read("SpellCategories.db2", HotfixStatements.SEL_SPELL_CATEGORIES); SpellCategoryStorage = DBReader.Read("SpellCategory.db2", HotfixStatements.SEL_SPELL_CATEGORY, HotfixStatements.SEL_SPELL_CATEGORY_LOCALE); SpellClassOptionsStorage = DBReader.Read("SpellClassOptions.db2", HotfixStatements.SEL_SPELL_CLASS_OPTIONS); SpellCooldownsStorage = DBReader.Read("SpellCooldowns.db2", HotfixStatements.SEL_SPELL_COOLDOWNS); SpellDurationStorage = DBReader.Read("SpellDuration.db2", HotfixStatements.SEL_SPELL_DURATION); SpellEffectStorage = DBReader.Read("SpellEffect.db2", HotfixStatements.SEL_SPELL_EFFECT); SpellEquippedItemsStorage = DBReader.Read("SpellEquippedItems.db2", HotfixStatements.SEL_SPELL_EQUIPPED_ITEMS); SpellFocusObjectStorage = DBReader.Read("SpellFocusObject.db2", HotfixStatements.SEL_SPELL_FOCUS_OBJECT, HotfixStatements.SEL_SPELL_FOCUS_OBJECT_LOCALE); SpellInterruptsStorage = DBReader.Read("SpellInterrupts.db2", HotfixStatements.SEL_SPELL_INTERRUPTS); SpellItemEnchantmentStorage = DBReader.Read("SpellItemEnchantment.db2", HotfixStatements.SEL_SPELL_ITEM_ENCHANTMENT, HotfixStatements.SEL_SPELL_ITEM_ENCHANTMENT_LOCALE); SpellItemEnchantmentConditionStorage = DBReader.Read("SpellItemEnchantmentCondition.db2", HotfixStatements.SEL_SPELL_ITEM_ENCHANTMENT_CONDITION); SpellLearnSpellStorage = DBReader.Read("SpellLearnSpell.db2", HotfixStatements.SEL_SPELL_LEARN_SPELL); SpellLevelsStorage = DBReader.Read("SpellLevels.db2", HotfixStatements.SEL_SPELL_LEVELS); SpellMiscStorage = DBReader.Read("SpellMisc.db2", HotfixStatements.SEL_SPELL_MISC); SpellPowerStorage = DBReader.Read("SpellPower.db2", HotfixStatements.SEL_SPELL_POWER); SpellPowerDifficultyStorage = DBReader.Read("SpellPowerDifficulty.db2", HotfixStatements.SEL_SPELL_POWER_DIFFICULTY); SpellProcsPerMinuteStorage = DBReader.Read("SpellProcsPerMinute.db2", HotfixStatements.SEL_SPELL_PROCS_PER_MINUTE); SpellProcsPerMinuteModStorage = DBReader.Read("SpellProcsPerMinuteMod.db2", HotfixStatements.SEL_SPELL_PROCS_PER_MINUTE_MOD); SpellRadiusStorage = DBReader.Read("SpellRadius.db2", HotfixStatements.SEL_SPELL_RADIUS); SpellRangeStorage = DBReader.Read("SpellRange.db2", HotfixStatements.SEL_SPELL_RANGE, HotfixStatements.SEL_SPELL_RANGE_LOCALE); SpellReagentsStorage = DBReader.Read("SpellReagents.db2", HotfixStatements.SEL_SPELL_REAGENTS); SpellScalingStorage = DBReader.Read("SpellScaling.db2", HotfixStatements.SEL_SPELL_SCALING); SpellShapeshiftStorage = DBReader.Read("SpellShapeshift.db2", HotfixStatements.SEL_SPELL_SHAPESHIFT); SpellShapeshiftFormStorage = DBReader.Read("SpellShapeshiftForm.db2", HotfixStatements.SEL_SPELL_SHAPESHIFT_FORM, HotfixStatements.SEL_SPELL_SHAPESHIFT_FORM_LOCALE); SpellTargetRestrictionsStorage = DBReader.Read("SpellTargetRestrictions.db2", HotfixStatements.SEL_SPELL_TARGET_RESTRICTIONS); SpellTotemsStorage = DBReader.Read("SpellTotems.db2", HotfixStatements.SEL_SPELL_TOTEMS); SpellXSpellVisualStorage = DBReader.Read("SpellXSpellVisual.db2", HotfixStatements.SEL_SPELL_X_SPELL_VISUAL); SummonPropertiesStorage = DBReader.Read("SummonProperties.db2", HotfixStatements.SEL_SUMMON_PROPERTIES); //TactKeyStorage = DBReader.Read("TactKey.db2", HotfixStatements.SEL_TACT_KEY); TalentStorage = DBReader.Read("Talent.db2", HotfixStatements.SEL_TALENT, HotfixStatements.SEL_TALENT_LOCALE); TaxiNodesStorage = DBReader.Read("TaxiNodes.db2", HotfixStatements.SEL_TAXI_NODES, HotfixStatements.SEL_TAXI_NODES_LOCALE); TaxiPathStorage = DBReader.Read("TaxiPath.db2", HotfixStatements.SEL_TAXI_PATH); TaxiPathNodeStorage = DBReader.Read("TaxiPathNode.db2", HotfixStatements.SEL_TAXI_PATH_NODE); TotemCategoryStorage = DBReader.Read("TotemCategory.db2", HotfixStatements.SEL_TOTEM_CATEGORY, HotfixStatements.SEL_TOTEM_CATEGORY_LOCALE); ToyStorage = DBReader.Read("Toy.db2", HotfixStatements.SEL_TOY, HotfixStatements.SEL_TOY_LOCALE); TransmogHolidayStorage = DBReader.Read("TransmogHoliday.db2", HotfixStatements.SEL_TRANSMOG_HOLIDAY); TransmogSetStorage = DBReader.Read("TransmogSet.db2", HotfixStatements.SEL_TRANSMOG_SET, HotfixStatements.SEL_TRANSMOG_SET_LOCALE); TransmogSetGroupStorage = DBReader.Read("TransmogSetGroup.db2", HotfixStatements.SEL_TRANSMOG_SET_GROUP, HotfixStatements.SEL_TRANSMOG_SET_GROUP_LOCALE); TransmogSetItemStorage = DBReader.Read("TransmogSetItem.db2", HotfixStatements.SEL_TRANSMOG_SET_ITEM); TransportAnimationStorage = DBReader.Read("TransportAnimation.db2", HotfixStatements.SEL_TRANSPORT_ANIMATION); TransportRotationStorage = DBReader.Read("TransportRotation.db2", HotfixStatements.SEL_TRANSPORT_ROTATION); UiMapStorage = DBReader.Read("UiMap.db2", HotfixStatements.SEL_UI_MAP, HotfixStatements.SEL_UI_MAP_LOCALE); UiMapAssignmentStorage = DBReader.Read("UiMapAssignment.db2", HotfixStatements.SEL_UI_MAP_ASSIGNMENT); UiMapLinkStorage = DBReader.Read("UiMapLink.db2", HotfixStatements.SEL_UI_MAP_LINK); UiMapXMapArtStorage = DBReader.Read("UiMapXMapArt.db2", HotfixStatements.SEL_UI_MAP_X_MAP_ART); UnitPowerBarStorage = DBReader.Read("UnitPowerBar.db2", HotfixStatements.SEL_UNIT_POWER_BAR, HotfixStatements.SEL_UNIT_POWER_BAR_LOCALE); VehicleStorage = DBReader.Read("Vehicle.db2", HotfixStatements.SEL_VEHICLE); VehicleSeatStorage = DBReader.Read("VehicleSeat.db2", HotfixStatements.SEL_VEHICLE_SEAT); WMOAreaTableStorage = DBReader.Read("WMOAreaTable.db2", HotfixStatements.SEL_WMO_AREA_TABLE, HotfixStatements.SEL_WMO_AREA_TABLE_LOCALE); WorldEffectStorage = DBReader.Read("WorldEffect.db2", HotfixStatements.SEL_WORLD_EFFECT); WorldMapOverlayStorage = DBReader.Read("WorldMapOverlay.db2", HotfixStatements.SEL_WORLD_MAP_OVERLAY); WorldSafeLocsStorage = DBReader.Read("WorldSafeLocs.db2", HotfixStatements.SEL_WORLD_SAFE_LOCS, HotfixStatements.SEL_WORLD_SAFE_LOCS_LOCALE); Global.DB2Mgr.LoadStores(); foreach (var entry in TaxiPathStorage.Values) { if (!TaxiPathSetBySource.ContainsKey(entry.FromTaxiNode)) TaxiPathSetBySource.Add(entry.FromTaxiNode, new Dictionary()); TaxiPathSetBySource[entry.FromTaxiNode][entry.ToTaxiNode] = 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 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; foreach (var node in TaxiNodesStorage.Values) { if (!node.Flags.HasAnyFlag(TaxiNodeFlags.Alliance | TaxiNodeFlags.Horde)) continue; // valid taxi network node uint field = (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; int uiMapId; if (!Global.DB2Mgr.GetUiMapPosition(node.Pos.X, node.Pos.Y, node.Pos.Z, node.ContinentID, 0, 0, 0, UiMapSystem.Adventure, false, out uiMapId)) Global.DB2Mgr.GetUiMapPosition(node.Pos.X, node.Pos.Y, node.Pos.Z, node.ContinentID, 0, 0, 0, UiMapSystem.Taxi, false, out uiMapId); if (uiMapId == 985 || uiMapId == 986) OldContinentsNodesMask[field] |= submask; } // Check loaded DB2 files proper version if (!AreaTableStorage.ContainsKey(10048) || // last area added in 8.0.1 (28153) !CharTitlesStorage.ContainsKey(633) || // last char title added in 8.0.1 (28153) !GemPropertiesStorage.ContainsKey(3745) || // last gem property added in 8.0.1 (28153) !ItemStorage.ContainsKey(164760) || // last item added in 8.0.1 (28153) !ItemExtendedCostStorage.ContainsKey(6448) || // last item extended cost added in 8.0.1 (28153) !MapStorage.ContainsKey(2103) || // last map added in 8.0.1 (28153) !SpellNameStorage.ContainsKey(281872)) // last spell added in 8.0.1 (28153) { 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"); 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"); NpcDamageByClassGameTable[7] = GameTableReader.Read("NpcDamageByClassExp7.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"); NpcTotalHpGameTable[7] = GameTableReader.Read("NpcTotalHpExp7.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 AnimationDataStorage; 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 ArtifactTierStorage; public static DB6Storage ArtifactUnlockStorage; 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 ContentTuningStorage; 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 ExpectedStatStorage; public static DB6Storage ExpectedStatModStorage; 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 ItemLevelSelectorQualityStorage; public static DB6Storage ItemLevelSelectorQualitySetStorage; public static DB6Storage ItemLimitCategoryStorage; public static DB6Storage ItemLimitCategoryConditionStorage; 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 NumTalentsAtLevelStorage; 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 PvpItemStorage; public static DB6Storage PvpTalentStorage; public static DB6Storage PvpTalentCategoryStorage; public static DB6Storage PvpTalentSlotUnlockStorage; 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 RewardPackXCurrencyTypeStorage; 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 SceneScriptGlobalTextStorage; public static DB6Storage SceneScriptPackageStorage; public static DB6Storage SceneScriptTextStorage; public static DB6Storage SkillLineStorage; public static DB6Storage SkillLineAbilityStorage; public static DB6Storage SkillRaceClassInfoStorage; public static DB6Storage SoundKitStorage; public static DB6Storage SpecializationSpellsStorage; 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 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 SpellNameStorage; 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 UiMapStorage; public static DB6Storage UiMapAssignmentStorage; public static DB6Storage UiMapLinkStorage; public static DB6Storage UiMapXMapArtStorage; public static DB6Storage UnitPowerBarStorage; public static DB6Storage VehicleStorage; public static DB6Storage VehicleSeatStorage; public static DB6Storage WMOAreaTableStorage; public static DB6Storage WorldEffectStorage; public static DB6Storage WorldMapOverlayStorage; 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 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: case -7: 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; case -8: return row.DamageReplaceStat; default: break; } return 0.0f; } #endregion } }