From 82dca6de9491b63b67fec68febcfdac7f8cb8e1e Mon Sep 17 00:00:00 2001 From: hondacrx Date: Mon, 26 Feb 2018 13:13:54 -0500 Subject: [PATCH] Updated DB2 structs --- .../Framework/Constants/AchievementConst.cs | 3 +- Source/Framework/Constants/CliDBConst.cs | 4 +- Source/Framework/Constants/ItemConst.cs | 3 +- Source/Framework/Constants/ObjectConst.cs | 2 +- Source/Framework/Constants/PlayerConst.cs | 2 +- Source/Framework/Constants/SharedConst.cs | 13 +- .../Database/Databases/HotfixDatabase.cs | 660 ++++++++------- Source/Framework/IO/FastStruct.cs | 94 ++ Source/Framework/Util/Extensions.cs | 112 ++- .../Collision/BoundingIntervalHierarchy.cs | 4 +- .../Game/Collision/Models/GameObjectModel.cs | 4 +- Source/Game/Collision/Models/ModelInstance.cs | 8 +- Source/Game/Collision/Models/WorldModel.cs | 4 +- Source/Game/Conditions/ConditionManager.cs | 2 +- Source/Game/DataStorage/CliDB.cs | 469 +++++----- .../DataStorage/ClientReader/BitStream.cs | 418 +++++++++ .../DataStorage/ClientReader/CliDBReader.cs | 762 ----------------- .../Game/DataStorage/ClientReader/DB6Meta.cs | 643 -------------- .../DataStorage/ClientReader/DB6Storage.cs | 8 +- .../Game/DataStorage/ClientReader/DBReader.cs | 800 ++++++++++++++++++ .../DataStorage/ClientReader/GameTables.cs | 61 ++ Source/Game/DataStorage/DB2Manager.cs | 4 +- Source/Game/DataStorage/Structs/A_Records.cs | 28 +- Source/Game/DataStorage/Structs/B_Records.cs | 16 +- Source/Game/DataStorage/Structs/C_Records.cs | 57 +- Source/Game/DataStorage/Structs/E_Records.cs | 8 +- Source/Game/DataStorage/Structs/F_Records.cs | 6 +- Source/Game/DataStorage/Structs/G_Records.cs | 30 +- Source/Game/DataStorage/Structs/H_Records.cs | 6 +- Source/Game/DataStorage/Structs/I_Records.cs | 47 +- Source/Game/DataStorage/Structs/L_Records.cs | 8 +- .../Game/DataStorage/Structs/M2Structure.cs | 2 + Source/Game/DataStorage/Structs/M_Records.cs | 27 +- Source/Game/DataStorage/Structs/P_Records.cs | 80 +- Source/Game/DataStorage/Structs/R_Records.cs | 6 +- Source/Game/DataStorage/Structs/S_Records.cs | 147 ++-- Source/Game/DataStorage/Structs/T_Records.cs | 14 +- Source/Game/DataStorage/Structs/U_Records.cs | 10 +- Source/Game/DataStorage/Structs/V_Records.cs | 4 +- Source/Game/DataStorage/Structs/W_Records.cs | 35 +- Source/Game/Entities/Item/Item.cs | 368 ++++---- Source/Game/Entities/Item/ItemTemplate.cs | 7 +- Source/Game/Entities/Player/Player.DB.cs | 6 +- Source/Game/Entities/Player/Player.Items.cs | 6 +- Source/Game/Entities/Player/Player.Quest.cs | 2 +- Source/Game/Entities/Player/Player.Spells.cs | 2 +- Source/Game/Entities/Player/Player.cs | 4 +- Source/Game/Entities/Unit/Unit.Spells.cs | 6 +- Source/Game/Entities/Unit/Unit.cs | 4 +- Source/Game/Globals/ObjectManager.cs | 40 +- Source/Game/Groups/Group.cs | 30 +- .../Handlers/TransmogrificationHandler.cs | 2 +- .../Game/Network/Packets/CharacterPackets.cs | 1 + Source/Game/Network/Packets/WhoPackets.cs | 2 +- Source/Game/Quest/Quest.cs | 2 +- Source/Game/Reputation/ReputationManager.cs | 8 +- Source/Game/Spells/Spell.cs | 21 +- Source/Game/Spells/SpellEffects.cs | 3 - Source/Game/Spells/SpellInfo.cs | 15 +- Source/Game/Spells/SpellManager.cs | 13 +- Source/WorldServer/Server.cs | 3 +- 61 files changed, 2639 insertions(+), 2517 deletions(-) create mode 100644 Source/Framework/IO/FastStruct.cs create mode 100644 Source/Game/DataStorage/ClientReader/BitStream.cs delete mode 100644 Source/Game/DataStorage/ClientReader/CliDBReader.cs delete mode 100644 Source/Game/DataStorage/ClientReader/DB6Meta.cs create mode 100644 Source/Game/DataStorage/ClientReader/DBReader.cs diff --git a/Source/Framework/Constants/AchievementConst.cs b/Source/Framework/Constants/AchievementConst.cs index 85efb53ed..25e0b43fa 100644 --- a/Source/Framework/Constants/AchievementConst.cs +++ b/Source/Framework/Constants/AchievementConst.cs @@ -157,6 +157,7 @@ namespace Framework.Constants //CRITERIA_ADDITIONAL_CONDITION_UNK86 = 86, // Some external event id //CRITERIA_ADDITIONAL_CONDITION_UNK87 = 87, // Achievement id BattlePetSpecies = 91, + Expansion = 92, GarrisonFollowerEntry = 144, GarrisonFollowerQuality = 145, GarrisonFollowerLevel = 146, @@ -403,7 +404,7 @@ namespace Framework.Constants GainParagonReputation = 206, EarnHonorXp = 207, RelicTalentUnlocked = 211, - TotalTypes = 212 + TotalTypes = 213 } public enum CriteriaDataType diff --git a/Source/Framework/Constants/CliDBConst.cs b/Source/Framework/Constants/CliDBConst.cs index 5814cbe65..783e77c34 100644 --- a/Source/Framework/Constants/CliDBConst.cs +++ b/Source/Framework/Constants/CliDBConst.cs @@ -849,7 +849,7 @@ namespace Framework.Constants FlyWarriorChargeEnd = 821 } - public enum AreaFlags + public enum AreaFlags : int { Snow = 0x01, // Snow (Only Dun Morogh, Naxxramas, Razorfen Downs And Winterspring) Unk1 = 0x02, // Razorfen Downs, Naxxramas And Acherus: The Ebon Hold (3.3.5a) @@ -1232,7 +1232,7 @@ namespace Framework.Constants Prime = 2 } - public enum ItemSetFlags + public enum ItemSetFlags : byte { LegacyInactive = 0x01, } diff --git a/Source/Framework/Constants/ItemConst.cs b/Source/Framework/Constants/ItemConst.cs index 277fe4737..93ce07993 100644 --- a/Source/Framework/Constants/ItemConst.cs +++ b/Source/Framework/Constants/ItemConst.cs @@ -343,7 +343,8 @@ namespace Framework.Constants ItemLevelCanIncrease = 14, // Displays a + next to item level indicating it can warforge RandomEnchantment = 15, // Responsible for showing "" or "+%d Rank Random Minor Trait" in the tooltip before item is obtained Bounding = 16, - RelicType = 17 + RelicType = 17, + OverrideRequiredLevel = 18 } public enum ItemEnchantmentType : byte diff --git a/Source/Framework/Constants/ObjectConst.cs b/Source/Framework/Constants/ObjectConst.cs index 321e45484..982359cef 100644 --- a/Source/Framework/Constants/ObjectConst.cs +++ b/Source/Framework/Constants/ObjectConst.cs @@ -131,7 +131,7 @@ namespace Framework.Constants // uses this category } - public enum SummonType + public enum SummonType: byte { None = 0, Pet = 1, diff --git a/Source/Framework/Constants/PlayerConst.cs b/Source/Framework/Constants/PlayerConst.cs index 4a87b6083..00f207f6d 100644 --- a/Source/Framework/Constants/PlayerConst.cs +++ b/Source/Framework/Constants/PlayerConst.cs @@ -44,7 +44,7 @@ namespace Framework.Constants public const uint infinityCooldownDelayCheck = Time.Month / 2; public const int MaxPlayerSummonDelay = 2 * Time.Minute; - public const int TaxiMaskSize = 253; + public const int TaxiMaskSize = 258; // corpse reclaim times public const int DeathExpireStep = (5 * Time.Minute); diff --git a/Source/Framework/Constants/SharedConst.cs b/Source/Framework/Constants/SharedConst.cs index e0321caea..dae93190e 100644 --- a/Source/Framework/Constants/SharedConst.cs +++ b/Source/Framework/Constants/SharedConst.cs @@ -505,14 +505,19 @@ namespace Framework.Constants PandarenNeutral = 24, PandarenAlliance = 25, PandarenHorde = 26, - Max = 27, + Nightborne = 27, + HighmountainTauren = 28, + VoidElf = 29, + LightforgedDraenei = 30, + Max = 31, RaceMaskAllPlayable = ((1 << (Human - 1)) | (1 << (Orc - 1)) | (1 << (Dwarf - 1)) | (1 << (NightElf - 1)) | (1 << (Undead - 1)) | (1 << (Tauren - 1)) | (1 << (Gnome - 1)) | (1 << (Troll - 1)) | (1 << (BloodElf - 1)) | (1 << (Draenei - 1)) - | (1 << (Goblin - 1)) | (1 << (Worgen - 1)) | (1 << (PandarenNeutral - 1)) | (1 << (PandarenAlliance - 1)) | (1 << (PandarenHorde - 1))), + | (1 << (Goblin - 1)) | (1 << (Worgen - 1)) | (1 << (PandarenNeutral - 1)) | (1 << (PandarenAlliance - 1)) | (1 << (PandarenHorde - 1)) + | (1 << (Nightborne - 1)) | (1 << (HighmountainTauren - 1)) | (1 << (VoidElf - 1)) | (1 << (LightforgedDraenei - 1))), - RaceMaskAlliance = ((1 << (Human - 1)) | (1 << (Dwarf - 1)) | (1 << (NightElf - 1)) | - (1 << (Gnome - 1)) | (1 << (Draenei - 1)) | (1 << (Worgen - 1)) | (1 << (PandarenAlliance - 1))), + RaceMaskAlliance = ((1 << (Human - 1)) | (1 << (Dwarf - 1)) | (1 << (NightElf - 1)) | (1 << (Gnome - 1)) + | (1 << (Draenei - 1)) | (1 << (Worgen - 1)) | (1 << (PandarenAlliance - 1)) | (1 << (VoidElf - 1)) | (1<<(LightforgedDraenei - 1))), RaceMaskHorde = RaceMaskAllPlayable & ~RaceMaskAlliance } diff --git a/Source/Framework/Database/Databases/HotfixDatabase.cs b/Source/Framework/Database/Databases/HotfixDatabase.cs index fd1fa13be..f41b5bfd1 100644 --- a/Source/Framework/Database/Databases/HotfixDatabase.cs +++ b/Source/Framework/Database/Databases/HotfixDatabase.cs @@ -22,51 +22,52 @@ namespace Framework.Database public override void PreparedStatements() { // Achievement.db2 - PrepareStatement(HotfixStatements.SEL_ACHIEVEMENT, "SELECT Title, Description, Flags, Reward, MapID, Supercedes, Category, UIOrder, SharesCriteria, " + - "CriteriaTree, Faction, Points, MinimumCriteria, ID, IconFileDataID, CriteriaTree FROM achievement ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_ACHIEVEMENT, "SELECT Title, Description, Reward, Flags, MapID, Supercedes, Category, UIOrder, SharesCriteria, " + + "Faction, Points, MinimumCriteria, ID, IconFileDataID, CriteriaTree FROM achievement ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_ACHIEVEMENT_LOCALE, "SELECT ID, Title_lang, Description_lang, Reward_lang FROM achievement_locale WHERE locale = ?"); // AnimKit.db2 PrepareStatement(HotfixStatements.SEL_ANIM_KIT, "SELECT ID, OneShotDuration, OneShotStopAnimKitID, LowDefAnimKitID FROM anim_kit ORDER BY ID DESC"); // AreaGroupMember.db2 - PrepareStatement(HotfixStatements.SEL_AREA_GROUP_MEMBER, "SELECT ID, AreaGroupID, AreaID FROM area_group_member ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_AREA_GROUP_MEMBER, "SELECT ID, AreaID, AreaGroupID FROM area_group_member ORDER BY ID DESC"); // AreaTable.db2 - PrepareStatement(HotfixStatements.SEL_AREA_TABLE, "SELECT ID, Flags1, Flags2, ZoneName, AmbientMultiplier, AreaName, MapID, ParentAreaID, AreaBit, " + - "AmbienceID, ZoneMusic, IntroSound, LiquidTypeID1, LiquidTypeID2, LiquidTypeID3, LiquidTypeID4, UWZoneMusic, UWAmbience, " + - "PvPCombatWorldStateID, SoundProviderPref, SoundProviderPrefUnderwater, ExplorationLevel, FactionGroupMask, MountFlags, " + + PrepareStatement(HotfixStatements.SEL_AREA_TABLE, "SELECT ID, ZoneName, AreaName, Flags1, Flags2, AmbientMultiplier, MapID, ParentAreaID, AreaBit, " + + "AmbienceID, ZoneMusic, IntroSound, LiquidTypeID1, LiquidTypeID2, LiquidTypeID3, LiquidTypeID4, UWZoneMusic, UWAmbience, " + + "PvPCombatWorldStateID, SoundProviderPref, SoundProviderPrefUnderwater, ExplorationLevel, FactionGroupMask, MountFlags, " + "WildBattlePetLevelMin, WildBattlePetLevelMax, WindSettingsID, UWIntroSound FROM area_table ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_AREA_TABLE_LOCALE, "SELECT ID, AreaName_lang FROM area_table_locale WHERE locale = ?"); // AreaTrigger.db2 - PrepareStatement(HotfixStatements.SEL_AREA_TRIGGER, "SELECT PosX, PosY, PosZ, Radius, BoxLength, BoxWidth, BoxHeight, BoxYaw, MapID, PhaseID, PhaseGroupID, " + + PrepareStatement(HotfixStatements.SEL_AREA_TRIGGER, "SELECT PosX, PosY, PosZ, Radius, BoxLength, BoxWidth, BoxHeight, BoxYaw, MapID, PhaseID, PhaseGroupID, " + "ShapeID, AreaTriggerActionSetID, PhaseUseFlags, ShapeType, Flag, ID FROM area_trigger ORDER BY ID DESC"); // ArmorLocation.db2 PrepareStatement(HotfixStatements.SEL_ARMOR_LOCATION, "SELECT ID, Modifier1, Modifier2, Modifier3, Modifier4, Modifier5 FROM armor_location ORDER BY ID DESC"); // Artifact.db2 - PrepareStatement(HotfixStatements.SEL_ARTIFACT, "SELECT ID, Name, BarConnectedColor, BarDisconnectedColor, TitleColor, ClassUiTextureKitID, SpecID, " + + PrepareStatement(HotfixStatements.SEL_ARTIFACT, "SELECT ID, Name, BarConnectedColor, BarDisconnectedColor, TitleColor, ClassUiTextureKitID, SpecID, " + "ArtifactCategoryID, Flags, UiModelSceneID, SpellVisualKitID FROM artifact ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_ARTIFACT_LOCALE, "SELECT ID, Name_lang FROM artifact_locale WHERE locale = ?"); // ArtifactAppearance.db2 - PrepareStatement(HotfixStatements.SEL_ARTIFACT_APPEARANCE, "SELECT Name, SwatchColor, ModelDesaturation, ModelAlpha, ShapeshiftDisplayID, " + - "ArtifactAppearanceSetID, Unknown, DisplayIndex, AppearanceModID, Flags, ModifiesShapeshiftFormDisplay, ID, PlayerConditionID, " + + PrepareStatement(HotfixStatements.SEL_ARTIFACT_APPEARANCE, "SELECT Name, SwatchColor, ModelDesaturation, ModelAlpha, ShapeshiftDisplayID, " + + "ArtifactAppearanceSetID, Unknown, DisplayIndex, AppearanceModID, Flags, ModifiesShapeshiftFormDisplay, ID, PlayerConditionID, " + "ItemAppearanceID, AltItemAppearanceID FROM artifact_appearance ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_ARTIFACT_APPEARANCE_LOCALE, "SELECT ID, Name_lang FROM artifact_appearance_locale WHERE locale = ?"); // ArtifactAppearanceSet.db2 - PrepareStatement(HotfixStatements.SEL_ARTIFACT_APPEARANCE_SET, "SELECT Name, Name2, UiCameraID, AltHandUICameraID, ArtifactID, DisplayIndex, " + - "AttachmentPoint, Flags, ID FROM artifact_appearance_set ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_ARTIFACT_APPEARANCE_SET, "SELECT Name, Name2, UiCameraID, AltHandUICameraID, DisplayIndex, AttachmentPoint, Flags, " + + "ID, ArtifactID FROM artifact_appearance_set ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_ARTIFACT_APPEARANCE_SET_LOCALE, "SELECT ID, Name_lang, Name2_lang FROM artifact_appearance_set_locale WHERE locale = ?"); // ArtifactCategory.db2 - PrepareStatement(HotfixStatements.SEL_ARTIFACT_CATEGORY, "SELECT ID, ArtifactKnowledgeCurrencyID, ArtifactKnowledgeMultiplierCurveID FROM artifact_category ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_ARTIFACT_CATEGORY, "SELECT ID, ArtifactKnowledgeCurrencyID, ArtifactKnowledgeMultiplierCurveID FROM artifact_category" + + " ORDER BY ID DESC"); // ArtifactPower.db2 - PrepareStatement(HotfixStatements.SEL_ARTIFACT_POWER, "SELECT PosX, PosY, ArtifactID, Flags, MaxRank, ArtifactTier, ID, RelicType FROM artifact_power" + + PrepareStatement(HotfixStatements.SEL_ARTIFACT_POWER, "SELECT PosX, PosY, ArtifactID, Flags, MaxRank, ArtifactTier, ID, RelicType FROM artifact_power" + " ORDER BY ID DESC"); // ArtifactPowerLink.db2 @@ -76,10 +77,12 @@ namespace Framework.Database PrepareStatement(HotfixStatements.SEL_ARTIFACT_POWER_PICKER, "SELECT ID, PlayerConditionID FROM artifact_power_picker ORDER BY ID DESC"); // ArtifactPowerRank.db2 - PrepareStatement(HotfixStatements.SEL_ARTIFACT_POWER_RANK, "SELECT ID, SpellID, Value, ArtifactPowerID, Unknown, Rank FROM artifact_power_rank ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_ARTIFACT_POWER_RANK, "SELECT ID, SpellID, Value, Unknown, Rank, ArtifactPowerID FROM artifact_power_rank" + + " ORDER BY ID DESC"); // ArtifactQuestXp.db2 - PrepareStatement(HotfixStatements.SEL_ARTIFACT_QUEST_XP, "SELECT ID, Exp1, Exp2, Exp3, Exp4, Exp5, Exp6, Exp7, Exp8, Exp9, Exp10 FROM artifact_quest_xp ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_ARTIFACT_QUEST_XP, "SELECT ID, Exp1, Exp2, Exp3, Exp4, Exp5, Exp6, Exp7, Exp8, Exp9, Exp10 FROM artifact_quest_xp" + + " ORDER BY ID DESC"); // AuctionHouse.db2 PrepareStatement(HotfixStatements.SEL_AUCTION_HOUSE, "SELECT ID, Name, FactionID, DepositRate, ConsignmentRate FROM auction_house ORDER BY ID DESC"); @@ -92,7 +95,7 @@ namespace Framework.Database PrepareStatement(HotfixStatements.SEL_BANNED_ADDONS, "SELECT ID, Name, Version, Flags FROM banned_addons ORDER BY ID DESC"); // BarberShopStyle.db2 - PrepareStatement(HotfixStatements.SEL_BARBER_SHOP_STYLE, "SELECT DisplayName, Description, CostModifier, Type, Race, Sex, Data, ID FROM barber_shop_style" + + PrepareStatement(HotfixStatements.SEL_BARBER_SHOP_STYLE, "SELECT DisplayName, Description, CostModifier, Type, Race, Sex, Data, ID FROM barber_shop_style" + " ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_BARBER_SHOP_STYLE_LOCALE, "SELECT ID, DisplayName_lang, Description_lang FROM barber_shop_style_locale WHERE locale = ?"); @@ -100,112 +103,115 @@ namespace Framework.Database PrepareStatement(HotfixStatements.SEL_BATTLE_PET_BREED_QUALITY, "SELECT ID, Modifier, Quality FROM battle_pet_breed_quality ORDER BY ID DESC"); // BattlePetBreedState.db2 - PrepareStatement(HotfixStatements.SEL_BATTLE_PET_BREED_STATE, "SELECT ID, Value, BreedID, State FROM battle_pet_breed_state ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_BATTLE_PET_BREED_STATE, "SELECT ID, Value, State, BreedID FROM battle_pet_breed_state ORDER BY ID DESC"); // BattlePetSpecies.db2 - PrepareStatement(HotfixStatements.SEL_BATTLE_PET_SPECIES, "SELECT CreatureID, IconFileID, SummonSpellID, SourceText, Description, Flags, PetType, Source, " + + PrepareStatement(HotfixStatements.SEL_BATTLE_PET_SPECIES, "SELECT SourceText, Description, CreatureID, IconFileID, SummonSpellID, Flags, PetType, Source, " + "ID, CardModelSceneID, LoadoutModelSceneID FROM battle_pet_species ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_BATTLE_PET_SPECIES_LOCALE, "SELECT ID, SourceText_lang, Description_lang FROM battle_pet_species_locale WHERE locale = ?"); // BattlePetSpeciesState.db2 - PrepareStatement(HotfixStatements.SEL_BATTLE_PET_SPECIES_STATE, "SELECT ID, Value, SpeciesID, State FROM battle_pet_species_state ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_BATTLE_PET_SPECIES_STATE, "SELECT ID, Value, State, SpeciesID FROM battle_pet_species_state ORDER BY ID DESC"); // BattlemasterList.db2 - PrepareStatement(HotfixStatements.SEL_BATTLEMASTER_LIST, "SELECT ID, Name, IconFileDataID, GameType, ShortDescription, LongDescription, MapID1, MapID2, " + - "MapID3, MapID4, MapID5, MapID6, MapID7, MapID8, MapID9, MapID10, MapID11, MapID12, MapID13, MapID14, MapID15, MapID16, HolidayWorldState, " + - "PlayerConditionID, InstanceType, GroupsAllowed, MaxGroupSize, MinLevel, MaxLevel, RatedPlayers, MinPlayers, MaxPlayers, Flags" + + PrepareStatement(HotfixStatements.SEL_BATTLEMASTER_LIST, "SELECT ID, Name, GameType, ShortDescription, LongDescription, IconFileDataID, MapID1, MapID2, " + + "MapID3, MapID4, MapID5, MapID6, MapID7, MapID8, MapID9, MapID10, MapID11, MapID12, MapID13, MapID14, MapID15, MapID16, HolidayWorldState, " + + "PlayerConditionID, InstanceType, GroupsAllowed, MaxGroupSize, MinLevel, MaxLevel, RatedPlayers, MinPlayers, MaxPlayers, Flags" + " FROM battlemaster_list ORDER BY ID DESC"); - PrepareStatement(HotfixStatements.SEL_BATTLEMASTER_LIST_LOCALE, "SELECT ID, Name_lang, GameType_lang, ShortDescription_lang, LongDescription_lang" + + PrepareStatement(HotfixStatements.SEL_BATTLEMASTER_LIST_LOCALE, "SELECT ID, Name_lang, GameType_lang, ShortDescription_lang, LongDescription_lang" + " FROM battlemaster_list_locale WHERE locale = ?"); // BroadcastText.db2 - PrepareStatement(HotfixStatements.SEL_BROADCAST_TEXT, "SELECT ID, MaleText, FemaleText, EmoteID1, EmoteID2, EmoteID3, EmoteDelay1, EmoteDelay2, " + - "EmoteDelay3, UnkEmoteID, Language, Type, SoundID1, SoundID2, PlayerConditionID FROM broadcast_text ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_BROADCAST_TEXT, "SELECT ID, MaleText, FemaleText, EmoteID1, EmoteID2, EmoteID3, EmoteDelay1, EmoteDelay2, " + + "EmoteDelay3, UnkEmoteID, Language, Type, PlayerConditionID, SoundID1, SoundID2 FROM broadcast_text ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_BROADCAST_TEXT_LOCALE, "SELECT ID, MaleText_lang, FemaleText_lang FROM broadcast_text_locale WHERE locale = ?"); // CharacterFacialHairStyles.db2 - PrepareStatement(HotfixStatements.SEL_CHARACTER_FACIAL_HAIR_STYLES, "SELECT ID, Geoset1, Geoset2, Geoset3, Geoset4, Geoset5, RaceID, SexID, VariationID" + + PrepareStatement(HotfixStatements.SEL_CHARACTER_FACIAL_HAIR_STYLES, "SELECT ID, Geoset1, Geoset2, Geoset3, Geoset4, Geoset5, RaceID, SexID, VariationID" + " FROM character_facial_hair_styles ORDER BY ID DESC"); // CharBaseSection.db2 PrepareStatement(HotfixStatements.SEL_CHAR_BASE_SECTION, "SELECT ID, Variation, ResolutionVariation, Resolution FROM char_base_section ORDER BY ID DESC"); // CharSections.db2 - PrepareStatement(HotfixStatements.SEL_CHAR_SECTIONS, "SELECT ID, TextureFileDataID1, TextureFileDataID2, TextureFileDataID3, Flags, RaceID, SexID, " + + PrepareStatement(HotfixStatements.SEL_CHAR_SECTIONS, "SELECT ID, TextureFileDataID1, TextureFileDataID2, TextureFileDataID3, Flags, RaceID, SexID, " + "BaseSection, VariationIndex, ColorIndex FROM char_sections ORDER BY ID DESC"); // CharStartOutfit.db2 - PrepareStatement(HotfixStatements.SEL_CHAR_START_OUTFIT, "SELECT ID, ItemID1, ItemID2, ItemID3, ItemID4, ItemID5, ItemID6, ItemID7, ItemID8, ItemID9, " + - "ItemID10, ItemID11, ItemID12, ItemID13, ItemID14, ItemID15, ItemID16, ItemID17, ItemID18, ItemID19, ItemID20, ItemID21, ItemID22, ItemID23, " + - "ItemID24, PetDisplayID, RaceID, ClassID, GenderID, OutfitID, PetFamilyID FROM char_start_outfit ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_CHAR_START_OUTFIT, "SELECT ID, ItemID1, ItemID2, ItemID3, ItemID4, ItemID5, ItemID6, ItemID7, ItemID8, ItemID9, " + + "ItemID10, ItemID11, ItemID12, ItemID13, ItemID14, ItemID15, ItemID16, ItemID17, ItemID18, ItemID19, ItemID20, ItemID21, ItemID22, ItemID23, " + + "ItemID24, PetDisplayID, ClassID, GenderID, OutfitID, PetFamilyID, RaceID FROM char_start_outfit ORDER BY ID DESC"); // CharTitles.db2 PrepareStatement(HotfixStatements.SEL_CHAR_TITLES, "SELECT ID, NameMale, NameFemale, MaskID, Flags FROM char_titles ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_CHAR_TITLES_LOCALE, "SELECT ID, NameMale_lang, NameFemale_lang FROM char_titles_locale WHERE locale = ?"); // ChatChannels.db2 - PrepareStatement(HotfixStatements.SEL_CHAT_CHANNELS, "SELECT ID, Flags, Name, Shortcut, FactionGroup FROM chat_channels ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_CHAT_CHANNELS, "SELECT ID, Name, Shortcut, Flags, FactionGroup FROM chat_channels ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_CHAT_CHANNELS_LOCALE, "SELECT ID, Name_lang, Shortcut_lang FROM chat_channels_locale WHERE locale = ?"); // ChrClasses.db2 - PrepareStatement(HotfixStatements.SEL_CHR_CLASSES, "SELECT PetNameToken, Name, NameFemale, NameMale, Filename, CreateScreenFileDataID, " + - "SelectScreenFileDataID, IconFileDataID, LowResScreenFileDataID, Flags, CinematicSequenceID, DefaultSpec, PowerType, SpellClassSet, " + - "AttackPowerPerStrength, AttackPowerPerAgility, RangedAttackPowerPerAgility, Unk1, ID FROM chr_classes ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_CHR_CLASSES, "SELECT PetNameToken, Name, NameFemale, NameMale, Filename, CreateScreenFileDataID, " + + "SelectScreenFileDataID, IconFileDataID, LowResScreenFileDataID, StartingLevel, Flags, CinematicSequenceID, DefaultSpec, PowerType, " + + "SpellClassSet, AttackPowerPerStrength, AttackPowerPerAgility, RangedAttackPowerPerAgility, Unk1, ID FROM chr_classes ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_CHR_CLASSES_LOCALE, "SELECT ID, Name_lang, NameFemale_lang, NameMale_lang FROM chr_classes_locale WHERE locale = ?"); // ChrClassesXPowerTypes.db2 - PrepareStatement(HotfixStatements.SEL_CHR_CLASSES_X_POWER_TYPES, "SELECT ID, ClassID, PowerType FROM chr_classes_x_power_types ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_CHR_CLASSES_X_POWER_TYPES, "SELECT ID, PowerType, ClassID FROM chr_classes_x_power_types ORDER BY ID DESC"); // ChrRaces.db2 - PrepareStatement(HotfixStatements.SEL_CHR_RACES, "SELECT ID, Flags, MaleDisplayID, FemaleDisplayID, ClientPrefix, ClientFileString, Name, NameFemale, " + - "NameMale, FacialHairCustomization1, FacialHairCustomization2, HairCustomization, CreateScreenFileDataID, SelectScreenFileDataID, " + - "MaleCustomizeOffset1, MaleCustomizeOffset2, MaleCustomizeOffset3, FemaleCustomizeOffset1, FemaleCustomizeOffset2, FemaleCustomizeOffset3, " + - "LowResScreenFileDataID, FactionID, ResSicknessSpellID, SplashSoundID, CinematicSequenceID, BaseLanguage, CreatureType, TeamID, RaceRelated, " + - "UnalteredVisualRaceID, CharComponentTextureLayoutID, DefaultClassID, NeutralRaceID, ItemAppearanceFrameRaceID, " + - "CharComponentTexLayoutHiResID, HighResMaleDisplayID, HighResFemaleDisplayID, AlteredFormTransitionSpellVisualID1, " + - "AlteredFormTransitionSpellVisualID2, AlteredFormTransitionSpellVisualID3, AlteredFormTransitionSpellVisualKitID1, " + - "AlteredFormTransitionSpellVisualKitID2, AlteredFormTransitionSpellVisualKitID3 FROM chr_races ORDER BY ID DESC"); - PrepareStatement(HotfixStatements.SEL_CHR_RACES_LOCALE, "SELECT ID, Name_lang, NameFemale_lang, NameMale_lang FROM chr_races_locale WHERE locale = ?"); + PrepareStatement(HotfixStatements.SEL_CHR_RACES, "SELECT ClientPrefix, ClientFileString, Name, NameFemale, LowercaseName, LowercaseNameFemale, Flags, " + + "MaleDisplayID, FemaleDisplayID, CreateScreenFileDataID, SelectScreenFileDataID, MaleCustomizeOffset1, MaleCustomizeOffset2, " + + "MaleCustomizeOffset3, FemaleCustomizeOffset1, FemaleCustomizeOffset2, FemaleCustomizeOffset3, LowResScreenFileDataID, StartingLevel, " + + "UIDisplayOrder, FactionID, ResSicknessSpellID, SplashSoundID, CinematicSequenceID, BaseLanguage, CreatureType, TeamID, RaceRelated, " + + "UnalteredVisualRaceID, CharComponentTextureLayoutID, DefaultClassID, NeutralRaceID, ItemAppearanceFrameRaceID, " + + "CharComponentTexLayoutHiResID, ID, HighResMaleDisplayID, HighResFemaleDisplayID, HeritageArmorAchievementID, MaleCorpseBonesModelFileDataID, " + + "FemaleCorpseBonesModelFileDataID, AlteredFormTransitionSpellVisualID1, AlteredFormTransitionSpellVisualID2, " + + "AlteredFormTransitionSpellVisualID3, AlteredFormTransitionSpellVisualKitID1, AlteredFormTransitionSpellVisualKitID2, " + + "AlteredFormTransitionSpellVisualKitID3 FROM chr_races ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_CHR_RACES_LOCALE, "SELECT ID, Name_lang, NameFemale_lang, LowercaseName_lang, LowercaseNameFemale_lang" + + " FROM chr_races_locale WHERE locale = ?"); // ChrSpecialization.db2 - PrepareStatement(HotfixStatements.SEL_CHR_SPECIALIZATION, "SELECT MasterySpellID1, MasterySpellID2, Name, Name2, Description, ClassID, OrderIndex, " + + PrepareStatement(HotfixStatements.SEL_CHR_SPECIALIZATION, "SELECT Name, Name2, Description, MasterySpellID1, MasterySpellID2, ClassID, OrderIndex, " + "PetTalentType, Role, PrimaryStatOrder, ID, IconFileDataID, Flags, AnimReplacementSetID FROM chr_specialization ORDER BY ID DESC"); - PrepareStatement(HotfixStatements.SEL_CHR_SPECIALIZATION_LOCALE, "SELECT ID, Name_lang, Name2_lang, Description_lang FROM chr_specialization_locale" + + PrepareStatement(HotfixStatements.SEL_CHR_SPECIALIZATION_LOCALE, "SELECT ID, Name_lang, Name2_lang, Description_lang FROM chr_specialization_locale" + " WHERE locale = ?"); // CinematicCamera.db2 - PrepareStatement(HotfixStatements.SEL_CINEMATIC_CAMERA, "SELECT ID, SoundID, OriginX, OriginY, OriginZ, OriginFacing, ModelFileDataID FROM cinematic_camera" + + PrepareStatement(HotfixStatements.SEL_CINEMATIC_CAMERA, "SELECT ID, SoundID, OriginX, OriginY, OriginZ, OriginFacing, ModelFileDataID FROM cinematic_camera" + " ORDER BY ID DESC"); // CinematicSequences.db2 - PrepareStatement(HotfixStatements.SEL_CINEMATIC_SEQUENCES, "SELECT ID, SoundID, Camera1, Camera2, Camera3, Camera4, Camera5, Camera6, Camera7, Camera8" + + PrepareStatement(HotfixStatements.SEL_CINEMATIC_SEQUENCES, "SELECT ID, SoundID, Camera1, Camera2, Camera3, Camera4, Camera5, Camera6, Camera7, Camera8" + " FROM cinematic_sequences ORDER BY ID DESC"); // ConversationLine.db2 - PrepareStatement(HotfixStatements.SEL_CONVERSATION_LINE, "SELECT ID, BroadcastTextID, SpellVisualKitID, Duration, NextLineID, Unk1, Yell, Unk2, Unk3" + + PrepareStatement(HotfixStatements.SEL_CONVERSATION_LINE, "SELECT ID, BroadcastTextID, SpellVisualKitID, Duration, NextLineID, Unk1, Yell, Unk2, Unk3" + " FROM conversation_line ORDER BY ID DESC"); // CreatureDisplayInfo.db2 - PrepareStatement(HotfixStatements.SEL_CREATURE_DISPLAY_INFO, "SELECT ID, CreatureModelScale, ModelID, NPCSoundID, SizeClass, Flags, Gender, " + - "ExtendedDisplayInfoID, TextureVariation1, TextureVariation2, TextureVariation3, PortraitTextureFileDataID, CreatureModelAlpha, SoundID, " + - "PlayerModelScale, PortraitCreatureDisplayInfoID, BloodID, ParticleColorID, CreatureGeosetData, ObjectEffectPackageID, AnimReplacementSetID, " + - "UnarmedWeaponSubclass, StateSpellVisualKitID, InstanceOtherPlayerPetScale, MountSpellVisualKitID FROM creature_display_info ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_CREATURE_DISPLAY_INFO, "SELECT ID, CreatureModelScale, ModelID, NPCSoundID, SizeClass, Flags, Gender, " + + "ExtendedDisplayInfoID, PortraitTextureFileDataID, CreatureModelAlpha, SoundID, PlayerModelScale, PortraitCreatureDisplayInfoID, BloodID, " + + "ParticleColorID, CreatureGeosetData, ObjectEffectPackageID, AnimReplacementSetID, UnarmedWeaponSubclass, StateSpellVisualKitID, " + + "InstanceOtherPlayerPetScale, MountSpellVisualKitID, TextureVariation1, TextureVariation2, TextureVariation3 FROM creature_display_info" + + " ORDER BY ID DESC"); // CreatureDisplayInfoExtra.db2 - PrepareStatement(HotfixStatements.SEL_CREATURE_DISPLAY_INFO_EXTRA, "SELECT ID, FileDataID, HDFileDataID, DisplayRaceID, DisplaySexID, DisplayClassID, " + - "SkinID, FaceID, HairStyleID, HairColorID, FacialHairID, CustomDisplayOption1, CustomDisplayOption2, CustomDisplayOption3, Flags" + + PrepareStatement(HotfixStatements.SEL_CREATURE_DISPLAY_INFO_EXTRA, "SELECT ID, FileDataID, HDFileDataID, DisplayRaceID, DisplaySexID, DisplayClassID, " + + "SkinID, FaceID, HairStyleID, HairColorID, FacialHairID, CustomDisplayOption1, CustomDisplayOption2, CustomDisplayOption3, Flags" + " FROM creature_display_info_extra ORDER BY ID DESC"); // CreatureFamily.db2 - PrepareStatement(HotfixStatements.SEL_CREATURE_FAMILY, "SELECT ID, MinScale, MaxScale, Name, IconFileDataID, SkillLine1, SkillLine2, PetFoodMask, " + + PrepareStatement(HotfixStatements.SEL_CREATURE_FAMILY, "SELECT ID, Name, MinScale, MaxScale, IconFileDataID, SkillLine1, SkillLine2, PetFoodMask, " + "MinScaleLevel, MaxScaleLevel, PetTalentType FROM creature_family ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_CREATURE_FAMILY_LOCALE, "SELECT ID, Name_lang FROM creature_family_locale WHERE locale = ?"); // CreatureModelData.db2 - PrepareStatement(HotfixStatements.SEL_CREATURE_MODEL_DATA, "SELECT ID, ModelScale, FootprintTextureLength, FootprintTextureWidth, FootprintParticleScale, " + - "CollisionWidth, CollisionHeight, MountHeight, GeoBoxMin1, GeoBoxMin2, GeoBoxMin3, GeoBoxMax1, GeoBoxMax2, GeoBoxMax3, WorldEffectScale, " + - "AttachedEffectScale, MissileCollisionRadius, MissileCollisionPush, MissileCollisionRaise, OverrideLootEffectScale, OverrideNameScale, " + - "OverrideSelectionRadius, TamedPetBaseScale, HoverHeight, Flags, FileDataID, SizeClass, BloodID, FootprintTextureID, FoleyMaterialID, " + + PrepareStatement(HotfixStatements.SEL_CREATURE_MODEL_DATA, "SELECT ID, ModelScale, FootprintTextureLength, FootprintTextureWidth, FootprintParticleScale, " + + "CollisionWidth, CollisionHeight, MountHeight, GeoBoxMin1, GeoBoxMin2, GeoBoxMin3, GeoBoxMax1, GeoBoxMax2, GeoBoxMax3, WorldEffectScale, " + + "AttachedEffectScale, MissileCollisionRadius, MissileCollisionPush, MissileCollisionRaise, OverrideLootEffectScale, OverrideNameScale, " + + "OverrideSelectionRadius, TamedPetBaseScale, HoverHeight, Flags, FileDataID, SizeClass, BloodID, FootprintTextureID, FoleyMaterialID, " + "FootstepEffectID, DeathThudEffectID, SoundID, CreatureGeosetDataID FROM creature_model_data ORDER BY ID DESC"); // CreatureType.db2 @@ -213,15 +219,16 @@ namespace Framework.Database PrepareStatement(HotfixStatements.SEL_CREATURE_TYPE_LOCALE, "SELECT ID, Name_lang FROM creature_type_locale WHERE locale = ?"); // Criteria.db2 - PrepareStatement(HotfixStatements.SEL_CRITERIA, "SELECT ID, Asset, StartAsset, FailAsset, ModifierTreeId, StartTimer, EligibilityWorldStateID, Type, StartEvent, " + - "FailEvent, Flags, EligibilityWorldStateValue FROM criteria ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_CRITERIA, "SELECT ID, Asset, StartAsset, FailAsset, ModifierTreeId, StartTimer, EligibilityWorldStateID, Type, " + + "StartEvent, FailEvent, Flags, EligibilityWorldStateValue FROM criteria ORDER BY ID DESC"); // CriteriaTree.db2 - PrepareStatement(HotfixStatements.SEL_CRITERIA_TREE, "SELECT ID, Amount, Description, Flags, Operator, CriteriaID, Parent, OrderIndex FROM criteria_tree ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_CRITERIA_TREE, "SELECT ID, Description, Amount, Flags, Operator, CriteriaID, Parent, OrderIndex FROM criteria_tree" + + " ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_CRITERIA_TREE_LOCALE, "SELECT ID, Description_lang FROM criteria_tree_locale WHERE locale = ?"); // CurrencyTypes.db2 - PrepareStatement(HotfixStatements.SEL_CURRENCY_TYPES, "SELECT ID, Name, MaxQty, MaxEarnablePerWeek, Flags, Description, CategoryID, SpellCategory, Quality, " + + PrepareStatement(HotfixStatements.SEL_CURRENCY_TYPES, "SELECT ID, Name, Description, MaxQty, MaxEarnablePerWeek, Flags, CategoryID, SpellCategory, Quality, " + "InventoryIconFileDataID, SpellWeight FROM currency_types ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_CURRENCY_TYPES_LOCALE, "SELECT ID, Name_lang, Description_lang FROM currency_types_locale WHERE locale = ?"); @@ -232,37 +239,37 @@ namespace Framework.Database PrepareStatement(HotfixStatements.SEL_CURVE_POINT, "SELECT ID, X, Y, CurveID, `Index` FROM curve_point ORDER BY ID DESC"); // DestructibleModelData.db2 - PrepareStatement(HotfixStatements.SEL_DESTRUCTIBLE_MODEL_DATA, "SELECT ID, StateDamagedDisplayID, StateDestroyedDisplayID, StateRebuildingDisplayID, " + - "StateSmokeDisplayID, HealEffectSpeed, StateDamagedImpactEffectDoodadSet, StateDamagedAmbientDoodadSet, StateDamagedNameSet, " + - "StateDestroyedDestructionDoodadSet, StateDestroyedImpactEffectDoodadSet, StateDestroyedAmbientDoodadSet, StateDestroyedNameSet, " + - "StateRebuildingDestructionDoodadSet, StateRebuildingImpactEffectDoodadSet, StateRebuildingAmbientDoodadSet, StateRebuildingNameSet, " + - "StateSmokeInitDoodadSet, StateSmokeAmbientDoodadSet, StateSmokeNameSet, EjectDirection, DoNotHighlight, HealEffect" + + PrepareStatement(HotfixStatements.SEL_DESTRUCTIBLE_MODEL_DATA, "SELECT ID, StateDamagedDisplayID, StateDestroyedDisplayID, StateRebuildingDisplayID, " + + "StateSmokeDisplayID, HealEffectSpeed, StateDamagedImpactEffectDoodadSet, StateDamagedAmbientDoodadSet, StateDamagedNameSet, " + + "StateDestroyedDestructionDoodadSet, StateDestroyedImpactEffectDoodadSet, StateDestroyedAmbientDoodadSet, StateDestroyedNameSet, " + + "StateRebuildingDestructionDoodadSet, StateRebuildingImpactEffectDoodadSet, StateRebuildingAmbientDoodadSet, StateRebuildingNameSet, " + + "StateSmokeInitDoodadSet, StateSmokeAmbientDoodadSet, StateSmokeNameSet, EjectDirection, DoNotHighlight, HealEffect" + " FROM destructible_model_data ORDER BY ID DESC"); // Difficulty.db2 - PrepareStatement(HotfixStatements.SEL_DIFFICULTY, "SELECT ID, Name, GroupSizeHealthCurveID, GroupSizeDmgCurveID, GroupSizeSpellPointsCurveID, " + - "FallbackDifficultyID, InstanceType, MinPlayers, MaxPlayers, OldEnumValue, Flags, ToggleDifficultyID, ItemBonusTreeModID, OrderIndex " + - "FROM difficulty ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_DIFFICULTY, "SELECT ID, Name, GroupSizeHealthCurveID, GroupSizeDmgCurveID, GroupSizeSpellPointsCurveID, " + + "FallbackDifficultyID, InstanceType, MinPlayers, MaxPlayers, OldEnumValue, Flags, ToggleDifficultyID, ItemBonusTreeModID, OrderIndex" + + " FROM difficulty ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_DIFFICULTY_LOCALE, "SELECT ID, Name_lang FROM difficulty_locale WHERE locale = ?"); // DungeonEncounter.db2 - PrepareStatement(HotfixStatements.SEL_DUNGEON_ENCOUNTER, "SELECT Name, CreatureDisplayID, MapID, DifficultyID, Bit, Flags, ID, OrderIndex, " + + PrepareStatement(HotfixStatements.SEL_DUNGEON_ENCOUNTER, "SELECT Name, CreatureDisplayID, MapID, DifficultyID, Bit, Flags, ID, OrderIndex, " + "TextureFileDataID FROM dungeon_encounter ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_DUNGEON_ENCOUNTER_LOCALE, "SELECT ID, Name_lang FROM dungeon_encounter_locale WHERE locale = ?"); // DurabilityCosts.db2 - PrepareStatement(HotfixStatements.SEL_DURABILITY_COSTS, "SELECT ID, WeaponSubClassCost1, WeaponSubClassCost2, WeaponSubClassCost3, WeaponSubClassCost4, " + - "WeaponSubClassCost5, WeaponSubClassCost6, WeaponSubClassCost7, WeaponSubClassCost8, WeaponSubClassCost9, WeaponSubClassCost10, " + - "WeaponSubClassCost11, WeaponSubClassCost12, WeaponSubClassCost13, WeaponSubClassCost14, WeaponSubClassCost15, WeaponSubClassCost16, " + - "WeaponSubClassCost17, WeaponSubClassCost18, WeaponSubClassCost19, WeaponSubClassCost20, WeaponSubClassCost21, ArmorSubClassCost1, " + - "ArmorSubClassCost2, ArmorSubClassCost3, ArmorSubClassCost4, ArmorSubClassCost5, ArmorSubClassCost6, ArmorSubClassCost7, ArmorSubClassCost8" + + PrepareStatement(HotfixStatements.SEL_DURABILITY_COSTS, "SELECT ID, WeaponSubClassCost1, WeaponSubClassCost2, WeaponSubClassCost3, WeaponSubClassCost4, " + + "WeaponSubClassCost5, WeaponSubClassCost6, WeaponSubClassCost7, WeaponSubClassCost8, WeaponSubClassCost9, WeaponSubClassCost10, " + + "WeaponSubClassCost11, WeaponSubClassCost12, WeaponSubClassCost13, WeaponSubClassCost14, WeaponSubClassCost15, WeaponSubClassCost16, " + + "WeaponSubClassCost17, WeaponSubClassCost18, WeaponSubClassCost19, WeaponSubClassCost20, WeaponSubClassCost21, ArmorSubClassCost1, " + + "ArmorSubClassCost2, ArmorSubClassCost3, ArmorSubClassCost4, ArmorSubClassCost5, ArmorSubClassCost6, ArmorSubClassCost7, ArmorSubClassCost8" + " FROM durability_costs ORDER BY ID DESC"); // DurabilityQuality.db2 PrepareStatement(HotfixStatements.SEL_DURABILITY_QUALITY, "SELECT ID, QualityMod FROM durability_quality ORDER BY ID DESC"); // Emotes.db2 - PrepareStatement(HotfixStatements.SEL_EMOTES, "SELECT ID, EmoteSlashCommand, SpellVisualKitID, EmoteFlags, RaceMask, AnimID, EmoteSpecProc, " + + PrepareStatement(HotfixStatements.SEL_EMOTES, "SELECT ID, RaceMask, EmoteSlashCommand, SpellVisualKitID, EmoteFlags, AnimID, EmoteSpecProc, " + "EmoteSpecProcParam, EmoteSoundID, ClassMask FROM emotes ORDER BY ID DESC"); // EmotesText.db2 @@ -270,68 +277,69 @@ namespace Framework.Database PrepareStatement(HotfixStatements.SEL_EMOTES_TEXT_LOCALE, "SELECT ID, Name_lang FROM emotes_text_locale WHERE locale = ?"); // EmotesTextSound.db2 - PrepareStatement(HotfixStatements.SEL_EMOTES_TEXT_SOUND, "SELECT ID, EmotesTextId, RaceId, SexId, ClassId, SoundId FROM emotes_text_sound ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_EMOTES_TEXT_SOUND, "SELECT ID, RaceId, SexId, ClassId, SoundId, EmotesTextId FROM emotes_text_sound ORDER BY ID DESC"); // Faction.db2 - PrepareStatement(HotfixStatements.SEL_FACTION, "SELECT ID, ReputationRaceMask1, ReputationRaceMask2, ReputationRaceMask3, ReputationRaceMask4, " + - "ReputationBase1, ReputationBase2, ReputationBase3, ReputationBase4, ParentFactionModIn, ParentFactionModOut, Name, Description, " + - "ReputationMax1, ReputationMax2, ReputationMax3, ReputationMax4, ReputationIndex, ReputationClassMask1, ReputationClassMask2, " + - "ReputationClassMask3, ReputationClassMask4, ReputationFlags1, ReputationFlags2, ReputationFlags3, ReputationFlags4, ParentFactionID, " + + PrepareStatement(HotfixStatements.SEL_FACTION, "SELECT ReputationRaceMask1, ReputationRaceMask2, ReputationRaceMask3, ReputationRaceMask4, Name, " + + "Description, ID, ReputationBase1, ReputationBase2, ReputationBase3, ReputationBase4, ParentFactionModIn, ParentFactionModOut, " + + "ReputationMax1, ReputationMax2, ReputationMax3, ReputationMax4, ReputationIndex, ReputationClassMask1, ReputationClassMask2, " + + "ReputationClassMask3, ReputationClassMask4, ReputationFlags1, ReputationFlags2, ReputationFlags3, ReputationFlags4, ParentFactionID, " + "ParagonFactionID, ParentFactionCapIn, ParentFactionCapOut, Expansion, Flags, FriendshipRepID FROM faction ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_FACTION_LOCALE, "SELECT ID, Name_lang, Description_lang FROM faction_locale WHERE locale = ?"); // FactionTemplate.db2 - PrepareStatement(HotfixStatements.SEL_FACTION_TEMPLATE, "SELECT ID, Faction, Flags, Enemies1, Enemies2, Enemies3, Enemies4, Friends1, Friends2, Friends3, " + + PrepareStatement(HotfixStatements.SEL_FACTION_TEMPLATE, "SELECT ID, Faction, Flags, Enemies1, Enemies2, Enemies3, Enemies4, Friends1, Friends2, Friends3, " + "Friends4, Mask, FriendMask, EnemyMask FROM faction_template ORDER BY ID DESC"); // Gameobjects.db2 - PrepareStatement(HotfixStatements.SEL_GAMEOBJECTS, "SELECT PositionX, PositionY, PositionZ, RotationX, RotationY, RotationZ, RotationW, Size, Data1, Data2, " + - "Data3, Data4, Data5, Data6, Data7, Data8, Name, MapID, DisplayID, PhaseID, PhaseGroupID, PhaseUseFlags, Type, ID FROM gameobjects" + + PrepareStatement(HotfixStatements.SEL_GAMEOBJECTS, "SELECT Name, PositionX, PositionY, PositionZ, RotationX, RotationY, RotationZ, RotationW, Size, Data1, " + + "Data2, Data3, Data4, Data5, Data6, Data7, Data8, MapID, DisplayID, PhaseID, PhaseGroupID, PhaseUseFlags, Type, ID FROM gameobjects" + " ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_GAMEOBJECTS_LOCALE, "SELECT ID, Name_lang FROM gameobjects_locale WHERE locale = ?"); // GameobjectDisplayInfo.db2 - PrepareStatement(HotfixStatements.SEL_GAMEOBJECT_DISPLAY_INFO, "SELECT ID, FileDataID, GeoBoxMinX, GeoBoxMinY, GeoBoxMinZ, GeoBoxMaxX, GeoBoxMaxY, " + + PrepareStatement(HotfixStatements.SEL_GAMEOBJECT_DISPLAY_INFO, "SELECT ID, FileDataID, GeoBoxMinX, GeoBoxMinY, GeoBoxMinZ, GeoBoxMaxX, GeoBoxMaxY, " + "GeoBoxMaxZ, OverrideLootEffectScale, OverrideNameScale, ObjectEffectPackageID FROM gameobject_display_info ORDER BY ID DESC"); // GarrAbility.db2 - PrepareStatement(HotfixStatements.SEL_GARR_ABILITY, "SELECT Name, Description, IconFileDataID, Flags, OtherFactionGarrAbilityID, GarrAbilityCategoryID, " + + PrepareStatement(HotfixStatements.SEL_GARR_ABILITY, "SELECT Name, Description, IconFileDataID, Flags, OtherFactionGarrAbilityID, GarrAbilityCategoryID, " + "FollowerTypeID, ID FROM garr_ability ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_GARR_ABILITY_LOCALE, "SELECT ID, Name_lang, Description_lang FROM garr_ability_locale WHERE locale = ?"); // GarrBuilding.db2 - PrepareStatement(HotfixStatements.SEL_GARR_BUILDING, "SELECT ID, HordeGameObjectID, AllianceGameObjectID, NameAlliance, NameHorde, Description, Tooltip, " + - "IconFileDataID, CostCurrencyID, HordeTexPrefixKitID, AllianceTexPrefixKitID, AllianceActivationScenePackageID, " + - "HordeActivationScenePackageID, FollowerRequiredGarrAbilityID, FollowerGarrAbilityEffectID, CostMoney, Unknown, Type, Level, Flags, " + + PrepareStatement(HotfixStatements.SEL_GARR_BUILDING, "SELECT ID, NameAlliance, NameHorde, Description, Tooltip, HordeGameObjectID, AllianceGameObjectID, " + + "IconFileDataID, CostCurrencyID, HordeTexPrefixKitID, AllianceTexPrefixKitID, AllianceActivationScenePackageID, " + + "HordeActivationScenePackageID, FollowerRequiredGarrAbilityID, FollowerGarrAbilityEffectID, CostMoney, Unknown, Type, Level, Flags, " + "MaxShipments, GarrTypeID, BuildDuration, CostCurrencyAmount, BonusAmount FROM garr_building ORDER BY ID DESC"); - PrepareStatement(HotfixStatements.SEL_GARR_BUILDING_LOCALE, "SELECT ID, NameAlliance_lang, NameHorde_lang, Description_lang, Tooltip_lang" + + PrepareStatement(HotfixStatements.SEL_GARR_BUILDING_LOCALE, "SELECT ID, NameAlliance_lang, NameHorde_lang, Description_lang, Tooltip_lang" + " FROM garr_building_locale WHERE locale = ?"); // GarrBuildingPlotInst.db2 - PrepareStatement(HotfixStatements.SEL_GARR_BUILDING_PLOT_INST, "SELECT LandmarkOffsetX, LandmarkOffsetY, UiTextureAtlasMemberID, GarrSiteLevelPlotInstID, " + + PrepareStatement(HotfixStatements.SEL_GARR_BUILDING_PLOT_INST, "SELECT LandmarkOffsetX, LandmarkOffsetY, UiTextureAtlasMemberID, GarrSiteLevelPlotInstID, " + "GarrBuildingID, ID FROM garr_building_plot_inst ORDER BY ID DESC"); // GarrClassSpec.db2 - PrepareStatement(HotfixStatements.SEL_GARR_CLASS_SPEC, "SELECT NameMale, NameFemale, NameGenderless, ClassAtlasID, GarrFollItemSetID, `Limit`, Flags, ID" + + PrepareStatement(HotfixStatements.SEL_GARR_CLASS_SPEC, "SELECT NameMale, NameFemale, NameGenderless, ClassAtlasID, GarrFollItemSetID, `Limit`, Flags, ID" + " FROM garr_class_spec ORDER BY ID DESC"); - PrepareStatement(HotfixStatements.SEL_GARR_CLASS_SPEC_LOCALE, "SELECT ID, NameMale_lang, NameFemale_lang, NameGenderless_lang FROM garr_class_spec_locale" + + PrepareStatement(HotfixStatements.SEL_GARR_CLASS_SPEC_LOCALE, "SELECT ID, NameMale_lang, NameFemale_lang, NameGenderless_lang FROM garr_class_spec_locale" + " WHERE locale = ?"); // GarrFollower.db2 - PrepareStatement(HotfixStatements.SEL_GARR_FOLLOWER, "SELECT HordeCreatureID, AllianceCreatureID, HordeSourceText, AllianceSourceText, HordePortraitIconID, " + - "AlliancePortraitIconID, HordeAddedBroadcastTextID, AllianceAddedBroadcastTextID, Name, HordeGarrFollItemSetID, AllianceGarrFollItemSetID, " + - "ItemLevelWeapon, ItemLevelArmor, HordeListPortraitTextureKitID, AllianceListPortraitTextureKitID, FollowerTypeID, HordeUiAnimRaceInfoID, " + - "AllianceUiAnimRaceInfoID, Quality, HordeGarrClassSpecID, AllianceGarrClassSpecID, Level, Unknown1, Flags, Unknown2, Unknown3, GarrTypeID, " + - "MaxDurability, Class, HordeFlavorTextGarrStringID, AllianceFlavorTextGarrStringID, ID FROM garr_follower ORDER BY ID DESC"); - PrepareStatement(HotfixStatements.SEL_GARR_FOLLOWER_LOCALE, "SELECT ID, HordeSourceText_lang, AllianceSourceText_lang, Name_lang FROM garr_follower_locale" + + PrepareStatement(HotfixStatements.SEL_GARR_FOLLOWER, "SELECT HordeSourceText, AllianceSourceText, Name, HordeCreatureID, AllianceCreatureID, " + + "HordePortraitIconID, AlliancePortraitIconID, HordeAddedBroadcastTextID, AllianceAddedBroadcastTextID, HordeGarrFollItemSetID, " + + "AllianceGarrFollItemSetID, ItemLevelWeapon, ItemLevelArmor, HordeListPortraitTextureKitID, AllianceListPortraitTextureKitID, FollowerTypeID, " + + "HordeUiAnimRaceInfoID, AllianceUiAnimRaceInfoID, Quality, HordeGarrClassSpecID, AllianceGarrClassSpecID, Level, Unknown1, Flags, Unknown2, " + + "Unknown3, GarrTypeID, MaxDurability, Class, HordeFlavorTextGarrStringID, AllianceFlavorTextGarrStringID, ID FROM garr_follower" + + " ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_GARR_FOLLOWER_LOCALE, "SELECT ID, HordeSourceText_lang, AllianceSourceText_lang, Name_lang FROM garr_follower_locale" + " WHERE locale = ?"); // GarrFollowerXAbility.db2 - PrepareStatement(HotfixStatements.SEL_GARR_FOLLOWER_X_ABILITY, "SELECT ID, GarrFollowerID, GarrAbilityID, FactionIndex FROM garr_follower_x_ability" + + PrepareStatement(HotfixStatements.SEL_GARR_FOLLOWER_X_ABILITY, "SELECT ID, GarrAbilityID, FactionIndex, GarrFollowerID FROM garr_follower_x_ability" + " ORDER BY ID DESC"); // GarrPlot.db2 - PrepareStatement(HotfixStatements.SEL_GARR_PLOT, "SELECT ID, Name, AllianceConstructionGameObjectID, HordeConstructionGameObjectID, GarrPlotUICategoryID, " + + PrepareStatement(HotfixStatements.SEL_GARR_PLOT, "SELECT ID, Name, AllianceConstructionGameObjectID, HordeConstructionGameObjectID, GarrPlotUICategoryID, " + "PlotType, Flags, MinCount, MaxCount FROM garr_plot ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_GARR_PLOT_LOCALE, "SELECT ID, Name_lang FROM garr_plot_locale WHERE locale = ?"); @@ -343,11 +351,11 @@ namespace Framework.Database PrepareStatement(HotfixStatements.SEL_GARR_PLOT_INSTANCE_LOCALE, "SELECT ID, Name_lang FROM garr_plot_instance_locale WHERE locale = ?"); // GarrSiteLevel.db2 - PrepareStatement(HotfixStatements.SEL_GARR_SITE_LEVEL, "SELECT ID, TownHallX, TownHallY, MapID, SiteID, MovieID, UpgradeResourceCost, UpgradeMoneyCost, " + + PrepareStatement(HotfixStatements.SEL_GARR_SITE_LEVEL, "SELECT ID, TownHallX, TownHallY, MapID, SiteID, MovieID, UpgradeResourceCost, UpgradeMoneyCost, " + "Level, UITextureKitID, Level2 FROM garr_site_level ORDER BY ID DESC"); // GarrSiteLevelPlotInst.db2 - PrepareStatement(HotfixStatements.SEL_GARR_SITE_LEVEL_PLOT_INST, "SELECT ID, LandmarkX, LandmarkY, GarrSiteLevelID, GarrPlotInstanceID, Unknown" + + PrepareStatement(HotfixStatements.SEL_GARR_SITE_LEVEL_PLOT_INST, "SELECT ID, LandmarkX, LandmarkY, GarrSiteLevelID, GarrPlotInstanceID, Unknown" + " FROM garr_site_level_plot_inst ORDER BY ID DESC"); // GemProperties.db2 @@ -357,10 +365,11 @@ namespace Framework.Database PrepareStatement(HotfixStatements.SEL_GLYPH_BINDABLE_SPELL, "SELECT ID, SpellID, GlyphPropertiesID FROM glyph_bindable_spell ORDER BY ID DESC"); // GlyphProperties.db2 - PrepareStatement(HotfixStatements.SEL_GLYPH_PROPERTIES, "SELECT ID, SpellID, SpellIconID, Type, GlyphExclusiveCategoryID FROM glyph_properties ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_GLYPH_PROPERTIES, "SELECT ID, SpellID, SpellIconID, Type, GlyphExclusiveCategoryID FROM glyph_properties" + + " ORDER BY ID DESC"); // GlyphRequiredSpec.db2 - PrepareStatement(HotfixStatements.SEL_GLYPH_REQUIRED_SPEC, "SELECT ID, GlyphPropertiesID, ChrSpecializationID FROM glyph_required_spec ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_GLYPH_REQUIRED_SPEC, "SELECT ID, ChrSpecializationID, GlyphPropertiesID FROM glyph_required_spec ORDER BY ID DESC"); // GuildColorBackground.db2 PrepareStatement(HotfixStatements.SEL_GUILD_COLOR_BACKGROUND, "SELECT ID, Red, Green, Blue FROM guild_color_background ORDER BY ID DESC"); @@ -375,19 +384,19 @@ namespace Framework.Database PrepareStatement(HotfixStatements.SEL_GUILD_PERK_SPELLS, "SELECT ID, SpellID FROM guild_perk_spells ORDER BY ID DESC"); // Heirloom.db2 - PrepareStatement(HotfixStatements.SEL_HEIRLOOM, "SELECT ItemID, SourceText, OldItem1, OldItem2, NextDifficultyItemID, UpgradeItemID1, UpgradeItemID2, " + + PrepareStatement(HotfixStatements.SEL_HEIRLOOM, "SELECT SourceText, ItemID, OldItem1, OldItem2, NextDifficultyItemID, UpgradeItemID1, UpgradeItemID2, " + "UpgradeItemID3, ItemBonusListID1, ItemBonusListID2, ItemBonusListID3, Flags, Source, ID FROM heirloom ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_HEIRLOOM_LOCALE, "SELECT ID, SourceText_lang FROM heirloom_locale WHERE locale = ?"); // Holidays.db2 - PrepareStatement(HotfixStatements.SEL_HOLIDAYS, "SELECT ID, Date1, Date2, Date3, Date4, Date5, Date6, Date7, Date8, Date9, Date10, Date11, Date12, Date13, " + - "Date14, Date15, Date16, Duration1, Duration2, Duration3, Duration4, Duration5, Duration6, Duration7, Duration8, Duration9, Duration10, " + - "Region, Looping, CalendarFlags1, CalendarFlags2, CalendarFlags3, CalendarFlags4, CalendarFlags5, CalendarFlags6, CalendarFlags7, " + - "CalendarFlags8, CalendarFlags9, CalendarFlags10, Priority, CalendarFilterType, Flags, HolidayNameID, HolidayDescriptionID, " + + PrepareStatement(HotfixStatements.SEL_HOLIDAYS, "SELECT ID, Date1, Date2, Date3, Date4, Date5, Date6, Date7, Date8, Date9, Date10, Date11, Date12, Date13, " + + "Date14, Date15, Date16, Duration1, Duration2, Duration3, Duration4, Duration5, Duration6, Duration7, Duration8, Duration9, Duration10, " + + "Region, Looping, CalendarFlags1, CalendarFlags2, CalendarFlags3, CalendarFlags4, CalendarFlags5, CalendarFlags6, CalendarFlags7, " + + "CalendarFlags8, CalendarFlags9, CalendarFlags10, Priority, CalendarFilterType, Flags, HolidayNameID, HolidayDescriptionID, " + "TextureFileDataID1, TextureFileDataID2, TextureFileDataID3 FROM holidays ORDER BY ID DESC"); // ImportPriceArmor.db2 - PrepareStatement(HotfixStatements.SEL_IMPORT_PRICE_ARMOR, "SELECT ID, ClothFactor, LeatherFactor, MailFactor, PlateFactor FROM import_price_armor" + + PrepareStatement(HotfixStatements.SEL_IMPORT_PRICE_ARMOR, "SELECT ID, ClothFactor, LeatherFactor, MailFactor, PlateFactor FROM import_price_armor" + " ORDER BY ID DESC"); // ImportPriceQuality.db2 @@ -400,19 +409,19 @@ namespace Framework.Database PrepareStatement(HotfixStatements.SEL_IMPORT_PRICE_WEAPON, "SELECT ID, Factor FROM import_price_weapon ORDER BY ID DESC"); // Item.db2 - PrepareStatement(HotfixStatements.SEL_ITEM, "SELECT ID, FileDataID, Class, SubClass, SoundOverrideSubclass, Material, InventoryType, Sheath, GroupSoundsID" + + PrepareStatement(HotfixStatements.SEL_ITEM, "SELECT ID, FileDataID, Class, SubClass, SoundOverrideSubclass, Material, InventoryType, Sheath, GroupSoundsID" + " FROM item ORDER BY ID DESC"); // ItemAppearance.db2 - PrepareStatement(HotfixStatements.SEL_ITEM_APPEARANCE, "SELECT ID, DisplayID, IconFileDataID, UIOrder, ObjectComponentSlot FROM item_appearance" + + PrepareStatement(HotfixStatements.SEL_ITEM_APPEARANCE, "SELECT ID, DisplayID, IconFileDataID, UIOrder, ObjectComponentSlot FROM item_appearance" + " ORDER BY ID DESC"); // ItemArmorQuality.db2 - PrepareStatement(HotfixStatements.SEL_ITEM_ARMOR_QUALITY, "SELECT ID, QualityMod1, QualityMod2, QualityMod3, QualityMod4, QualityMod5, QualityMod6, " + + PrepareStatement(HotfixStatements.SEL_ITEM_ARMOR_QUALITY, "SELECT ID, QualityMod1, QualityMod2, QualityMod3, QualityMod4, QualityMod5, QualityMod6, " + "QualityMod7, ItemLevel FROM item_armor_quality ORDER BY ID DESC"); // ItemArmorShield.db2 - PrepareStatement(HotfixStatements.SEL_ITEM_ARMOR_SHIELD, "SELECT ID, Quality1, Quality2, Quality3, Quality4, Quality5, Quality6, Quality7, ItemLevel" + + PrepareStatement(HotfixStatements.SEL_ITEM_ARMOR_SHIELD, "SELECT ID, Quality1, Quality2, Quality3, Quality4, Quality5, Quality6, Quality7, ItemLevel" + " FROM item_armor_shield ORDER BY ID DESC"); // ItemArmorTotal.db2 @@ -423,69 +432,69 @@ namespace Framework.Database PrepareStatement(HotfixStatements.SEL_ITEM_BAG_FAMILY_LOCALE, "SELECT ID, Name_lang FROM item_bag_family_locale WHERE locale = ?"); // ItemBonus.db2 - PrepareStatement(HotfixStatements.SEL_ITEM_BONUS, "SELECT ID, Value1, Value2, BonusListID, Type, `Index` FROM item_bonus ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_ITEM_BONUS, "SELECT ID, Value1, Value2, Value3, BonusListID, Type, `Index` FROM item_bonus ORDER BY ID DESC"); // ItemBonusListLevelDelta.db2 PrepareStatement(HotfixStatements.SEL_ITEM_BONUS_LIST_LEVEL_DELTA, "SELECT Delta, ID FROM item_bonus_list_level_delta ORDER BY ID DESC"); // ItemBonusTreeNode.db2 - PrepareStatement(HotfixStatements.SEL_ITEM_BONUS_TREE_NODE, "SELECT ID, BonusTreeID, SubTreeID, BonusListID, ItemLevelSelectorID, BonusTreeModID" + + PrepareStatement(HotfixStatements.SEL_ITEM_BONUS_TREE_NODE, "SELECT ID, SubTreeID, BonusListID, ItemLevelSelectorID, BonusTreeModID, BonusTreeID" + " FROM item_bonus_tree_node ORDER BY ID DESC"); // ItemChildEquipment.db2 - PrepareStatement(HotfixStatements.SEL_ITEM_CHILD_EQUIPMENT, "SELECT ID, ItemID, AltItemID, AltEquipmentSlot FROM item_child_equipment ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_ITEM_CHILD_EQUIPMENT, "SELECT ID, AltItemID, AltEquipmentSlot, ItemID FROM item_child_equipment ORDER BY ID DESC"); // ItemClass.db2 - PrepareStatement(HotfixStatements.SEL_ITEM_CLASS, "SELECT ID, PriceMod, Name, OldEnumValue, Flags FROM item_class ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_ITEM_CLASS, "SELECT ID, Name, PriceMod, OldEnumValue, Flags FROM item_class ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_ITEM_CLASS_LOCALE, "SELECT ID, Name_lang FROM item_class_locale WHERE locale = ?"); // ItemCurrencyCost.db2 PrepareStatement(HotfixStatements.SEL_ITEM_CURRENCY_COST, "SELECT ID, ItemId FROM item_currency_cost ORDER BY ID DESC"); // ItemDamageAmmo.db2 - PrepareStatement(HotfixStatements.SEL_ITEM_DAMAGE_AMMO, "SELECT ID, DPS1, DPS2, DPS3, DPS4, DPS5, DPS6, DPS7, ItemLevel FROM item_damage_ammo" + + PrepareStatement(HotfixStatements.SEL_ITEM_DAMAGE_AMMO, "SELECT ID, DPS1, DPS2, DPS3, DPS4, DPS5, DPS6, DPS7, ItemLevel FROM item_damage_ammo" + " ORDER BY ID DESC"); // ItemDamageOneHand.db2 - PrepareStatement(HotfixStatements.SEL_ITEM_DAMAGE_ONE_HAND, "SELECT ID, DPS1, DPS2, DPS3, DPS4, DPS5, DPS6, DPS7, ItemLevel FROM item_damage_one_hand" + + PrepareStatement(HotfixStatements.SEL_ITEM_DAMAGE_ONE_HAND, "SELECT ID, DPS1, DPS2, DPS3, DPS4, DPS5, DPS6, DPS7, ItemLevel FROM item_damage_one_hand" + " ORDER BY ID DESC"); // ItemDamageOneHandCaster.db2 - PrepareStatement(HotfixStatements.SEL_ITEM_DAMAGE_ONE_HAND_CASTER, "SELECT ID, DPS1, DPS2, DPS3, DPS4, DPS5, DPS6, DPS7, ItemLevel" + + PrepareStatement(HotfixStatements.SEL_ITEM_DAMAGE_ONE_HAND_CASTER, "SELECT ID, DPS1, DPS2, DPS3, DPS4, DPS5, DPS6, DPS7, ItemLevel" + " FROM item_damage_one_hand_caster ORDER BY ID DESC"); // ItemDamageTwoHand.db2 - PrepareStatement(HotfixStatements.SEL_ITEM_DAMAGE_TWO_HAND, "SELECT ID, DPS1, DPS2, DPS3, DPS4, DPS5, DPS6, DPS7, ItemLevel FROM item_damage_two_hand" + + PrepareStatement(HotfixStatements.SEL_ITEM_DAMAGE_TWO_HAND, "SELECT ID, DPS1, DPS2, DPS3, DPS4, DPS5, DPS6, DPS7, ItemLevel FROM item_damage_two_hand" + " ORDER BY ID DESC"); // ItemDamageTwoHandCaster.db2 - PrepareStatement(HotfixStatements.SEL_ITEM_DAMAGE_TWO_HAND_CASTER, "SELECT ID, DPS1, DPS2, DPS3, DPS4, DPS5, DPS6, DPS7, ItemLevel" + + PrepareStatement(HotfixStatements.SEL_ITEM_DAMAGE_TWO_HAND_CASTER, "SELECT ID, DPS1, DPS2, DPS3, DPS4, DPS5, DPS6, DPS7, ItemLevel" + " FROM item_damage_two_hand_caster ORDER BY ID DESC"); // ItemDisenchantLoot.db2 - PrepareStatement(HotfixStatements.SEL_ITEM_DISENCHANT_LOOT, "SELECT ID, MinItemLevel, MaxItemLevel, RequiredDisenchantSkill, ItemClass, ItemSubClass, " + - "ItemQuality FROM item_disenchant_loot ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_ITEM_DISENCHANT_LOOT, "SELECT ID, MinItemLevel, MaxItemLevel, RequiredDisenchantSkill, ItemSubClass, ItemQuality, " + + "Expansion, ItemClass FROM item_disenchant_loot ORDER BY ID DESC"); // ItemEffect.db2 - PrepareStatement(HotfixStatements.SEL_ITEM_EFFECT, "SELECT ID, ItemID, SpellID, Cooldown, CategoryCooldown, Charges, Category, ChrSpecializationID, " + - "OrderIndex, `Trigger` FROM item_effect ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_ITEM_EFFECT, "SELECT ID, SpellID, Cooldown, CategoryCooldown, Charges, Category, ChrSpecializationID, OrderIndex, " + + "`Trigger`, ItemID FROM item_effect ORDER BY ID DESC"); // ItemExtendedCost.db2 - PrepareStatement(HotfixStatements.SEL_ITEM_EXTENDED_COST, "SELECT ID, RequiredItem1, RequiredItem2, RequiredItem3, RequiredItem4, RequiredItem5, " + - "RequiredCurrencyCount1, RequiredCurrencyCount2, RequiredCurrencyCount3, RequiredCurrencyCount4, RequiredCurrencyCount5, RequiredItemCount1, " + - "RequiredItemCount2, RequiredItemCount3, RequiredItemCount4, RequiredItemCount5, RequiredPersonalArenaRating, RequiredCurrency1, " + - "RequiredCurrency2, RequiredCurrency3, RequiredCurrency4, RequiredCurrency5, RequiredArenaSlot, RequiredFactionId, RequiredFactionStanding, " + + PrepareStatement(HotfixStatements.SEL_ITEM_EXTENDED_COST, "SELECT ID, RequiredItem1, RequiredItem2, RequiredItem3, RequiredItem4, RequiredItem5, " + + "RequiredCurrencyCount1, RequiredCurrencyCount2, RequiredCurrencyCount3, RequiredCurrencyCount4, RequiredCurrencyCount5, RequiredItemCount1, " + + "RequiredItemCount2, RequiredItemCount3, RequiredItemCount4, RequiredItemCount5, RequiredPersonalArenaRating, RequiredCurrency1, " + + "RequiredCurrency2, RequiredCurrency3, RequiredCurrency4, RequiredCurrency5, RequiredArenaSlot, RequiredFactionId, RequiredFactionStanding, " + "RequirementFlags, RequiredAchievement FROM item_extended_cost ORDER BY ID DESC"); // ItemLevelSelector.db2 PrepareStatement(HotfixStatements.SEL_ITEM_LEVEL_SELECTOR, "SELECT ID, ItemLevel, ItemLevelSelectorQualitySetID FROM item_level_selector ORDER BY ID DESC"); // ItemLevelSelectorQuality.db2 - PrepareStatement(HotfixStatements.SEL_ITEM_LEVEL_SELECTOR_QUALITY, "SELECT ID, ItemBonusListID, ItemLevelSelectorQualitySetID, Quality" + + PrepareStatement(HotfixStatements.SEL_ITEM_LEVEL_SELECTOR_QUALITY, "SELECT ID, ItemBonusListID, Quality, ItemLevelSelectorQualitySetID" + " FROM item_level_selector_quality ORDER BY ID DESC"); - + // ItemLevelSelectorQualitySet.db2 - PrepareStatement(HotfixStatements.SEL_ITEM_LEVEL_SELECTOR_QUALITY_SET, "SELECT ID, ItemLevelMin, ItemLevelMax FROM item_level_selector_quality_set" + + PrepareStatement(HotfixStatements.SEL_ITEM_LEVEL_SELECTOR_QUALITY_SET, "SELECT ID, ItemLevelMin, ItemLevelMax FROM item_level_selector_quality_set" + " ORDER BY ID DESC"); // ItemLimitCategory.db2 @@ -493,97 +502,97 @@ namespace Framework.Database PrepareStatement(HotfixStatements.SEL_ITEM_LIMIT_CATEGORY_LOCALE, "SELECT ID, Name_lang FROM item_limit_category_locale WHERE locale = ?"); // ItemModifiedAppearance.db2 - PrepareStatement(HotfixStatements.SEL_ITEM_MODIFIED_APPEARANCE, "SELECT ItemID, AppearanceID, AppearanceModID, `Index`, SourceType, ID" + + PrepareStatement(HotfixStatements.SEL_ITEM_MODIFIED_APPEARANCE, "SELECT ItemID, ID, AppearanceModID, AppearanceID, `Index`, SourceType" + " FROM item_modified_appearance ORDER BY ID DESC"); // ItemPriceBase.db2 PrepareStatement(HotfixStatements.SEL_ITEM_PRICE_BASE, "SELECT ID, ArmorFactor, WeaponFactor, ItemLevel FROM item_price_base ORDER BY ID DESC"); // ItemRandomProperties.db2 - PrepareStatement(HotfixStatements.SEL_ITEM_RANDOM_PROPERTIES, "SELECT ID, Name, Enchantment1, Enchantment2, Enchantment3, Enchantment4, Enchantment5" + + PrepareStatement(HotfixStatements.SEL_ITEM_RANDOM_PROPERTIES, "SELECT ID, Name, Enchantment1, Enchantment2, Enchantment3, Enchantment4, Enchantment5" + " FROM item_random_properties ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_ITEM_RANDOM_PROPERTIES_LOCALE, "SELECT ID, Name_lang FROM item_random_properties_locale WHERE locale = ?"); // ItemRandomSuffix.db2 - PrepareStatement(HotfixStatements.SEL_ITEM_RANDOM_SUFFIX, "SELECT ID, Name, Enchantment1, Enchantment2, Enchantment3, Enchantment4, Enchantment5, " + + PrepareStatement(HotfixStatements.SEL_ITEM_RANDOM_SUFFIX, "SELECT ID, Name, Enchantment1, Enchantment2, Enchantment3, Enchantment4, Enchantment5, " + "AllocationPct1, AllocationPct2, AllocationPct3, AllocationPct4, AllocationPct5 FROM item_random_suffix ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_ITEM_RANDOM_SUFFIX_LOCALE, "SELECT ID, Name_lang FROM item_random_suffix_locale WHERE locale = ?"); // ItemSearchName.db2 - PrepareStatement(HotfixStatements.SEL_ITEM_SEARCH_NAME, "SELECT ID, Name, Flags1, Flags2, Flags3, AllowableRace, ItemLevel, Quality, RequiredExpansion, " + - "RequiredLevel, AllowableClass, RequiredReputationFaction, RequiredReputationRank, RequiredSkill, RequiredSkillRank, RequiredSpell" + + PrepareStatement(HotfixStatements.SEL_ITEM_SEARCH_NAME, "SELECT AllowableRace, Name, ID, Flags1, Flags2, Flags3, ItemLevel, Quality, RequiredExpansion, " + + "RequiredLevel, RequiredReputationFaction, RequiredReputationRank, AllowableClass, RequiredSkill, RequiredSkillRank, RequiredSpell" + " FROM item_search_name ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_ITEM_SEARCH_NAME_LOCALE, "SELECT ID, Name_lang FROM item_search_name_locale WHERE locale = ?"); // ItemSet.db2 - PrepareStatement(HotfixStatements.SEL_ITEM_SET, "SELECT ID, Name, ItemID1, ItemID2, ItemID3, ItemID4, ItemID5, ItemID6, ItemID7, ItemID8, ItemID9, " + - "ItemID10, ItemID11, ItemID12, ItemID13, ItemID14, ItemID15, ItemID16, ItemID17, RequiredSkillRank, RequiredSkill, Flags FROM item_set" + + PrepareStatement(HotfixStatements.SEL_ITEM_SET, "SELECT ID, Name, ItemID1, ItemID2, ItemID3, ItemID4, ItemID5, ItemID6, ItemID7, ItemID8, ItemID9, " + + "ItemID10, ItemID11, ItemID12, ItemID13, ItemID14, ItemID15, ItemID16, ItemID17, RequiredSkillRank, RequiredSkill, Flags FROM item_set" + " ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_ITEM_SET_LOCALE, "SELECT ID, Name_lang FROM item_set_locale WHERE locale = ?"); // ItemSetSpell.db2 - PrepareStatement(HotfixStatements.SEL_ITEM_SET_SPELL, "SELECT ID, SpellID, ItemSetID, ChrSpecID, Threshold FROM item_set_spell ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_ITEM_SET_SPELL, "SELECT ID, SpellID, ChrSpecID, Threshold, ItemSetID FROM item_set_spell ORDER BY ID DESC"); // ItemSparse.db2 - PrepareStatement(HotfixStatements.SEL_ITEM_SPARSE, "SELECT ID, Flags1, Flags2, Flags3, Flags4, Unk1, Unk2, BuyCount, BuyPrice, SellPrice, AllowableRace, " + - "RequiredSpell, MaxCount, Stackable, ItemStatAllocation1, ItemStatAllocation2, ItemStatAllocation3, ItemStatAllocation4, ItemStatAllocation5, " + - "ItemStatAllocation6, ItemStatAllocation7, ItemStatAllocation8, ItemStatAllocation9, ItemStatAllocation10, ItemStatSocketCostMultiplier1, " + - "ItemStatSocketCostMultiplier2, ItemStatSocketCostMultiplier3, ItemStatSocketCostMultiplier4, ItemStatSocketCostMultiplier5, " + - "ItemStatSocketCostMultiplier6, ItemStatSocketCostMultiplier7, ItemStatSocketCostMultiplier8, ItemStatSocketCostMultiplier9, " + - "ItemStatSocketCostMultiplier10, RangedModRange, Name, Name2, Name3, Name4, Description, BagFamily, ArmorDamageModifier, Duration, " + - "StatScalingFactor, AllowableClass, ItemLevel, RequiredSkill, RequiredSkillRank, RequiredReputationFaction, ItemStatValue1, ItemStatValue2, " + - "ItemStatValue3, ItemStatValue4, ItemStatValue5, ItemStatValue6, ItemStatValue7, ItemStatValue8, ItemStatValue9, ItemStatValue10, " + - "ScalingStatDistribution, Delay, PageText, StartQuest, LockID, RandomProperty, RandomSuffix, ItemSet, Area, Map, TotemCategory, SocketBonus, " + - "GemProperties, ItemLimitCategory, HolidayID, RequiredTransmogHolidayID, ItemNameDescriptionID, Quality, InventoryType, RequiredLevel, " + - "RequiredHonorRank, RequiredCityRank, RequiredReputationRank, ContainerSlots, ItemStatType1, ItemStatType2, ItemStatType3, ItemStatType4, " + - "ItemStatType5, ItemStatType6, ItemStatType7, ItemStatType8, ItemStatType9, ItemStatType10, DamageType, Bonding, LanguageID, PageMaterial, " + - "Material, Sheath, SocketColor1, SocketColor2, SocketColor3, CurrencySubstitutionID, CurrencySubstitutionCount, ArtifactID, " + - "RequiredExpansion FROM item_sparse ORDER BY ID DESC"); - PrepareStatement(HotfixStatements.SEL_ITEM_SPARSE_LOCALE, "SELECT ID, Name_lang, Name2_lang, Name3_lang, Name4_lang, Description_lang FROM item_sparse_locale" + + PrepareStatement(HotfixStatements.SEL_ITEM_SPARSE, "SELECT ID, AllowableRace, Name, Name2, Name3, Name4, Description, Flags1, Flags2, Flags3, Flags4, Unk1, " + + "Unk2, BuyCount, BuyPrice, SellPrice, RequiredSpell, MaxCount, Stackable, ItemStatAllocation1, ItemStatAllocation2, ItemStatAllocation3, " + + "ItemStatAllocation4, ItemStatAllocation5, ItemStatAllocation6, ItemStatAllocation7, ItemStatAllocation8, ItemStatAllocation9, " + + "ItemStatAllocation10, ItemStatSocketCostMultiplier1, ItemStatSocketCostMultiplier2, ItemStatSocketCostMultiplier3, " + + "ItemStatSocketCostMultiplier4, ItemStatSocketCostMultiplier5, ItemStatSocketCostMultiplier6, ItemStatSocketCostMultiplier7, " + + "ItemStatSocketCostMultiplier8, ItemStatSocketCostMultiplier9, ItemStatSocketCostMultiplier10, RangedModRange, BagFamily, " + + "ArmorDamageModifier, Duration, StatScalingFactor, AllowableClass, ItemLevel, RequiredSkill, RequiredSkillRank, RequiredReputationFaction, " + + "ItemStatValue1, ItemStatValue2, ItemStatValue3, ItemStatValue4, ItemStatValue5, ItemStatValue6, ItemStatValue7, ItemStatValue8, " + + "ItemStatValue9, ItemStatValue10, ScalingStatDistribution, Delay, PageText, StartQuest, LockID, RandomProperty, RandomSuffix, ItemSet, Area, " + + "Map, TotemCategory, SocketBonus, GemProperties, ItemLimitCategory, HolidayID, RequiredTransmogHolidayID, ItemNameDescriptionID, Quality, " + + "InventoryType, RequiredLevel, RequiredHonorRank, RequiredCityRank, RequiredReputationRank, ContainerSlots, ItemStatType1, ItemStatType2, " + + "ItemStatType3, ItemStatType4, ItemStatType5, ItemStatType6, ItemStatType7, ItemStatType8, ItemStatType9, ItemStatType10, DamageType, " + + "Bonding, LanguageID, PageMaterial, Material, Sheath, SocketColor1, SocketColor2, SocketColor3, CurrencySubstitutionID, " + + "CurrencySubstitutionCount, ArtifactID, RequiredExpansion FROM item_sparse ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_ITEM_SPARSE_LOCALE, "SELECT ID, Name_lang, Name2_lang, Name3_lang, Name4_lang, Description_lang FROM item_sparse_locale" + " WHERE locale = ?"); // ItemSpec.db2 - PrepareStatement(HotfixStatements.SEL_ITEM_SPEC, "SELECT ID, SpecID, MinLevel, MaxLevel, ItemType, PrimaryStat, SecondaryStat FROM item_spec" + + PrepareStatement(HotfixStatements.SEL_ITEM_SPEC, "SELECT ID, SpecID, MinLevel, MaxLevel, ItemType, PrimaryStat, SecondaryStat FROM item_spec" + " ORDER BY ID DESC"); // ItemSpecOverride.db2 - PrepareStatement(HotfixStatements.SEL_ITEM_SPEC_OVERRIDE, "SELECT ID, ItemID, SpecID FROM item_spec_override ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_ITEM_SPEC_OVERRIDE, "SELECT ID, SpecID, ItemID FROM item_spec_override ORDER BY ID DESC"); // ItemUpgrade.db2 - PrepareStatement(HotfixStatements.SEL_ITEM_UPGRADE, "SELECT ID, CurrencyCost, PrevItemUpgradeID, CurrencyID, ItemUpgradePathID, ItemLevelBonus" + + PrepareStatement(HotfixStatements.SEL_ITEM_UPGRADE, "SELECT ID, CurrencyCost, PrevItemUpgradeID, CurrencyID, ItemUpgradePathID, ItemLevelBonus" + " FROM item_upgrade ORDER BY ID DESC"); // ItemXBonusTree.db2 - PrepareStatement(HotfixStatements.SEL_ITEM_X_BONUS_TREE, "SELECT ID, ItemID, BonusTreeID FROM item_x_bonus_tree ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_ITEM_X_BONUS_TREE, "SELECT ID, BonusTreeID, ItemID FROM item_x_bonus_tree ORDER BY ID DESC"); // Keychain.db2 - PrepareStatement(HotfixStatements.SEL_KEYCHAIN, "SELECT ID, Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8, Key9, Key10, Key11, Key12, Key13, Key14, Key15, " + - "Key16, Key17, Key18, Key19, Key20, Key21, Key22, Key23, Key24, Key25, Key26, Key27, Key28, Key29, Key30, Key31, Key32 FROM keychain" + + PrepareStatement(HotfixStatements.SEL_KEYCHAIN, "SELECT ID, Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8, Key9, Key10, Key11, Key12, Key13, Key14, Key15, " + + "Key16, Key17, Key18, Key19, Key20, Key21, Key22, Key23, Key24, Key25, Key26, Key27, Key28, Key29, Key30, Key31, Key32 FROM keychain" + " ORDER BY ID DESC"); // LfgDungeons.db2 - PrepareStatement(HotfixStatements.SEL_LFG_DUNGEONS, "SELECT ID, Name, Flags, Description, MinItemLevel, MaxLevel, TargetLevelMax, MapID, RandomID, " + - "ScenarioID, LastBossJournalEncounterID, BonusReputationAmount, MentorItemLevel, PlayerConditionID, MinLevel, TargetLevel, TargetLevelMin, " + - "DifficultyID, Type, Faction, Expansion, OrderIndex, GroupID, CountTank, CountHealer, CountDamage, MinCountTank, MinCountHealer, " + - "MinCountDamage, SubType, MentorCharLevel, TextureFileDataID, RewardIconFileDataID, ProposalTextureFileDataID FROM lfg_dungeons" + + PrepareStatement(HotfixStatements.SEL_LFG_DUNGEONS, "SELECT ID, Name, Description, Flags, MinItemLevel, MaxLevel, TargetLevelMax, MapID, RandomID, " + + "ScenarioID, LastBossJournalEncounterID, BonusReputationAmount, MentorItemLevel, PlayerConditionID, MinLevel, TargetLevel, TargetLevelMin, " + + "DifficultyID, Type, Faction, Expansion, OrderIndex, GroupID, CountTank, CountHealer, CountDamage, MinCountTank, MinCountHealer, " + + "MinCountDamage, SubType, MentorCharLevel, TextureFileDataID, RewardIconFileDataID, ProposalTextureFileDataID FROM lfg_dungeons" + " ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_LFG_DUNGEONS_LOCALE, "SELECT ID, Name_lang, Description_lang FROM lfg_dungeons_locale WHERE locale = ?"); // Light.db2 - PrepareStatement(HotfixStatements.SEL_LIGHT, "SELECT ID, PosX, PosY, PosZ, FalloffStart, FalloffEnd, MapID, LightParamsID1, LightParamsID2, LightParamsID3, " + + PrepareStatement(HotfixStatements.SEL_LIGHT, "SELECT ID, PosX, PosY, PosZ, FalloffStart, FalloffEnd, MapID, LightParamsID1, LightParamsID2, LightParamsID3, " + "LightParamsID4, LightParamsID5, LightParamsID6, LightParamsID7, LightParamsID8 FROM light ORDER BY ID DESC"); // LiquidType.db2 - PrepareStatement(HotfixStatements.SEL_LIQUID_TYPE, "SELECT ID, Name, SpellID, MaxDarkenDepth, FogDarkenIntensity, AmbDarkenIntensity, DirDarkenIntensity, " + - "ParticleScale, Texture1, Texture2, Texture3, Texture4, Texture5, Texture6, Color1, Color2, Float1, Float2, Float3, `Float4`, Float5, Float6, " + - "Float7, `Float8`, Float9, Float10, Float11, Float12, Float13, Float14, Float15, Float16, Float17, Float18, `Int1`, `Int2`, `Int3`, `Int4`, " + - "Flags, LightID, Type, ParticleMovement, ParticleTexSlots, MaterialID, DepthTexCount1, DepthTexCount2, DepthTexCount3, DepthTexCount4, " + + PrepareStatement(HotfixStatements.SEL_LIQUID_TYPE, "SELECT ID, Name, Texture1, Texture2, Texture3, Texture4, Texture5, Texture6, SpellID, MaxDarkenDepth, " + + "FogDarkenIntensity, AmbDarkenIntensity, DirDarkenIntensity, ParticleScale, Color1, Color2, Float1, Float2, Float3, `Float4`, Float5, Float6, " + + "Float7, `Float8`, Float9, Float10, Float11, Float12, Float13, Float14, Float15, Float16, Float17, Float18, `Int1`, `Int2`, `Int3`, `Int4`, " + + "Flags, LightID, Type, ParticleMovement, ParticleTexSlots, MaterialID, DepthTexCount1, DepthTexCount2, DepthTexCount3, DepthTexCount4, " + "DepthTexCount5, DepthTexCount6, SoundID FROM liquid_type ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_LIQUID_TYPE_LOCALE, "SELECT ID, Name_lang FROM liquid_type_locale WHERE locale = ?"); // Lock.db2 - PrepareStatement(HotfixStatements.SEL_LOCK, "SELECT ID, Index1, Index2, Index3, Index4, Index5, Index6, Index7, Index8, Skill1, Skill2, Skill3, Skill4, " + - "Skill5, Skill6, Skill7, Skill8, Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8, Action1, Action2, Action3, Action4, Action5, " + + PrepareStatement(HotfixStatements.SEL_LOCK, "SELECT ID, Index1, Index2, Index3, Index4, Index5, Index6, Index7, Index8, Skill1, Skill2, Skill3, Skill4, " + + "Skill5, Skill6, Skill7, Skill8, Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8, Action1, Action2, Action3, Action4, Action5, " + "Action6, Action7, Action8 FROM `lock` ORDER BY ID DESC"); // MailTemplate.db2 @@ -591,35 +600,35 @@ namespace Framework.Database PrepareStatement(HotfixStatements.SEL_MAIL_TEMPLATE_LOCALE, "SELECT ID, Body_lang FROM mail_template_locale WHERE locale = ?"); // Map.db2 - PrepareStatement(HotfixStatements.SEL_MAP, "SELECT ID, Directory, Flags1, Flags2, MinimapIconScale, CorpsePosX, CorpsePosY, MapName, MapDescription0, " + - "MapDescription1, ShortDescription, LongDescription, AreaTableID, LoadingScreenID, CorpseMapID, TimeOfDayOverride, ParentMapID, " + + PrepareStatement(HotfixStatements.SEL_MAP, "SELECT ID, Directory, MapName, MapDescription0, MapDescription1, ShortDescription, LongDescription, Flags1, " + + "Flags2, MinimapIconScale, CorpsePosX, CorpsePosY, AreaTableID, LoadingScreenID, CorpseMapID, TimeOfDayOverride, ParentMapID, " + "CosmeticParentMapID, WindSettingsID, InstanceType, unk5, ExpansionID, MaxPlayers, TimeOffset FROM map ORDER BY ID DESC"); - PrepareStatement(HotfixStatements.SEL_MAP_LOCALE, "SELECT ID, MapName_lang, MapDescription0_lang, MapDescription1_lang, ShortDescription_lang, " + + PrepareStatement(HotfixStatements.SEL_MAP_LOCALE, "SELECT ID, MapName_lang, MapDescription0_lang, MapDescription1_lang, ShortDescription_lang, " + "LongDescription_lang FROM map_locale WHERE locale = ?"); // MapDifficulty.db2 - PrepareStatement(HotfixStatements.SEL_MAP_DIFFICULTY, "SELECT ID, Message, MapID, DifficultyID, RaidDurationType, MaxPlayers, LockID, Flags, " + - "ItemBonusTreeModID, Context FROM map_difficulty ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_MAP_DIFFICULTY, "SELECT ID, Message, DifficultyID, RaidDurationType, MaxPlayers, LockID, Flags, ItemBonusTreeModID, " + + "Context, MapID FROM map_difficulty ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_MAP_DIFFICULTY_LOCALE, "SELECT ID, Message_lang FROM map_difficulty_locale WHERE locale = ?"); // ModifierTree.db2 PrepareStatement(HotfixStatements.SEL_MODIFIER_TREE, "SELECT ID, Asset1, Asset2, Parent, Type, Unk700, Operator, Amount FROM modifier_tree ORDER BY ID DESC"); // Mount.db2 - PrepareStatement(HotfixStatements.SEL_MOUNT, "SELECT SpellId, Name, Description, SourceDescription, CameraPivotMultiplier, MountTypeId, Flags, Source, ID, " + + PrepareStatement(HotfixStatements.SEL_MOUNT, "SELECT Name, Description, SourceDescription, SpellId, CameraPivotMultiplier, MountTypeId, Flags, Source, ID, " + "PlayerConditionId, UiModelSceneID FROM mount ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_MOUNT_LOCALE, "SELECT ID, Name_lang, Description_lang, SourceDescription_lang FROM mount_locale WHERE locale = ?"); // MountCapability.db2 - PrepareStatement(HotfixStatements.SEL_MOUNT_CAPABILITY, "SELECT RequiredSpell, SpeedModSpell, RequiredRidingSkill, RequiredArea, RequiredMap, Flags, ID, " + + PrepareStatement(HotfixStatements.SEL_MOUNT_CAPABILITY, "SELECT RequiredSpell, SpeedModSpell, RequiredRidingSkill, RequiredArea, RequiredMap, Flags, ID, " + "RequiredAura FROM mount_capability ORDER BY ID DESC"); // MountTypeXCapability.db2 - PrepareStatement(HotfixStatements.SEL_MOUNT_TYPE_X_CAPABILITY, "SELECT ID, MountTypeID, MountCapabilityID, OrderIndex FROM mount_type_x_capability" + + PrepareStatement(HotfixStatements.SEL_MOUNT_TYPE_X_CAPABILITY, "SELECT ID, MountTypeID, MountCapabilityID, OrderIndex FROM mount_type_x_capability" + " ORDER BY ID DESC"); // MountXDisplay.db2 - PrepareStatement(HotfixStatements.SEL_MOUNT_X_DISPLAY, "SELECT ID, MountID, DisplayID, PlayerConditionID FROM mount_x_display ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_MOUNT_X_DISPLAY, "SELECT ID, DisplayID, PlayerConditionID, MountID FROM mount_x_display ORDER BY ID DESC"); // Movie.db2 PrepareStatement(HotfixStatements.SEL_MOVIE, "SELECT ID, AudioFileDataID, SubtitleFileDataID, Volume, KeyID FROM movie ORDER BY ID DESC"); @@ -638,7 +647,7 @@ namespace Framework.Database PrepareStatement(HotfixStatements.SEL_NAMES_RESERVED_LOCALE, "SELECT ID, Name, LocaleMask FROM names_reserved_locale ORDER BY ID DESC"); // OverrideSpellData.db2 - PrepareStatement(HotfixStatements.SEL_OVERRIDE_SPELL_DATA, "SELECT ID, SpellID1, SpellID2, SpellID3, SpellID4, SpellID5, SpellID6, SpellID7, SpellID8, " + + PrepareStatement(HotfixStatements.SEL_OVERRIDE_SPELL_DATA, "SELECT ID, SpellID1, SpellID2, SpellID3, SpellID4, SpellID5, SpellID6, SpellID7, SpellID8, " + "SpellID9, SpellID10, PlayerActionbarFileDataID, Flags FROM override_spell_data ORDER BY ID DESC"); // Phase.db2 @@ -648,22 +657,22 @@ namespace Framework.Database PrepareStatement(HotfixStatements.SEL_PHASE_X_PHASE_GROUP, "SELECT ID, PhaseID, PhaseGroupID FROM phase_x_phase_group ORDER BY ID DESC"); // PlayerCondition.db2 - PrepareStatement(HotfixStatements.SEL_PLAYER_CONDITION, "SELECT ID, RaceMask, Time1, Time2, AuraSpellID1, AuraSpellID2, AuraSpellID3, AuraSpellID4, " + - "FailureDescription, SkillID1, SkillID2, SkillID3, SkillID4, MinSkill1, MinSkill2, MinSkill3, MinSkill4, MaxSkill1, MaxSkill2, MaxSkill3, " + - "MaxSkill4, PrevQuestID1, PrevQuestID2, PrevQuestID3, PrevQuestID4, CurrQuestID1, CurrQuestID2, CurrQuestID3, CurrQuestID4, " + - "CurrentCompletedQuestID1, CurrentCompletedQuestID2, CurrentCompletedQuestID3, CurrentCompletedQuestID4, Explored1, Explored2, Achievement1, " + - "Achievement2, Achievement3, Achievement4, AreaID1, AreaID2, AreaID3, AreaID4, Flags, MinReputation1, MinReputation2, MinReputation3, " + - "AuraCount1, AuraCount2, AuraCount3, AuraCount4, LfgStatus1, LfgStatus2, LfgStatus3, LfgStatus4, LfgCompare1, LfgCompare2, LfgCompare3, " + - "LfgCompare4, CurrencyCount1, CurrencyCount2, CurrencyCount3, CurrencyCount4, ClassMask, MinFactionID1, MinFactionID2, MinFactionID3, " + - "SpellID1, SpellID2, SpellID3, SpellID4, ItemID1, ItemID2, ItemID3, ItemID4, ItemCount1, ItemCount2, ItemCount3, ItemCount4, LfgValue1, " + - "LfgValue2, LfgValue3, LfgValue4, CurrencyID1, CurrencyID2, CurrencyID3, CurrencyID4, QuestKillMonster1, QuestKillMonster2, " + - "QuestKillMonster3, QuestKillMonster4, QuestKillMonster5, QuestKillMonster6, MovementFlags1, MovementFlags2, MinLevel, MaxLevel, Gender, " + - "NativeGender, SkillLogic, LanguageID, MinLanguage, MaxLanguage, MaxFactionID, MaxReputation, ReputationLogic, Unknown1, MinPVPRank, " + - "MaxPVPRank, PvpMedal, PrevQuestLogic, CurrQuestLogic, CurrentCompletedQuestLogic, SpellLogic, ItemLogic, ItemFlags, AuraSpellLogic, " + - "WorldStateExpressionID, WeatherID, PartyStatus, LifetimeMaxPVPRank, AchievementLogic, LfgLogic, AreaLogic, CurrencyLogic, QuestKillID, " + - "QuestKillLogic, MinExpansionLevel, MaxExpansionLevel, MinExpansionTier, MaxExpansionTier, MinGuildLevel, MaxGuildLevel, PhaseUseFlags, " + - "PhaseID, PhaseGroupID, MinAvgItemLevel, MaxAvgItemLevel, MinAvgEquippedItemLevel, MaxAvgEquippedItemLevel, ChrSpecializationIndex, " + - "ChrSpecializationRole, PowerType, PowerTypeComp, PowerTypeValue, ModifierTreeID, MainHandItemSubclassMask FROM player_condition" + + PrepareStatement(HotfixStatements.SEL_PLAYER_CONDITION, "SELECT RaceMask, FailureDescription, ID, Flags, MinLevel, MaxLevel, ClassMask, Gender, " + + "NativeGender, SkillLogic, LanguageID, MinLanguage, MaxLanguage, MaxFactionID, MaxReputation, ReputationLogic, Unknown1, MinPVPRank, " + + "MaxPVPRank, PvpMedal, PrevQuestLogic, CurrQuestLogic, CurrentCompletedQuestLogic, SpellLogic, ItemLogic, ItemFlags, AuraSpellLogic, " + + "WorldStateExpressionID, WeatherID, PartyStatus, LifetimeMaxPVPRank, AchievementLogic, LfgLogic, AreaLogic, CurrencyLogic, QuestKillID, " + + "QuestKillLogic, MinExpansionLevel, MaxExpansionLevel, MinExpansionTier, MaxExpansionTier, MinGuildLevel, MaxGuildLevel, PhaseUseFlags, " + + "PhaseID, PhaseGroupID, MinAvgItemLevel, MaxAvgItemLevel, MinAvgEquippedItemLevel, MaxAvgEquippedItemLevel, ChrSpecializationIndex, " + + "ChrSpecializationRole, PowerType, PowerTypeComp, PowerTypeValue, ModifierTreeID, MainHandItemSubclassMask, SkillID1, SkillID2, SkillID3, " + + "SkillID4, MinSkill1, MinSkill2, MinSkill3, MinSkill4, MaxSkill1, MaxSkill2, MaxSkill3, MaxSkill4, MinFactionID1, MinFactionID2, " + + "MinFactionID3, MinReputation1, MinReputation2, MinReputation3, PrevQuestID1, PrevQuestID2, PrevQuestID3, PrevQuestID4, CurrQuestID1, " + + "CurrQuestID2, CurrQuestID3, CurrQuestID4, CurrentCompletedQuestID1, CurrentCompletedQuestID2, CurrentCompletedQuestID3, " + + "CurrentCompletedQuestID4, SpellID1, SpellID2, SpellID3, SpellID4, ItemID1, ItemID2, ItemID3, ItemID4, ItemCount1, ItemCount2, ItemCount3, " + + "ItemCount4, Explored1, Explored2, Time1, Time2, AuraSpellID1, AuraSpellID2, AuraSpellID3, AuraSpellID4, AuraCount1, AuraCount2, AuraCount3, " + + "AuraCount4, Achievement1, Achievement2, Achievement3, Achievement4, LfgStatus1, LfgStatus2, LfgStatus3, LfgStatus4, LfgCompare1, " + + "LfgCompare2, LfgCompare3, LfgCompare4, LfgValue1, LfgValue2, LfgValue3, LfgValue4, AreaID1, AreaID2, AreaID3, AreaID4, CurrencyID1, " + + "CurrencyID2, CurrencyID3, CurrencyID4, CurrencyCount1, CurrencyCount2, CurrencyCount3, CurrencyCount4, QuestKillMonster1, QuestKillMonster2, " + + "QuestKillMonster3, QuestKillMonster4, QuestKillMonster5, QuestKillMonster6, MovementFlags1, MovementFlags2 FROM player_condition" + " ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_PLAYER_CONDITION_LOCALE, "SELECT ID, FailureDescription_lang FROM player_condition_locale WHERE locale = ?"); @@ -671,26 +680,26 @@ namespace Framework.Database PrepareStatement(HotfixStatements.SEL_POWER_DISPLAY, "SELECT ID, GlobalStringBaseTag, PowerType, Red, Green, Blue FROM power_display ORDER BY ID DESC"); // PowerType.db2 - PrepareStatement(HotfixStatements.SEL_POWER_TYPE, "SELECT ID, PowerTypeToken, PowerCostToken, RegenerationPeace, RegenerationCombat, MaxPower, " + + PrepareStatement(HotfixStatements.SEL_POWER_TYPE, "SELECT ID, PowerTypeToken, PowerCostToken, RegenerationPeace, RegenerationCombat, MaxPower, " + "RegenerationDelay, Flags, PowerTypeEnum, RegenerationMin, RegenerationCenter, RegenerationMax, UIModifier FROM power_type ORDER BY ID DESC"); // PrestigeLevelInfo.db2 - PrepareStatement(HotfixStatements.SEL_PRESTIGE_LEVEL_INFO, "SELECT ID, IconID, PrestigeText, PrestigeLevel, Flags FROM prestige_level_info ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_PRESTIGE_LEVEL_INFO, "SELECT ID, PrestigeText, IconID, PrestigeLevel, Flags FROM prestige_level_info ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_PRESTIGE_LEVEL_INFO_LOCALE, "SELECT ID, PrestigeText_lang FROM prestige_level_info_locale WHERE locale = ?"); // PvpDifficulty.db2 - PrepareStatement(HotfixStatements.SEL_PVP_DIFFICULTY, "SELECT ID, MapID, BracketID, MinLevel, MaxLevel FROM pvp_difficulty ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_PVP_DIFFICULTY, "SELECT ID, BracketID, MinLevel, MaxLevel, MapID FROM pvp_difficulty ORDER BY ID DESC"); // PvpReward.db2 PrepareStatement(HotfixStatements.SEL_PVP_REWARD, "SELECT ID, HonorLevel, Prestige, RewardPackID FROM pvp_reward ORDER BY ID DESC"); // QuestFactionReward.db2 - PrepareStatement(HotfixStatements.SEL_QUEST_FACTION_REWARD, "SELECT ID, QuestRewFactionValue1, QuestRewFactionValue2, QuestRewFactionValue3, " + - "QuestRewFactionValue4, QuestRewFactionValue5, QuestRewFactionValue6, QuestRewFactionValue7, QuestRewFactionValue8, QuestRewFactionValue9, " + + PrepareStatement(HotfixStatements.SEL_QUEST_FACTION_REWARD, "SELECT ID, QuestRewFactionValue1, QuestRewFactionValue2, QuestRewFactionValue3, " + + "QuestRewFactionValue4, QuestRewFactionValue5, QuestRewFactionValue6, QuestRewFactionValue7, QuestRewFactionValue8, QuestRewFactionValue9, " + "QuestRewFactionValue10 FROM quest_faction_reward ORDER BY ID DESC"); // QuestMoneyReward.db2 - PrepareStatement(HotfixStatements.SEL_QUEST_MONEY_REWARD, "SELECT ID, Money1, Money2, Money3, Money4, Money5, Money6, Money7, Money8, Money9, Money10" + + PrepareStatement(HotfixStatements.SEL_QUEST_MONEY_REWARD, "SELECT ID, Money1, Money2, Money3, Money4, Money5, Money6, Money7, Money8, Money9, Money10" + " FROM quest_money_reward ORDER BY ID DESC"); // QuestPackageItem.db2 @@ -707,23 +716,26 @@ namespace Framework.Database PrepareStatement(HotfixStatements.SEL_QUEST_XP, "SELECT ID, Exp1, Exp2, Exp3, Exp4, Exp5, Exp6, Exp7, Exp8, Exp9, Exp10 FROM quest_xp ORDER BY ID DESC"); // RandPropPoints.db2 - PrepareStatement(HotfixStatements.SEL_RAND_PROP_POINTS, "SELECT ID, EpicPropertiesPoints1, EpicPropertiesPoints2, EpicPropertiesPoints3, " + - "EpicPropertiesPoints4, EpicPropertiesPoints5, RarePropertiesPoints1, RarePropertiesPoints2, RarePropertiesPoints3, RarePropertiesPoints4, " + - "RarePropertiesPoints5, UncommonPropertiesPoints1, UncommonPropertiesPoints2, UncommonPropertiesPoints3, UncommonPropertiesPoints4, " + + PrepareStatement(HotfixStatements.SEL_RAND_PROP_POINTS, "SELECT ID, EpicPropertiesPoints1, EpicPropertiesPoints2, EpicPropertiesPoints3, " + + "EpicPropertiesPoints4, EpicPropertiesPoints5, RarePropertiesPoints1, RarePropertiesPoints2, RarePropertiesPoints3, RarePropertiesPoints4, " + + "RarePropertiesPoints5, UncommonPropertiesPoints1, UncommonPropertiesPoints2, UncommonPropertiesPoints3, UncommonPropertiesPoints4, " + "UncommonPropertiesPoints5 FROM rand_prop_points ORDER BY ID DESC"); // RewardPack.db2 - PrepareStatement(HotfixStatements.SEL_REWARD_PACK, "SELECT ID, Money, ArtifactXPMultiplier, ArtifactXPDifficulty, ArtifactCategoryID, TitleID, Unused" + + PrepareStatement(HotfixStatements.SEL_REWARD_PACK, "SELECT ID, Money, ArtifactXPMultiplier, ArtifactXPDifficulty, ArtifactCategoryID, TitleID, Unused" + " FROM reward_pack ORDER BY ID DESC"); // RewardPackXItem.db2 - PrepareStatement(HotfixStatements.SEL_REWARD_PACK_X_ITEM, "SELECT ID, ItemID, RewardPackID, Amount FROM reward_pack_x_item ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_REWARD_PACK_X_ITEM, "SELECT ID, ItemID, Amount, RewardPackID FROM reward_pack_x_item ORDER BY ID DESC"); // RulesetItemUpgrade.db2 PrepareStatement(HotfixStatements.SEL_RULESET_ITEM_UPGRADE, "SELECT ID, ItemID, ItemUpgradeID FROM ruleset_item_upgrade ORDER BY ID DESC"); + // SandboxScaling.db2 + PrepareStatement(HotfixStatements.SEL_SANDBOX_SCALING, "SELECT ID, MinLevel, MaxLevel, Flags FROM sandbox_scaling ORDER BY ID DESC"); + // ScalingStatDistribution.db2 - PrepareStatement(HotfixStatements.SEL_SCALING_STAT_DISTRIBUTION, "SELECT ID, ItemLevelCurveID, MinLevel, MaxLevel FROM scaling_stat_distribution" + + PrepareStatement(HotfixStatements.SEL_SCALING_STAT_DISTRIBUTION, "SELECT ID, ItemLevelCurveID, MinLevel, MaxLevel FROM scaling_stat_distribution" + " ORDER BY ID DESC"); // Scenario.db2 @@ -731,96 +743,98 @@ namespace Framework.Database PrepareStatement(HotfixStatements.SEL_SCENARIO_LOCALE, "SELECT ID, Name_lang FROM scenario_locale WHERE locale = ?"); // ScenarioStep.db2 - PrepareStatement(HotfixStatements.SEL_SCENARIO_STEP, "SELECT ID, Description, Name, ScenarioID, PreviousStepID, QuestRewardID, Step, Flags, CriteriaTreeID," + + PrepareStatement(HotfixStatements.SEL_SCENARIO_STEP, "SELECT ID, Description, Name, ScenarioID, PreviousStepID, QuestRewardID, Step, Flags, CriteriaTreeID, " + "BonusRequiredStepID FROM scenario_step ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_SCENARIO_STEP_LOCALE, "SELECT ID, Description_lang, Name_lang FROM scenario_step_locale WHERE locale = ?"); // SceneScript.db2 - PrepareStatement(HotfixStatements.SEL_SCENE_SCRIPT, "SELECT ID, Name, Script, PrevScriptId, NextScriptId FROM scene_script ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_SCENE_SCRIPT, "SELECT ID, PrevScriptId, NextScriptId FROM scene_script ORDER BY ID DESC"); + + // SceneScriptGlobalText.db2 + PrepareStatement(HotfixStatements.SEL_SCENE_SCRIPT_GLOBAL_TEXT, "SELECT ID, Name, Script FROM scene_script_global_text ORDER BY ID DESC"); // SceneScriptPackage.db2 PrepareStatement(HotfixStatements.SEL_SCENE_SCRIPT_PACKAGE, "SELECT ID, Name FROM scene_script_package ORDER BY ID DESC"); + // SceneScriptText.db2 + PrepareStatement(HotfixStatements.SEL_SCENE_SCRIPT_TEXT, "SELECT ID, Name, Script FROM scene_script_text ORDER BY ID DESC"); + // SkillLine.db2 - PrepareStatement(HotfixStatements.SEL_SKILL_LINE, "SELECT ID, DisplayName, Description, AlternateVerb, Flags, CategoryID, CanLink, IconFileDataID, " + + PrepareStatement(HotfixStatements.SEL_SKILL_LINE, "SELECT ID, DisplayName, Description, AlternateVerb, Flags, CategoryID, CanLink, IconFileDataID, " + "ParentSkillLineID FROM skill_line ORDER BY ID DESC"); - PrepareStatement(HotfixStatements.SEL_SKILL_LINE_LOCALE, "SELECT ID, DisplayName_lang, Description_lang, AlternateVerb_lang FROM skill_line_locale" + + PrepareStatement(HotfixStatements.SEL_SKILL_LINE_LOCALE, "SELECT ID, DisplayName_lang, Description_lang, AlternateVerb_lang FROM skill_line_locale" + " WHERE locale = ?"); // SkillLineAbility.db2 - PrepareStatement(HotfixStatements.SEL_SKILL_LINE_ABILITY, "SELECT ID, SpellID, RaceMask, SupercedesSpell, SkillLine, MinSkillLineRank, " + - "TrivialSkillLineRankHigh, TrivialSkillLineRankLow, UniqueBit, TradeSkillCategoryID, AcquireMethod, NumSkillUps, Unknown703, ClassMask" + + PrepareStatement(HotfixStatements.SEL_SKILL_LINE_ABILITY, "SELECT RaceMask, ID, SpellID, SupercedesSpell, SkillLine, TrivialSkillLineRankHigh, " + + "TrivialSkillLineRankLow, UniqueBit, TradeSkillCategoryID, NumSkillUps, ClassMask, MinSkillLineRank, AcquireMethod, Flags" + " FROM skill_line_ability ORDER BY ID DESC"); // SkillRaceClassInfo.db2 - PrepareStatement(HotfixStatements.SEL_SKILL_RACE_CLASS_INFO, "SELECT ID, RaceMask, SkillID, Flags, SkillTierID, Availability, MinLevel, ClassMask" + + PrepareStatement(HotfixStatements.SEL_SKILL_RACE_CLASS_INFO, "SELECT ID, RaceMask, SkillID, Flags, SkillTierID, Availability, MinLevel, ClassMask" + " FROM skill_race_class_info ORDER BY ID DESC"); // SoundKit.db2 - PrepareStatement(HotfixStatements.SEL_SOUND_KIT, "SELECT ID, VolumeFloat, MinDistance, DistanceCutoff, Flags, SoundEntriesAdvancedID, SoundType, " + - "DialogType, EAXDef, VolumeVariationPlus, VolumeVariationMinus, PitchVariationPlus, PitchVariationMinus, PitchAdjust, BusOverwriteID, Unk700" + + PrepareStatement(HotfixStatements.SEL_SOUND_KIT, "SELECT ID, VolumeFloat, MinDistance, DistanceCutoff, Flags, SoundEntriesAdvancedID, SoundType, " + + "DialogType, EAXDef, VolumeVariationPlus, VolumeVariationMinus, PitchVariationPlus, PitchVariationMinus, PitchAdjust, BusOverwriteID, Unk700" + " FROM sound_kit ORDER BY ID DESC"); // SpecializationSpells.db2 - PrepareStatement(HotfixStatements.SEL_SPECIALIZATION_SPELLS, "SELECT SpellID, OverridesSpellID, Description, SpecID, OrderIndex, ID" + + PrepareStatement(HotfixStatements.SEL_SPECIALIZATION_SPELLS, "SELECT Description, SpellID, OverridesSpellID, SpecID, OrderIndex, ID" + " FROM specialization_spells ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_SPECIALIZATION_SPELLS_LOCALE, "SELECT ID, Description_lang FROM specialization_spells_locale WHERE locale = ?"); // Spell.db2 - PrepareStatement(HotfixStatements.SEL_SPELL, "SELECT Name, NameSubtext, Description, AuraDescription, MiscID, ID, DescriptionVariablesID FROM spell" + - " ORDER BY ID DESC"); - PrepareStatement(HotfixStatements.SEL_SPELL_LOCALE, "SELECT ID, Name_lang, NameSubtext_lang, Description_lang, AuraDescription_lang FROM spell_locale" + + PrepareStatement(HotfixStatements.SEL_SPELL, "SELECT ID, Name, NameSubtext, Description, AuraDescription FROM spell ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_SPELL_LOCALE, "SELECT ID, Name_lang, NameSubtext_lang, Description_lang, AuraDescription_lang FROM spell_locale" + " WHERE locale = ?"); // SpellAuraOptions.db2 - PrepareStatement(HotfixStatements.SEL_SPELL_AURA_OPTIONS, "SELECT ID, SpellID, ProcCharges, ProcTypeMask, ProcCategoryRecovery, CumulativeAura, " + - "SpellProcsPerMinuteID, DifficultyID, ProcChance FROM spell_aura_options ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_SPELL_AURA_OPTIONS, "SELECT ID, ProcCharges, ProcTypeMask, ProcCategoryRecovery, CumulativeAura, " + + "SpellProcsPerMinuteID, DifficultyID, ProcChance, SpellID FROM spell_aura_options ORDER BY ID DESC"); // SpellAuraRestrictions.db2 - PrepareStatement(HotfixStatements.SEL_SPELL_AURA_RESTRICTIONS, "SELECT ID, SpellID, CasterAuraSpell, TargetAuraSpell, ExcludeCasterAuraSpell, " + - "ExcludeTargetAuraSpell, DifficultyID, CasterAuraState, TargetAuraState, ExcludeCasterAuraState, ExcludeTargetAuraState" + + PrepareStatement(HotfixStatements.SEL_SPELL_AURA_RESTRICTIONS, "SELECT ID, CasterAuraSpell, TargetAuraSpell, ExcludeCasterAuraSpell, " + + "ExcludeTargetAuraSpell, DifficultyID, CasterAuraState, TargetAuraState, ExcludeCasterAuraState, ExcludeTargetAuraState, SpellID" + " FROM spell_aura_restrictions ORDER BY ID DESC"); // SpellCastTimes.db2 PrepareStatement(HotfixStatements.SEL_SPELL_CAST_TIMES, "SELECT ID, CastTime, MinCastTime, CastTimePerLevel FROM spell_cast_times ORDER BY ID DESC"); // SpellCastingRequirements.db2 - PrepareStatement(HotfixStatements.SEL_SPELL_CASTING_REQUIREMENTS, "SELECT ID, SpellID, MinFactionID, RequiredAreasID, RequiresSpellFocus, " + + PrepareStatement(HotfixStatements.SEL_SPELL_CASTING_REQUIREMENTS, "SELECT ID, SpellID, MinFactionID, RequiredAreasID, RequiresSpellFocus, " + "FacingCasterFlags, MinReputation, RequiredAuraVision FROM spell_casting_requirements ORDER BY ID DESC"); // SpellCategories.db2 - PrepareStatement(HotfixStatements.SEL_SPELL_CATEGORIES, "SELECT ID, SpellID, Category, StartRecoveryCategory, ChargeCategory, DifficultyID, DefenseType, " + - "DispelType, Mechanic, PreventionType FROM spell_categories ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_SPELL_CATEGORIES, "SELECT ID, Category, StartRecoveryCategory, ChargeCategory, DifficultyID, DefenseType, DispelType, " + + "Mechanic, PreventionType, SpellID FROM spell_categories ORDER BY ID DESC"); // SpellCategory.db2 - PrepareStatement(HotfixStatements.SEL_SPELL_CATEGORY, "SELECT ID, Name, ChargeRecoveryTime, Flags, UsesPerWeek, MaxCharges, ChargeCategoryType " + - "FROM spell_category ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_SPELL_CATEGORY, "SELECT ID, Name, ChargeRecoveryTime, Flags, UsesPerWeek, MaxCharges, ChargeCategoryType" + + " FROM spell_category ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_SPELL_CATEGORY_LOCALE, "SELECT ID, Name_lang FROM spell_category_locale WHERE locale = ?"); // SpellClassOptions.db2 - PrepareStatement(HotfixStatements.SEL_SPELL_CLASS_OPTIONS, "SELECT ID, SpellID, SpellClassMask1, SpellClassMask2, SpellClassMask3, SpellClassMask4, " + + PrepareStatement(HotfixStatements.SEL_SPELL_CLASS_OPTIONS, "SELECT ID, SpellID, SpellClassMask1, SpellClassMask2, SpellClassMask3, SpellClassMask4, " + "SpellClassSet, ModalNextSpell FROM spell_class_options ORDER BY ID DESC"); // SpellCooldowns.db2 - PrepareStatement(HotfixStatements.SEL_SPELL_COOLDOWNS, "SELECT ID, SpellID, CategoryRecoveryTime, RecoveryTime, StartRecoveryTime, DifficultyID" + + PrepareStatement(HotfixStatements.SEL_SPELL_COOLDOWNS, "SELECT ID, CategoryRecoveryTime, RecoveryTime, StartRecoveryTime, DifficultyID, SpellID" + " FROM spell_cooldowns ORDER BY ID DESC"); // SpellDuration.db2 PrepareStatement(HotfixStatements.SEL_SPELL_DURATION, "SELECT ID, Duration, MaxDuration, DurationPerLevel FROM spell_duration ORDER BY ID DESC"); // SpellEffect.db2 - PrepareStatement(HotfixStatements.SEL_SPELL_EFFECT, "SELECT EffectSpellClassMask1, EffectSpellClassMask2, EffectSpellClassMask3, EffectSpellClassMask4, ID, " + - "SpellID, Effect, EffectAura, EffectBasePoints, EffectIndex, EffectMiscValue, EffectMiscValueB, EffectRadiusIndex, EffectRadiusMaxIndex, " + - "ImplicitTarget1, ImplicitTarget2, DifficultyID, EffectAmplitude, EffectAuraPeriod, EffectBonusCoefficient, EffectChainAmplitude, " + - "EffectChainTargets, EffectDieSides, EffectItemType, EffectMechanic, EffectPointsPerResource, EffectRealPointsPerLevel, EffectTriggerSpell, " + - "EffectPosFacing, EffectAttributes, BonusCoefficientFromAP, PvPMultiplier FROM spell_effect ORDER BY ID DESC"); - - // SpellEffectScaling.db2 - PrepareStatement(HotfixStatements.SEL_SPELL_EFFECT_SCALING, "SELECT ID, Coefficient, Variance, ResourceCoefficient, SpellEffectID FROM spell_effect_scaling" + - " ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_SPELL_EFFECT, "SELECT ID, Effect, EffectBasePoints, EffectIndex, EffectAura, DifficultyID, EffectAmplitude, " + + "EffectAuraPeriod, EffectBonusCoefficient, EffectChainAmplitude, EffectChainTargets, EffectDieSides, EffectItemType, EffectMechanic, " + + "EffectPointsPerResource, EffectRealPointsPerLevel, EffectTriggerSpell, EffectPosFacing, EffectAttributes, BonusCoefficientFromAP, " + + "PvPMultiplier, Coefficient, Variance, ResourceCoefficient, GroupSizeCoefficient, EffectSpellClassMask1, EffectSpellClassMask2, " + + "EffectSpellClassMask3, EffectSpellClassMask4, EffectMiscValue, EffectMiscValueB, EffectRadiusIndex, EffectRadiusMaxIndex, ImplicitTarget1, " + + "ImplicitTarget2, SpellID FROM spell_effect ORDER BY ID DESC"); // SpellEquippedItems.db2 - PrepareStatement(HotfixStatements.SEL_SPELL_EQUIPPED_ITEMS, "SELECT ID, SpellID, EquippedItemInventoryTypeMask, EquippedItemSubClassMask, " + + PrepareStatement(HotfixStatements.SEL_SPELL_EQUIPPED_ITEMS, "SELECT ID, SpellID, EquippedItemInventoryTypeMask, EquippedItemSubClassMask, " + "EquippedItemClass FROM spell_equipped_items ORDER BY ID DESC"); // SpellFocusObject.db2 @@ -828,39 +842,39 @@ namespace Framework.Database PrepareStatement(HotfixStatements.SEL_SPELL_FOCUS_OBJECT_LOCALE, "SELECT ID, Name_lang FROM spell_focus_object_locale WHERE locale = ?"); // SpellInterrupts.db2 - PrepareStatement(HotfixStatements.SEL_SPELL_INTERRUPTS, "SELECT ID, SpellID, AuraInterruptFlags1, AuraInterruptFlags2, ChannelInterruptFlags1, " + - "ChannelInterruptFlags2, InterruptFlags, DifficultyID FROM spell_interrupts ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_SPELL_INTERRUPTS, "SELECT ID, DifficultyID, InterruptFlags, AuraInterruptFlags1, AuraInterruptFlags2, " + + "ChannelInterruptFlags1, ChannelInterruptFlags2, SpellID FROM spell_interrupts ORDER BY ID DESC"); // SpellItemEnchantment.db2 - PrepareStatement(HotfixStatements.SEL_SPELL_ITEM_ENCHANTMENT, "SELECT ID, EffectSpellID1, EffectSpellID2, EffectSpellID3, Name, EffectScalingPoints1, " + - "EffectScalingPoints2, EffectScalingPoints3, TransmogCost, TextureFileDataID, EffectPointsMin1, EffectPointsMin2, EffectPointsMin3, " + - "ItemVisual, Flags, RequiredSkillID, RequiredSkillRank, ItemLevel, Charges, Effect1, Effect2, Effect3, ConditionID, MinLevel, MaxLevel, " + + PrepareStatement(HotfixStatements.SEL_SPELL_ITEM_ENCHANTMENT, "SELECT ID, Name, EffectSpellID1, EffectSpellID2, EffectSpellID3, EffectScalingPoints1, " + + "EffectScalingPoints2, EffectScalingPoints3, TransmogCost, TextureFileDataID, EffectPointsMin1, EffectPointsMin2, EffectPointsMin3, " + + "ItemVisual, Flags, RequiredSkillID, RequiredSkillRank, ItemLevel, Charges, Effect1, Effect2, Effect3, ConditionID, MinLevel, MaxLevel, " + "ScalingClass, ScalingClassRestricted, PlayerConditionID FROM spell_item_enchantment ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_SPELL_ITEM_ENCHANTMENT_LOCALE, "SELECT ID, Name_lang FROM spell_item_enchantment_locale WHERE locale = ?"); // SpellItemEnchantmentCondition.db2 - PrepareStatement(HotfixStatements.SEL_SPELL_ITEM_ENCHANTMENT_CONDITION, "SELECT ID, LTOperandType1, LTOperandType2, LTOperandType3, LTOperandType4, " + - "LTOperandType5, Operator1, Operator2, Operator3, Operator4, Operator5, RTOperandType1, RTOperandType2, RTOperandType3, RTOperandType4, " + - "RTOperandType5, RTOperand1, RTOperand2, RTOperand3, RTOperand4, RTOperand5, Logic1, Logic2, Logic3, Logic4, Logic5, LTOperand1, LTOperand2, " + - "LTOperand3, LTOperand4, LTOperand5 FROM spell_item_enchantment_condition ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_SPELL_ITEM_ENCHANTMENT_CONDITION, "SELECT ID, LTOperand1, LTOperand2, LTOperand3, LTOperand4, LTOperand5, " + + "LTOperandType1, LTOperandType2, LTOperandType3, LTOperandType4, LTOperandType5, Operator1, Operator2, Operator3, Operator4, Operator5, " + + "RTOperandType1, RTOperandType2, RTOperandType3, RTOperandType4, RTOperandType5, RTOperand1, RTOperand2, RTOperand3, RTOperand4, RTOperand5, " + + "Logic1, Logic2, Logic3, Logic4, Logic5 FROM spell_item_enchantment_condition ORDER BY ID DESC"); // SpellLearnSpell.db2 PrepareStatement(HotfixStatements.SEL_SPELL_LEARN_SPELL, "SELECT ID, LearnSpellID, SpellID, OverridesSpellID FROM spell_learn_spell ORDER BY ID DESC"); // SpellLevels.db2 - PrepareStatement(HotfixStatements.SEL_SPELL_LEVELS, "SELECT ID, SpellID, BaseLevel, MaxLevel, SpellLevel, DifficultyID, MaxUsableLevel FROM spell_levels" + + PrepareStatement(HotfixStatements.SEL_SPELL_LEVELS, "SELECT ID, BaseLevel, MaxLevel, SpellLevel, DifficultyID, MaxUsableLevel, SpellID FROM spell_levels" + " ORDER BY ID DESC"); // SpellMisc.db2 - PrepareStatement(HotfixStatements.SEL_SPELL_MISC, "SELECT ID, Attributes, AttributesEx, AttributesExB, AttributesExC, AttributesExD, AttributesExE, " + - "AttributesExF, AttributesExG, AttributesExH, AttributesExI, AttributesExJ, AttributesExK, AttributesExL, AttributesExM, Speed, " + - "MultistrikeSpeedMod, CastingTimeIndex, DurationIndex, RangeIndex, SchoolMask, IconFileDataID, ActiveIconFileDataID FROM spell_misc" + - " ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_SPELL_MISC, "SELECT ID, CastingTimeIndex, DurationIndex, RangeIndex, SchoolMask, IconFileDataID, Speed, " + + "ActiveIconFileDataID, MultistrikeSpeedMod, DifficultyID, Attributes, AttributesEx, AttributesExB, AttributesExC, AttributesExD, " + + "AttributesExE, AttributesExF, AttributesExG, AttributesExH, AttributesExI, AttributesExJ, AttributesExK, AttributesExL, AttributesExM, " + + "SpellID FROM spell_misc ORDER BY ID DESC"); // SpellPower.db2 - PrepareStatement(HotfixStatements.SEL_SPELL_POWER, "SELECT SpellID, ManaCost, ManaCostPercentage, ManaCostPercentagePerSecond, RequiredAura, " + - "HealthCostPercentage, PowerIndex, PowerType, ID, ManaCostPerLevel, ManaCostPerSecond, ManaCostAdditional, PowerDisplayID, UnitPowerBarID" + - " FROM spell_power ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_SPELL_POWER, "SELECT ManaCost, ManaCostPercentage, ManaCostPercentagePerSecond, RequiredAura, HealthCostPercentage, " + + "PowerIndex, PowerType, ID, ManaCostPerLevel, ManaCostPerSecond, ManaCostAdditional, PowerDisplayID, UnitPowerBarID, SpellID FROM spell_power" + + " ORDER BY ID DESC"); // SpellPowerDifficulty.db2 PrepareStatement(HotfixStatements.SEL_SPELL_POWER_DIFFICULTY, "SELECT DifficultyID, PowerIndex, ID FROM spell_power_difficulty ORDER BY ID DESC"); @@ -869,65 +883,65 @@ namespace Framework.Database PrepareStatement(HotfixStatements.SEL_SPELL_PROCS_PER_MINUTE, "SELECT ID, BaseProcRate, Flags FROM spell_procs_per_minute ORDER BY ID DESC"); // SpellProcsPerMinuteMod.db2 - PrepareStatement(HotfixStatements.SEL_SPELL_PROCS_PER_MINUTE_MOD, "SELECT ID, Coeff, Param, SpellProcsPerMinuteID, Type FROM spell_procs_per_minute_mod" + + PrepareStatement(HotfixStatements.SEL_SPELL_PROCS_PER_MINUTE_MOD, "SELECT ID, Coeff, Param, Type, SpellProcsPerMinuteID FROM spell_procs_per_minute_mod" + " ORDER BY ID DESC"); // SpellRadius.db2 PrepareStatement(HotfixStatements.SEL_SPELL_RADIUS, "SELECT ID, Radius, RadiusPerLevel, RadiusMin, RadiusMax FROM spell_radius ORDER BY ID DESC"); // SpellRange.db2 - PrepareStatement(HotfixStatements.SEL_SPELL_RANGE, "SELECT ID, MinRangeHostile, MinRangeFriend, MaxRangeHostile, MaxRangeFriend, DisplayName, " + - "DisplayNameShort, Flags FROM spell_range ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_SPELL_RANGE, "SELECT ID, DisplayName, DisplayNameShort, MinRangeHostile, MinRangeFriend, MaxRangeHostile, " + + "MaxRangeFriend, Flags FROM spell_range ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_SPELL_RANGE_LOCALE, "SELECT ID, DisplayName_lang, DisplayNameShort_lang FROM spell_range_locale WHERE locale = ?"); // SpellReagents.db2 - PrepareStatement(HotfixStatements.SEL_SPELL_REAGENTS, "SELECT ID, SpellID, Reagent1, Reagent2, Reagent3, Reagent4, Reagent5, Reagent6, Reagent7, Reagent8, " + - "ReagentCount1, ReagentCount2, ReagentCount3, ReagentCount4, ReagentCount5, ReagentCount6, ReagentCount7, ReagentCount8 FROM spell_reagents" + + PrepareStatement(HotfixStatements.SEL_SPELL_REAGENTS, "SELECT ID, SpellID, Reagent1, Reagent2, Reagent3, Reagent4, Reagent5, Reagent6, Reagent7, Reagent8, " + + "ReagentCount1, ReagentCount2, ReagentCount3, ReagentCount4, ReagentCount5, ReagentCount6, ReagentCount7, ReagentCount8 FROM spell_reagents" + " ORDER BY ID DESC"); // SpellScaling.db2 - PrepareStatement(HotfixStatements.SEL_SPELL_SCALING, "SELECT ID, SpellID, ScalesFromItemLevel, ScalingClass, MinScalingLevel, MaxScalingLevel" + + PrepareStatement(HotfixStatements.SEL_SPELL_SCALING, "SELECT ID, SpellID, ScalesFromItemLevel, ScalingClass, MinScalingLevel, MaxScalingLevel" + " FROM spell_scaling ORDER BY ID DESC"); // SpellShapeshift.db2 - PrepareStatement(HotfixStatements.SEL_SPELL_SHAPESHIFT, "SELECT ID, SpellID, ShapeshiftExclude1, ShapeshiftExclude2, ShapeshiftMask1, ShapeshiftMask2, " + + PrepareStatement(HotfixStatements.SEL_SPELL_SHAPESHIFT, "SELECT ID, SpellID, ShapeshiftExclude1, ShapeshiftExclude2, ShapeshiftMask1, ShapeshiftMask2, " + "StanceBarOrder FROM spell_shapeshift ORDER BY ID DESC"); // SpellShapeshiftForm.db2 - PrepareStatement(HotfixStatements.SEL_SPELL_SHAPESHIFT_FORM, "SELECT ID, Name, WeaponDamageVariance, Flags, CombatRoundTime, MountTypeID, CreatureType, " + - "BonusActionBar, AttackIconFileDataID, CreatureDisplayID1, CreatureDisplayID2, CreatureDisplayID3, CreatureDisplayID4, PresetSpellID1, " + - "PresetSpellID2, PresetSpellID3, PresetSpellID4, PresetSpellID5, PresetSpellID6, PresetSpellID7, PresetSpellID8 FROM spell_shapeshift_form" + + PrepareStatement(HotfixStatements.SEL_SPELL_SHAPESHIFT_FORM, "SELECT ID, Name, WeaponDamageVariance, Flags, CombatRoundTime, MountTypeID, CreatureType, " + + "BonusActionBar, AttackIconFileDataID, CreatureDisplayID1, CreatureDisplayID2, CreatureDisplayID3, CreatureDisplayID4, PresetSpellID1, " + + "PresetSpellID2, PresetSpellID3, PresetSpellID4, PresetSpellID5, PresetSpellID6, PresetSpellID7, PresetSpellID8 FROM spell_shapeshift_form" + " ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_SPELL_SHAPESHIFT_FORM_LOCALE, "SELECT ID, Name_lang FROM spell_shapeshift_form_locale WHERE locale = ?"); // SpellTargetRestrictions.db2 - PrepareStatement(HotfixStatements.SEL_SPELL_TARGET_RESTRICTIONS, "SELECT ID, SpellID, ConeAngle, Width, Targets, TargetCreatureType, DifficultyID, " + - "MaxAffectedTargets, MaxTargetLevel FROM spell_target_restrictions ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_SPELL_TARGET_RESTRICTIONS, "SELECT ID, ConeAngle, Width, Targets, TargetCreatureType, DifficultyID, " + + "MaxAffectedTargets, MaxTargetLevel, SpellID FROM spell_target_restrictions ORDER BY ID DESC"); // SpellTotems.db2 - PrepareStatement(HotfixStatements.SEL_SPELL_TOTEMS, "SELECT ID, SpellID, Totem1, Totem2, RequiredTotemCategoryID1, RequiredTotemCategoryID2" + + PrepareStatement(HotfixStatements.SEL_SPELL_TOTEMS, "SELECT ID, SpellID, Totem1, Totem2, RequiredTotemCategoryID1, RequiredTotemCategoryID2" + " FROM spell_totems ORDER BY ID DESC"); // SpellXSpellVisual.db2 - PrepareStatement(HotfixStatements.SEL_SPELL_X_SPELL_VISUAL, "SELECT SpellID, SpellVisualID, ID, Chance, CasterPlayerConditionID, CasterUnitConditionID, " + - "PlayerConditionID, UnitConditionID, IconFileDataID, ActiveIconFileDataID, Flags, DifficultyID, Priority FROM spell_x_spell_visual" + + PrepareStatement(HotfixStatements.SEL_SPELL_X_SPELL_VISUAL, "SELECT SpellVisualID, ID, Chance, CasterPlayerConditionID, CasterUnitConditionID, " + + "PlayerConditionID, UnitConditionID, IconFileDataID, ActiveIconFileDataID, Flags, DifficultyID, Priority, SpellID FROM spell_x_spell_visual" + " ORDER BY ID DESC"); // SummonProperties.db2 PrepareStatement(HotfixStatements.SEL_SUMMON_PROPERTIES, "SELECT ID, Flags, Category, Faction, Type, Slot FROM summon_properties ORDER BY ID DESC"); // TactKey.db2 - PrepareStatement(HotfixStatements.SEL_TACT_KEY, "SELECT ID, Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8, Key9, Key10, Key11, Key12, Key13, Key14, " + - "Key15, Key16 FROM tact_key ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_TACT_KEY, "SELECT ID, Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8, Key9, Key10, Key11, Key12, Key13, Key14, Key15, " + + "Key16 FROM tact_key ORDER BY ID DESC"); // Talent.db2 - PrepareStatement(HotfixStatements.SEL_TALENT, "SELECT ID, SpellID, OverridesSpellID, Description, SpecID, TierID, ColumnIndex, Flags, CategoryMask1, " + + PrepareStatement(HotfixStatements.SEL_TALENT, "SELECT ID, Description, SpellID, OverridesSpellID, SpecID, TierID, ColumnIndex, Flags, CategoryMask1, " + "CategoryMask2, ClassID FROM talent ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_TALENT_LOCALE, "SELECT ID, Description_lang FROM talent_locale WHERE locale = ?"); // TaxiNodes.db2 - PrepareStatement(HotfixStatements.SEL_TAXI_NODES, "SELECT ID, PosX, PosY, PosZ, Name, MountCreatureID1, MountCreatureID2, MapOffsetX, MapOffsetY, Unk730, " + - "FlightMapOffsetX, FlightMapOffsetY, MapID, ConditionID, LearnableIndex, Flags, UiTextureKitPrefixID, SpecialAtlasIconPlayerConditionID" + + PrepareStatement(HotfixStatements.SEL_TAXI_NODES, "SELECT ID, Name, PosX, PosY, PosZ, MountCreatureID1, MountCreatureID2, MapOffsetX, MapOffsetY, Unk730, " + + "FlightMapOffsetX, FlightMapOffsetY, MapID, ConditionID, LearnableIndex, Flags, UiTextureKitPrefixID, SpecialAtlasIconPlayerConditionID" + " FROM taxi_nodes ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_TAXI_NODES_LOCALE, "SELECT ID, Name_lang FROM taxi_nodes_locale WHERE locale = ?"); @@ -935,7 +949,7 @@ namespace Framework.Database PrepareStatement(HotfixStatements.SEL_TAXI_PATH, "SELECT `From`, `To`, ID, Cost FROM taxi_path ORDER BY ID DESC"); // TaxiPathNode.db2 - PrepareStatement(HotfixStatements.SEL_TAXI_PATH_NODE, "SELECT LocX, LocY, LocZ, PathID, MapID, NodeIndex, ID, Flags, Delay, ArrivalEventID, " + + PrepareStatement(HotfixStatements.SEL_TAXI_PATH_NODE, "SELECT LocX, LocY, LocZ, PathID, MapID, NodeIndex, ID, Flags, Delay, ArrivalEventID, " + "DepartureEventID FROM taxi_path_node ORDER BY ID DESC"); // TotemCategory.db2 @@ -943,14 +957,14 @@ namespace Framework.Database PrepareStatement(HotfixStatements.SEL_TOTEM_CATEGORY_LOCALE, "SELECT ID, Name_lang FROM totem_category_locale WHERE locale = ?"); // Toy.db2 - PrepareStatement(HotfixStatements.SEL_TOY, "SELECT ItemID, Description, Flags, CategoryFilter, ID FROM toy ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_TOY, "SELECT Description, ItemID, Flags, CategoryFilter, ID FROM toy ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_TOY_LOCALE, "SELECT ID, Description_lang FROM toy_locale WHERE locale = ?"); // TransmogHoliday.db2 PrepareStatement(HotfixStatements.SEL_TRANSMOG_HOLIDAY, "SELECT ID, HolidayID FROM transmog_holiday ORDER BY ID DESC"); // TransmogSet.db2 - PrepareStatement(HotfixStatements.SEL_TRANSMOG_SET, "SELECT Name, BaseSetID, UIOrder, ExpansionID, ID, Flags, QuestID, ClassMask, ItemNameDescriptionID, " + + PrepareStatement(HotfixStatements.SEL_TRANSMOG_SET, "SELECT Name, BaseSetID, UIOrder, ExpansionID, ID, Flags, QuestID, ClassMask, ItemNameDescriptionID, " + "TransmogSetGroupID FROM transmog_set ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_TRANSMOG_SET_LOCALE, "SELECT ID, Name_lang FROM transmog_set_locale WHERE locale = ?"); @@ -962,63 +976,63 @@ namespace Framework.Database PrepareStatement(HotfixStatements.SEL_TRANSMOG_SET_ITEM, "SELECT ID, TransmogSetID, ItemModifiedAppearanceID, Flags FROM transmog_set_item ORDER BY ID DESC"); // TransportAnimation.db2 - PrepareStatement(HotfixStatements.SEL_TRANSPORT_ANIMATION, "SELECT ID, TransportID, TimeIndex, PosX, PosY, PosZ, SequenceID FROM transport_animation" + + PrepareStatement(HotfixStatements.SEL_TRANSPORT_ANIMATION, "SELECT ID, TimeIndex, PosX, PosY, PosZ, SequenceID, TransportID FROM transport_animation" + " ORDER BY ID DESC"); // TransportRotation.db2 - PrepareStatement(HotfixStatements.SEL_TRANSPORT_ROTATION, "SELECT ID, TransportID, TimeIndex, X, Y, Z, W FROM transport_rotation ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_TRANSPORT_ROTATION, "SELECT ID, TimeIndex, X, Y, Z, W, TransportID FROM transport_rotation ORDER BY ID DESC"); // UnitPowerBar.db2 - PrepareStatement(HotfixStatements.SEL_UNIT_POWER_BAR, "SELECT ID, RegenerationPeace, RegenerationCombat, FileDataID1, FileDataID2, FileDataID3, " + - "FileDataID4, FileDataID5, FileDataID6, Color1, Color2, Color3, Color4, Color5, Color6, Name, Cost, OutOfError, ToolTip, StartInset, " + - "EndInset, StartPower, Flags, CenterPower, BarType, MinPower, MaxPower FROM unit_power_bar ORDER BY ID DESC"); - PrepareStatement(HotfixStatements.SEL_UNIT_POWER_BAR_LOCALE, "SELECT ID, Name_lang, Cost_lang, OutOfError_lang, ToolTip_lang FROM unit_power_bar_locale" + + PrepareStatement(HotfixStatements.SEL_UNIT_POWER_BAR, "SELECT ID, Name, Cost, OutOfError, ToolTip, RegenerationPeace, RegenerationCombat, FileDataID1, " + + "FileDataID2, FileDataID3, FileDataID4, FileDataID5, FileDataID6, Color1, Color2, Color3, Color4, Color5, Color6, StartInset, EndInset, " + + "StartPower, Flags, CenterPower, BarType, MinPower, MaxPower FROM unit_power_bar ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_UNIT_POWER_BAR_LOCALE, "SELECT ID, Name_lang, Cost_lang, OutOfError_lang, ToolTip_lang FROM unit_power_bar_locale" + " WHERE locale = ?"); // Vehicle.db2 - PrepareStatement(HotfixStatements.SEL_VEHICLE, "SELECT ID, Flags, TurnSpeed, PitchSpeed, PitchMin, PitchMax, MouseLookOffsetPitch, CameraFadeDistScalarMin, " + - "CameraFadeDistScalarMax, CameraPitchOffset, FacingLimitRight, FacingLimitLeft, CameraYawOffset, SeatID1, SeatID2, SeatID3, SeatID4, SeatID5, " + - "SeatID6, SeatID7, SeatID8, VehicleUIIndicatorID, PowerDisplayID1, PowerDisplayID2, PowerDisplayID3, FlagsB, UILocomotionType, " + + PrepareStatement(HotfixStatements.SEL_VEHICLE, "SELECT ID, Flags, TurnSpeed, PitchSpeed, PitchMin, PitchMax, MouseLookOffsetPitch, CameraFadeDistScalarMin, " + + "CameraFadeDistScalarMax, CameraPitchOffset, FacingLimitRight, FacingLimitLeft, CameraYawOffset, SeatID1, SeatID2, SeatID3, SeatID4, SeatID5, " + + "SeatID6, SeatID7, SeatID8, VehicleUIIndicatorID, PowerDisplayID1, PowerDisplayID2, PowerDisplayID3, FlagsB, UILocomotionType, " + "MissileTargetingID FROM vehicle ORDER BY ID DESC"); // VehicleSeat.db2 - PrepareStatement(HotfixStatements.SEL_VEHICLE_SEAT, "SELECT ID, Flags1, Flags2, Flags3, AttachmentOffsetX, AttachmentOffsetY, AttachmentOffsetZ, " + - "EnterPreDelay, EnterSpeed, EnterGravity, EnterMinDuration, EnterMaxDuration, EnterMinArcHeight, EnterMaxArcHeight, ExitPreDelay, ExitSpeed, " + - "ExitGravity, ExitMinDuration, ExitMaxDuration, ExitMinArcHeight, ExitMaxArcHeight, PassengerYaw, PassengerPitch, PassengerRoll, " + - "VehicleEnterAnimDelay, VehicleExitAnimDelay, CameraEnteringDelay, CameraEnteringDuration, CameraExitingDelay, CameraExitingDuration, " + - "CameraOffsetX, CameraOffsetY, CameraOffsetZ, CameraPosChaseRate, CameraFacingChaseRate, CameraEnteringZoom, CameraSeatZoomMin, " + - "CameraSeatZoomMax, UISkinFileDataID, EnterAnimStart, EnterAnimLoop, RideAnimStart, RideAnimLoop, RideUpperAnimStart, RideUpperAnimLoop, " + - "ExitAnimStart, ExitAnimLoop, ExitAnimEnd, VehicleEnterAnim, VehicleExitAnim, VehicleRideAnimLoop, EnterAnimKitID, RideAnimKitID, " + - "ExitAnimKitID, VehicleEnterAnimKitID, VehicleRideAnimKitID, VehicleExitAnimKitID, CameraModeID, AttachmentID, PassengerAttachmentID, " + - "VehicleEnterAnimBone, VehicleExitAnimBone, VehicleRideAnimLoopBone, VehicleAbilityDisplay, EnterUISoundID, ExitUISoundID FROM vehicle_seat" + + PrepareStatement(HotfixStatements.SEL_VEHICLE_SEAT, "SELECT ID, Flags1, Flags2, Flags3, AttachmentOffsetX, AttachmentOffsetY, AttachmentOffsetZ, " + + "EnterPreDelay, EnterSpeed, EnterGravity, EnterMinDuration, EnterMaxDuration, EnterMinArcHeight, EnterMaxArcHeight, ExitPreDelay, ExitSpeed, " + + "ExitGravity, ExitMinDuration, ExitMaxDuration, ExitMinArcHeight, ExitMaxArcHeight, PassengerYaw, PassengerPitch, PassengerRoll, " + + "VehicleEnterAnimDelay, VehicleExitAnimDelay, CameraEnteringDelay, CameraEnteringDuration, CameraExitingDelay, CameraExitingDuration, " + + "CameraOffsetX, CameraOffsetY, CameraOffsetZ, CameraPosChaseRate, CameraFacingChaseRate, CameraEnteringZoom, CameraSeatZoomMin, " + + "CameraSeatZoomMax, UISkinFileDataID, EnterAnimStart, EnterAnimLoop, RideAnimStart, RideAnimLoop, RideUpperAnimStart, RideUpperAnimLoop, " + + "ExitAnimStart, ExitAnimLoop, ExitAnimEnd, VehicleEnterAnim, VehicleExitAnim, VehicleRideAnimLoop, EnterAnimKitID, RideAnimKitID, " + + "ExitAnimKitID, VehicleEnterAnimKitID, VehicleRideAnimKitID, VehicleExitAnimKitID, CameraModeID, AttachmentID, PassengerAttachmentID, " + + "VehicleEnterAnimBone, VehicleExitAnimBone, VehicleRideAnimLoopBone, VehicleAbilityDisplay, EnterUISoundID, ExitUISoundID FROM vehicle_seat" + " ORDER BY ID DESC"); // WmoAreaTable.db2 - PrepareStatement(HotfixStatements.SEL_WMO_AREA_TABLE, "SELECT WMOGroupID, AreaName, WMOID, AmbienceID, ZoneMusic, IntroSound, AreaTableID, UWIntroSound, " + - "UWAmbience, NameSet, SoundProviderPref, SoundProviderPrefUnderwater, Flags, ID, UWZoneMusic FROM wmo_area_table ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_WMO_AREA_TABLE, "SELECT AreaName, WMOGroupID, AmbienceID, ZoneMusic, IntroSound, AreaTableID, UWIntroSound, " + + "UWAmbience, NameSet, SoundProviderPref, SoundProviderPrefUnderwater, Flags, ID, UWZoneMusic, WMOID FROM wmo_area_table ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_WMO_AREA_TABLE_LOCALE, "SELECT ID, AreaName_lang FROM wmo_area_table_locale WHERE locale = ?"); // WorldEffect.db2 - PrepareStatement(HotfixStatements.SEL_WORLD_EFFECT, "SELECT ID, TargetAsset, CombatConditionID, TargetType, WhenToDisplay, QuestFeedbackEffectID, " + + PrepareStatement(HotfixStatements.SEL_WORLD_EFFECT, "SELECT ID, TargetAsset, CombatConditionID, TargetType, WhenToDisplay, QuestFeedbackEffectID, " + "PlayerConditionID FROM world_effect ORDER BY ID DESC"); // WorldMapArea.db2 - PrepareStatement(HotfixStatements.SEL_WORLD_MAP_AREA, "SELECT AreaName, LocLeft, LocRight, LocTop, LocBottom, Flags, MapID, AreaID, DisplayMapID, " + - "DefaultDungeonFloor, ParentWorldMapID, LevelRangeMin, LevelRangeMax, BountySetID, BountyBoardLocation, ID, PlayerConditionID" + + PrepareStatement(HotfixStatements.SEL_WORLD_MAP_AREA, "SELECT AreaName, LocLeft, LocRight, LocTop, LocBottom, Flags, MapID, AreaID, DisplayMapID, " + + "DefaultDungeonFloor, ParentWorldMapID, LevelRangeMin, LevelRangeMax, BountySetID, BountyBoardLocation, ID, PlayerConditionID" + " FROM world_map_area ORDER BY ID DESC"); // WorldMapOverlay.db2 - PrepareStatement(HotfixStatements.SEL_WORLD_MAP_OVERLAY, "SELECT ID, TextureName, TextureWidth, TextureHeight, MapAreaID, AreaID1, AreaID2, AreaID3, " + - "AreaID4, OffsetX, OffsetY, HitRectTop, HitRectLeft, HitRectBottom, HitRectRight, PlayerConditionID, Flags FROM world_map_overlay" + + PrepareStatement(HotfixStatements.SEL_WORLD_MAP_OVERLAY, "SELECT TextureName, ID, TextureWidth, TextureHeight, MapAreaID, AreaID1, AreaID2, AreaID3, " + + "AreaID4, OffsetX, OffsetY, HitRectTop, HitRectLeft, HitRectBottom, HitRectRight, PlayerConditionID, Flags FROM world_map_overlay" + " ORDER BY ID DESC"); // WorldMapTransforms.db2 - PrepareStatement(HotfixStatements.SEL_WORLD_MAP_TRANSFORMS, "SELECT ID, RegionMinX, RegionMinY, RegionMinZ, RegionMaxX, RegionMaxY, RegionMaxZ, " + - "RegionOffsetX, RegionOffsetY, RegionScale, MapID, AreaID, NewMapID, NewDungeonMapID, NewAreaID, Flags, Priority FROM world_map_transforms" + + PrepareStatement(HotfixStatements.SEL_WORLD_MAP_TRANSFORMS, "SELECT ID, RegionMinX, RegionMinY, RegionMinZ, RegionMaxX, RegionMaxY, RegionMaxZ, " + + "RegionOffsetX, RegionOffsetY, RegionScale, MapID, AreaID, NewMapID, NewDungeonMapID, NewAreaID, Flags, Priority FROM world_map_transforms" + " ORDER BY ID DESC"); // WorldSafeLocs.db2 - PrepareStatement(HotfixStatements.SEL_WORLD_SAFE_LOCS, "SELECT ID, LocX, LocY, LocZ, Facing, AreaName, MapID FROM world_safe_locs ORDER BY ID DESC"); + PrepareStatement(HotfixStatements.SEL_WORLD_SAFE_LOCS, "SELECT ID, AreaName, LocX, LocY, LocZ, Facing, MapID FROM world_safe_locs ORDER BY ID DESC"); PrepareStatement(HotfixStatements.SEL_WORLD_SAFE_LOCS_LOCALE, "SELECT ID, AreaName_lang FROM world_safe_locs_locale WHERE locale = ?"); } } @@ -1392,6 +1406,8 @@ namespace Framework.Database SEL_RULESET_ITEM_UPGRADE, + SEL_SANDBOX_SCALING, + SEL_SCALING_STAT_DISTRIBUTION, SEL_SCENARIO, @@ -1402,8 +1418,12 @@ namespace Framework.Database SEL_SCENE_SCRIPT, + SEL_SCENE_SCRIPT_GLOBAL_TEXT, + SEL_SCENE_SCRIPT_PACKAGE, + SEL_SCENE_SCRIPT_TEXT, + SEL_SKILL_LINE, SEL_SKILL_LINE_LOCALE, @@ -1440,8 +1460,6 @@ namespace Framework.Database SEL_SPELL_EFFECT, - SEL_SPELL_EFFECT_SCALING, - SEL_SPELL_EQUIPPED_ITEMS, SEL_SPELL_FOCUS_OBJECT, diff --git a/Source/Framework/IO/FastStruct.cs b/Source/Framework/IO/FastStruct.cs new file mode 100644 index 000000000..8cb570afa --- /dev/null +++ b/Source/Framework/IO/FastStruct.cs @@ -0,0 +1,94 @@ +/* + * 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 System; +using System.Collections.Generic; +using System.Text; +using System.Reflection.Emit; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace Framework.IO +{ + public static class FastStruct where T : struct + { + private delegate T LoadFromByteRefDelegate(ref byte source); + private delegate void CopyMemoryDelegate(ref T dest, ref byte src, int count); + + private readonly static LoadFromByteRefDelegate LoadFromByteRef = BuildLoadFromByteRefMethod(); + private readonly static CopyMemoryDelegate CopyMemory = BuildCopyMemoryMethod(); + + public static readonly int Size = Marshal.SizeOf(); + + private static LoadFromByteRefDelegate BuildLoadFromByteRefMethod() + { + var methodLoadFromByteRef = new DynamicMethod("LoadFromByteRef<" + typeof(T).FullName + ">", + typeof(T), new[] { typeof(byte).MakeByRefType() }, typeof(FastStruct)); + + ILGenerator generator = methodLoadFromByteRef.GetILGenerator(); + generator.Emit(OpCodes.Ldarg_0); + generator.Emit(OpCodes.Ldobj, typeof(T)); + generator.Emit(OpCodes.Ret); + + return (LoadFromByteRefDelegate)methodLoadFromByteRef.CreateDelegate(typeof(LoadFromByteRefDelegate)); + } + + private static CopyMemoryDelegate BuildCopyMemoryMethod() + { + var methodCopyMemory = new DynamicMethod("CopyMemory<" + typeof(T).FullName + ">", + typeof(void), new[] { typeof(T).MakeByRefType(), typeof(byte).MakeByRefType(), typeof(int) }, typeof(FastStruct)); + + ILGenerator generator = methodCopyMemory.GetILGenerator(); + generator.Emit(OpCodes.Ldarg_0); + generator.Emit(OpCodes.Ldarg_1); + generator.Emit(OpCodes.Ldarg_2); + generator.Emit(OpCodes.Cpblk); + generator.Emit(OpCodes.Ret); + + return (CopyMemoryDelegate)methodCopyMemory.CreateDelegate(typeof(CopyMemoryDelegate)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static T ArrayToStructure(byte[] src) + { + return LoadFromByteRef(ref src[0]); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static T ArrayToStructure(byte[] src, int offset) + { + return LoadFromByteRef(ref src[offset]); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static T ArrayToStructure(ref byte src) + { + return LoadFromByteRef(ref src); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static T[] ReadArray(byte[] source) + { + T[] buffer = new T[source.Length / Size]; + + if (source.Length > 0) + CopyMemory(ref buffer[0], ref source[0], source.Length); + + return buffer; + } + } +} diff --git a/Source/Framework/Util/Extensions.cs b/Source/Framework/Util/Extensions.cs index f61d2742a..03eb28bae 100644 --- a/Source/Framework/Util/Extensions.cs +++ b/Source/Framework/Util/Extensions.cs @@ -25,6 +25,7 @@ using System.Reflection.Emit; using System.Runtime.InteropServices; using System.Text; using System.Text.RegularExpressions; +using Framework.IO; namespace System { @@ -201,26 +202,6 @@ namespace System return (Action)setterMethod.CreateDelegate(typeof(Action)); } - public static Func GetGetter(this FieldInfo fieldInfo) - { - var paramExpression = Expression.Parameter(typeof(T)); - var propertyExpression = Expression.Field(paramExpression, fieldInfo); - var convertExpression = Expression.TypeAs(propertyExpression, typeof(object)); - - return Expression.Lambda>(convertExpression, paramExpression).Compile(); - } - - public static Action GetSetter(this FieldInfo fieldInfo) - { - var paramExpression = Expression.Parameter(typeof(T)); - var propertyExpression = Expression.Field(paramExpression, fieldInfo); - var valueExpression = Expression.Parameter(typeof(object)); - var convertExpression = Expression.Convert(valueExpression, fieldInfo.FieldType); - var assignExpression = Expression.Assign(propertyExpression, convertExpression); - - return Expression.Lambda>(assignExpression, paramExpression, valueExpression).Compile(); - } - public static uint[] SerializeObject(this T obj) { //if (obj.GetType()() == null) @@ -370,6 +351,97 @@ namespace System return data; } + + public static T[] ReadArray(this BinaryReader reader, int size) where T : struct + { + int numBytes = FastStruct.Size * size; + + byte[] result = reader.ReadBytes(numBytes); + + return FastStruct.ReadArray(result); + } + + public static T Read(this BinaryReader reader) where T : struct + { + byte[] result = reader.ReadBytes(FastStruct.Size); + + return FastStruct.ArrayToStructure(result); + } + + public static T Read(this BinaryReader reader, int byteCount) where T : struct + { + byte[] result = reader.ReadBytes(byteCount == 0 ? FastStruct.Size : byteCount); + + return FastStruct.ArrayToStructure(result); + } + + public static int ReadInt32(this BinaryReader br, int byteCount = 0) + { + if (byteCount == 0) + return br.ReadInt32(); + + if (byteCount != 4) + { + + } + + byte[] b = new byte[sizeof(int)]; + for (int i = 0; i < byteCount; i++) + b[i] = br.ReadByte(); + + return BitConverter.ToInt32(b, 0); + } + + public static uint ReadUInt32(this BinaryReader br, int byteCount = 0) + { + if (byteCount == 0) + return br.ReadUInt32(); + + if (byteCount != 4) + { + + } + + byte[] b = new byte[sizeof(uint)]; + for (int i = 0; i < byteCount; i++) + b[i] = br.ReadByte(); + + return BitConverter.ToUInt32(b, 0); + } + + public static long ReadInt64(this BinaryReader br, int byteCount = 0) + { + if (byteCount == 0) + return br.ReadInt64(); + + if (byteCount != 8) + { + + } + + byte[] b = new byte[sizeof(long)]; + for (int i = 0; i < byteCount; i++) + b[i] = br.ReadByte(); + + return BitConverter.ToInt64(b, 0); + } + + public static ulong ReadUInt64(this BinaryReader br, int byteCount = 0) + { + if (byteCount == 0) + return br.ReadUInt64(); + + if (byteCount != 8) + { + + } + + byte[] b = new byte[sizeof(ulong)]; + for (int i = 0; i < byteCount; i++) + b[i] = br.ReadByte(); + + return BitConverter.ToUInt64(b, 0); + } #endregion } } \ No newline at end of file diff --git a/Source/Game/Collision/BoundingIntervalHierarchy.cs b/Source/Game/Collision/BoundingIntervalHierarchy.cs index 78868b105..aee94dabf 100644 --- a/Source/Game/Collision/BoundingIntervalHierarchy.cs +++ b/Source/Game/Collision/BoundingIntervalHierarchy.cs @@ -273,8 +273,8 @@ namespace Game.Collision public bool readFromFile(BinaryReader reader) { - var lo = reader.ReadStruct(); - var hi = reader.ReadStruct(); + var lo = reader.Read(); + var hi = reader.Read(); bounds = new AxisAlignedBox(lo, hi); uint treeSize = reader.ReadUInt32(); diff --git a/Source/Game/Collision/Models/GameObjectModel.cs b/Source/Game/Collision/Models/GameObjectModel.cs index bea39cbf5..2c6d8f1e7 100644 --- a/Source/Game/Collision/Models/GameObjectModel.cs +++ b/Source/Game/Collision/Models/GameObjectModel.cs @@ -173,8 +173,8 @@ namespace Game.Collision displayId = reader.ReadUInt32(); name_length = reader.ReadUInt32(); name = reader.ReadString((int)name_length); - v1 = reader.ReadStruct(); - v2 = reader.ReadStruct(); + v1 = reader.Read(); + v2 = reader.Read(); StaticModelList.models.Add(displayId, new GameobjectModelData(name, new AxisAlignedBox(v1, v2))); } diff --git a/Source/Game/Collision/Models/ModelInstance.cs b/Source/Game/Collision/Models/ModelInstance.cs index 1ff368067..6bd0303aa 100644 --- a/Source/Game/Collision/Models/ModelInstance.cs +++ b/Source/Game/Collision/Models/ModelInstance.cs @@ -50,15 +50,15 @@ namespace Game.Collision spawn.flags = reader.ReadUInt32(); spawn.adtId = reader.ReadUInt16(); spawn.ID = reader.ReadUInt32(); - spawn.iPos = reader.ReadStruct(); - spawn.iRot = reader.ReadStruct(); + spawn.iPos = reader.Read(); + spawn.iRot = reader.Read(); spawn.iScale = reader.ReadSingle(); bool has_bound = Convert.ToBoolean(spawn.flags & (uint)ModelFlags.HasBound); if (has_bound) // only WMOs have bound in MPQ, only available after computation { - Vector3 bLow = reader.ReadStruct(); - Vector3 bHigh = reader.ReadStruct(); + Vector3 bLow = reader.Read(); + Vector3 bHigh = reader.Read(); spawn.iBound = new AxisAlignedBox(bLow, bHigh); } uint nameLen = reader.ReadUInt32(); diff --git a/Source/Game/Collision/Models/WorldModel.cs b/Source/Game/Collision/Models/WorldModel.cs index 03d75f73b..aeafa62cd 100644 --- a/Source/Game/Collision/Models/WorldModel.cs +++ b/Source/Game/Collision/Models/WorldModel.cs @@ -139,7 +139,7 @@ namespace Game.Collision liquid.iTilesX = reader.ReadUInt32(); liquid.iTilesY = reader.ReadUInt32(); - liquid.iCorner = reader.ReadStruct(); + liquid.iCorner = reader.Read(); liquid.iType = reader.ReadUInt32(); uint size = (liquid.iTilesX + 1) * (liquid.iTilesY + 1); @@ -222,7 +222,7 @@ namespace Game.Collision return false; for (var i = 0; i < count; ++i) - vertices.Add(reader.ReadStruct()); + vertices.Add(reader.Read()); // read triangle mesh if (reader.ReadStringFromChars(4) != "TRIM") diff --git a/Source/Game/Conditions/ConditionManager.cs b/Source/Game/Conditions/ConditionManager.cs index 6e5d25c2b..3d0cf0824 100644 --- a/Source/Game/Conditions/ConditionManager.cs +++ b/Source/Game/Conditions/ConditionManager.cs @@ -1675,7 +1675,7 @@ namespace Game if (condition.MaxLevel != 0 && player.getLevel() > condition.MaxLevel) return false; - if (condition.RaceMask != 0 && !Convert.ToBoolean(player.getRaceMask() & condition.RaceMask)) + if (condition.RaceMask != 0 && !Convert.ToBoolean((long)player.getRaceMask() & condition.RaceMask)) return false; if (condition.ClassMask != 0 && !Convert.ToBoolean(player.getClassMask() & condition.ClassMask)) diff --git a/Source/Game/DataStorage/CliDB.cs b/Source/Game/DataStorage/CliDB.cs index e1d1e79cc..744c6285e 100644 --- a/Source/Game/DataStorage/CliDB.cs +++ b/Source/Game/DataStorage/CliDB.cs @@ -35,230 +35,233 @@ namespace Game.DataStorage 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); - ItemLevelSelectorQualityStorage = DB6Reader.Read("ItemLevelSelectorQuality.db2", DB6Metas.ItemLevelSelectorQualityMeta, HotfixStatements.SEL_ITEM_LEVEL_SELECTOR_QUALITY); - ItemLevelSelectorQualitySetStorage = DB6Reader.Read("ItemLevelSelectorQualitySet.db2", DB6Metas.ItemLevelSelectorQualitySetMeta, HotfixStatements.SEL_ITEM_LEVEL_SELECTOR_QUALITY_SET); - 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); - 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); - WorldEffectStorage = DB6Reader.Read("WorldEffect.db2", DB6Metas.WorldEffectMeta, HotfixStatements.SEL_WORLD_EFFECT); - 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); + AchievementStorage = DBReader.Read("Achievement.db2", HotfixStatements.SEL_ACHIEVEMENT, HotfixStatements.SEL_ACHIEVEMENT_LOCALE); + 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); + 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); + 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, HotfixStatements.SEL_EMOTES_TEXT_LOCALE); + EmotesTextSoundStorage = DBReader.Read("EmotesTextSound.db2", HotfixStatements.SEL_EMOTES_TEXT_SOUND); + FactionStorage = DBReader.Read("Faction.db2", HotfixStatements.SEL_FACTION, HotfixStatements.SEL_FACTION_LOCALE); + FactionTemplateStorage = DBReader.Read("FactionTemplate.db2", HotfixStatements.SEL_FACTION_TEMPLATE); + GameObjectsStorage = DBReader.Read("GameObjects.db2", HotfixStatements.SEL_GAMEOBJECTS, HotfixStatements.SEL_GAMEOBJECTS_LOCALE); + GameObjectDisplayInfoStorage = DBReader.Read("GameObjectDisplayInfo.db2", HotfixStatements.SEL_GAMEOBJECT_DISPLAY_INFO); + 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); + GarrPlotBuildingStorage = DBReader.Read("GarrPlotBuilding.db2", HotfixStatements.SEL_GARR_PLOT_BUILDING); + GarrPlotStorage = DBReader.Read("GarrPlot.db2", HotfixStatements.SEL_GARR_PLOT, HotfixStatements.SEL_GARR_PLOT_LOCALE); + GarrPlotInstanceStorage = DBReader.Read("GarrPlotInstance.db2", HotfixStatements.SEL_GARR_PLOT_INSTANCE, HotfixStatements.SEL_GARR_PLOT_INSTANCE_LOCALE); + 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); + 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, HotfixStatements.SEL_LIQUID_TYPE_LOCALE); + 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, HotfixStatements.SEL_NAME_GEN_LOCALE); + 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); + 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); + PvpRewardStorage = DBReader.Read("PvpReward.db2", HotfixStatements.SEL_PVP_REWARD); + 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); + RewardPackXItemStorage = DBReader.Read("RewardPackXItem.db2", HotfixStatements.SEL_REWARD_PACK_X_ITEM); + RulesetItemUpgradeStorage = DBReader.Read("RulesetItemUpgrade.db2", HotfixStatements.SEL_RULESET_ITEM_UPGRADE); + SandboxScalingStorage = DBReader.Read("SandboxScaling.db2", HotfixStatements.SEL_SANDBOX_SCALING); + 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); + SpellStorage = DBReader.Read("Spell.db2", HotfixStatements.SEL_SPELL, HotfixStatements.SEL_SPELL_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); + 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); + WorldMapAreaStorage = DBReader.Read("WorldMapArea.db2", HotfixStatements.SEL_WORLD_MAP_AREA); + WorldMapOverlayStorage = DBReader.Read("WorldMapOverlay.db2", HotfixStatements.SEL_WORLD_MAP_OVERLAY); + WorldMapTransformsStorage = DBReader.Read("WorldMapTransforms.db2", HotfixStatements.SEL_WORLD_MAP_TRANSFORMS); + WorldSafeLocsStorage = DBReader.Read("WorldSafeLocs.db2", HotfixStatements.SEL_WORLD_SAFE_LOCS, HotfixStatements.SEL_WORLD_SAFE_LOCS_LOCALE); + foreach (var entry in TaxiPathStorage.Values) { @@ -307,13 +310,13 @@ namespace Game.DataStorage 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) + if (!AreaTableStorage.ContainsKey(9531) || // last area (areaflag) added in 7.0.3 (22594) + !CharTitlesStorage.ContainsKey(522) || // last char title added in 7.0.3 (22594) + !GemPropertiesStorage.ContainsKey(3632) || // last gem property added in 7.0.3 (22594) + !ItemStorage.ContainsKey(157831) || // last item added in 7.0.3 (22594) + !ItemExtendedCostStorage.ContainsKey(6300) || // last item extended cost added in 7.0.3 (22594) + !MapStorage.ContainsKey(1903) || // last map added in 7.0.3 (22594) + !SpellStorage.ContainsKey(263166)) // 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); @@ -519,11 +522,14 @@ namespace Game.DataStorage public static DB6Storage RewardPackStorage; public static DB6Storage RewardPackXItemStorage; public static DB6Storage RulesetItemUpgradeStorage; + public static DB6Storage SandboxScalingStorage; 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; @@ -540,7 +546,6 @@ namespace Game.DataStorage 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; diff --git a/Source/Game/DataStorage/ClientReader/BitStream.cs b/Source/Game/DataStorage/ClientReader/BitStream.cs new file mode 100644 index 000000000..4cebaed99 --- /dev/null +++ b/Source/Game/DataStorage/ClientReader/BitStream.cs @@ -0,0 +1,418 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.IO; +using Framework.IO; + +namespace Game.DataStorage +{ + public class BitStream : IDisposable + { + private byte currentByte; + private long offset; + private int bit; + private Stream stream; + private Encoding encoding = Encoding.UTF8; + private bool canWrite = true; + + public long Length => stream.Length; + public long BitPosition => bit; + public long Offset => offset; + private bool ValidPosition => offset < Length; + + + public BitStream(int capacity = 0) + { + this.stream = new MemoryStream(capacity); + offset = bit = 0; + canWrite = true; + currentByte = 0; + } + + public BitStream(byte[] buffer) + { + this.stream = new MemoryStream(buffer); + offset = bit = 0; + canWrite = false; + currentByte = buffer[0]; + } + + + #region Methods + public void Seek(long offset, int bit) + { + if (offset > Length) + { + this.offset = Length; + } + else + { + if (offset >= 0) + { + this.offset = offset; + } + else + { + offset = 0; + } + } + + if (bit >= 8) + { + this.offset += bit / 8; + this.bit = bit % 8; + } + else + { + this.bit = bit; + } + + UpdateCurrentByte(); + } + + public bool AdvanceBit() + { + bit = (bit + 1) % 8; + if (bit == 0) + { + offset++; + + if (canWrite) + stream.WriteByte(currentByte); + + UpdateCurrentByte(); + + return true; + } + + return false; + } + + public byte[] GetStreamData() + { + stream.Position = 0; + MemoryStream s = new MemoryStream(); + stream.CopyTo(s); + Seek(offset, bit); + return s.ToArray(); + } + + public bool ChangeLength(long length) + { + if (stream.CanSeek && stream.CanWrite) + { + stream.SetLength(length); + return true; + } + else + { + return false; + } + } + + public void CopyStreamTo(Stream stream) + { + Seek(0, 0); + this.stream.CopyTo(stream); + } + + public MemoryStream CloneAsMemoryStream() => new MemoryStream(GetStreamData()); + + #endregion + + #region Bit Read + + private void UpdateCurrentByte() + { + stream.Position = offset; + + if (canWrite) + { + currentByte = 0; + } + else + { + currentByte = (byte)stream.ReadByte(); + stream.Position = offset; + } + } + + private Bit ReadBit() + { + if (!ValidPosition) + throw new IOException("Cannot read in an offset bigger than the length of the stream"); + + byte value = (byte)((currentByte >> (bit)) & 1); + AdvanceBit(); + + return value; + } + + #endregion + + public byte[] ReadBytes(long length, bool isBytes = false, long byteLength = 0) + { + if (isBytes) + length *= 8; + + byteLength = (byteLength == 0 ? length / 8 : byteLength); + + byte[] data = new byte[byteLength]; + for (long i = 0; i < length;) + { + byte value = 0; + for (int p = 0; p < 8 && i < length; i++, p++) + value |= (byte)(ReadBit() << p); + + data[((i + 7) / 8) - 1] = value; + } + + return data; + } + + public byte[] ReadBytesPadded(long length) + { + int requiredSize = NextPow2((int)(length + 7) / 8); + byte[] data = ReadBytes(length, false, requiredSize); + return data; + } + + public byte ReadByte() + { + return ReadBytes(8)[0]; + } + + public byte ReadByte(int bits) + { + bits = Math.Min(Math.Max(bits, 0), 8); // clamp values + return ReadBytes(bits)[0]; + } + + public string ReadString(int length) + { + // UTF8 - revert if encoding gets exposed + return encoding.GetString(ReadBytes(8 * length)); + } + + public short ReadInt16() + { + short value = BitConverter.ToInt16(ReadBytes(16), 0); + return value; + } + + public int ReadInt32() + { + int value = BitConverter.ToInt32(ReadBytes(32), 0); + return value; + } + + public long ReadInt64() + { + long value = BitConverter.ToInt64(ReadBytes(64), 0); + return value; + } + + public ushort ReadUInt16() + { + ushort value = BitConverter.ToUInt16(ReadBytes(16), 0); + return value; + } + + public uint ReadUInt32(int bitWidth = 32) + { + bitWidth = Math.Min(Math.Max(bitWidth, 0), 32); // clamp values + + byte[] data = ReadBytes(bitWidth, false, 4); + return BitConverter.ToUInt32(data, 0); + } + + public ulong ReadUInt64() + { + ulong value = BitConverter.ToUInt64(ReadBytes(64), 0); + return value; + } + + private int NextPow2(int v) + { + v--; + v |= v >> 1; + v |= v >> 2; + v |= v >> 4; + v |= v >> 8; + v |= v >> 16; + v++; + return Math.Max(v, 1); + } + + + public void Dispose() + { + ((IDisposable)stream)?.Dispose(); + } + + internal struct Bit + { + private byte value; + + public Bit(int value) + { + this.value = (byte)(value & 1); + } + + public static implicit operator Bit(int value) => new Bit(value); + + public static implicit operator byte(Bit bit) => bit.value; + } + + } + + public class BitReader + { + private byte[] m_array; + private int m_readPos; + private int m_readOffset; + + public int Position { get => m_readPos; set => m_readPos = value; } + public int Offset { get => m_readOffset; set => m_readOffset = value; } + public byte[] Data { get => m_array; set => m_array = value; } + + public BitReader(byte[] data) + { + m_array = data; + } + + public BitReader(byte[] data, int offset) + { + m_array = data; + m_readOffset = offset; + } + + public uint ReadUInt32(int numBits) + { + uint result = FastStruct.ArrayToStructure(ref m_array[m_readOffset + (m_readPos >> 3)]) << (32 - numBits - (m_readPos & 7)) >> (32 - numBits); + m_readPos += numBits; + return result; + } + + public ulong ReadUInt64(int numBits) + { + ulong result = FastStruct.ArrayToStructure(ref m_array[m_readOffset + (m_readPos >> 3)]) << (64 - numBits - (m_readPos & 7)) >> (64 - numBits); + m_readPos += numBits; + return result; + } + + public Value32 ReadValue32(int numBits) + { + unsafe + { + ulong result = ReadUInt32(numBits); + return *(Value32*)&result; + } + } + + public Value64 ReadValue64(int numBits) + { + unsafe + { + ulong result = ReadUInt64(numBits); + return *(Value64*)&result; + } + } + + // this will probably work in C# 7.3 once blittable generic constrain added, or not... + //public unsafe T Read(int numBits) where T : struct + //{ + // //fixed (byte* ptr = &m_array[m_readOffset + (m_readPos >> 3)]) + // //{ + // // T val = *(T*)ptr << (sizeof(T) - numBits - (m_readPos & 7)) >> (sizeof(T) - numBits); + // // m_readPos += numBits; + // // return val; + // //} + // //T result = FastStruct.ArrayToStructure(ref m_array[m_readOffset + (m_readPos >> 3)]) << (32 - numBits - (m_readPos & 7)) >> (32 - numBits); + // //m_readPos += numBits; + // //return result; + //} + } + + public struct Value32 + { + unsafe fixed byte Value[4]; + + public T GetValue() where T : struct + { + unsafe + { + fixed (byte* ptr = Value) + return FastStruct.ArrayToStructure(ref ptr[0]); + } + } + + public byte[] GetBytes(int bitSize) + { + byte[] data = new byte[NextPow2((int)(bitSize + 7) / 8)]; + unsafe + { + fixed (byte* ptr = Value) + { + for (var i = 0; i < data.Length; ++i) + data[i] = ptr[i]; + } + } + + return data; + } + + private int NextPow2(int v) + { + v--; + v |= v >> 1; + v |= v >> 2; + v |= v >> 4; + v |= v >> 8; + v |= v >> 16; + v++; + return Math.Max(v, 1); + } + } + + public struct Value64 + { + unsafe fixed byte Value[8]; + + public T GetValue() where T : struct + { + unsafe + { + fixed (byte* ptr = Value) + return FastStruct.ArrayToStructure(ref ptr[0]); + } + } + + public byte[] GetBytes(int bitSize) + { + byte[] data = new byte[NextPow2((int)(bitSize + 7) / 8)]; + unsafe + { + fixed (byte* ptr = Value) + { + for (var i = 0; i < data.Length; ++i) + data[i] = ptr[i]; + } + } + + return data; + } + + private int NextPow2(int v) + { + v--; + v |= v >> 1; + v |= v >> 2; + v |= v >> 4; + v |= v >> 8; + v |= v >> 16; + v++; + return Math.Max(v, 1); + } + } +} diff --git a/Source/Game/DataStorage/ClientReader/CliDBReader.cs b/Source/Game/DataStorage/ClientReader/CliDBReader.cs deleted file mode 100644 index 811944bd0..000000000 --- a/Source/Game/DataStorage/ClientReader/CliDBReader.cs +++ /dev/null @@ -1,762 +0,0 @@ -/* - * 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.Collections; -using Framework.Constants; -using Framework.Database; -using Framework.Dynamic; -using Framework.GameMath; -using System; -using System.Collections.Generic; -using System.IO; -using System.Reflection; - -namespace Game.DataStorage -{ - public class DB6Reader - { - internal static DB6Storage Read(string fileName, DB6Meta meta, HotfixStatements preparedStatement, HotfixStatements preparedStatementLocale = 0) where T : new() - { - DB6Storage storage = new DB6Storage(); - - if (!File.Exists(CliDB.DataPath + fileName)) - { - Log.outError(LogFilter.ServerLoading, "File {0} not found.", fileName); - return storage; - } - - //First lets load field Info - var fields = typeof(T).GetFields(); - DBClientHelper[] fieldsInfo = new DBClientHelper[fields.Length]; - for (var i = 0; i < fields.Length; ++i) - fieldsInfo[i] = new DBClientHelper(fields[i]); - - using (var fileReader = new BinaryReader(new MemoryStream(File.ReadAllBytes(CliDB.DataPath + fileName)))) - { - _header = ReadHeader(fileReader); - var data = LoadData(fileReader); - - int commonDataFieldIndex = 0; - foreach (var pair in data) - { - var dataReader = new DB6BinaryReader(pair.Value); - var obj = new T(); - - int fieldIndex = 0; - for (var x = 0; x < _header.FieldCount; ++x) - { - int arrayLength = meta.ArraySizes[x]; - if (arrayLength > 1) - { - for (var z = 0; z < arrayLength; ++z) - { - var fieldInfo = fieldsInfo[fieldIndex++]; - if (fieldInfo.IsArray) - { - //Field is Array - Array array = (Array)fieldInfo.Getter(obj); - for (var y = 0; y < array.Length; ++y) - SetArrayValue(array, y, fieldInfo, dataReader, x); - - arrayLength -= array.Length; - } - else - { - //Only Data is Array - if (Type.GetTypeCode(fieldInfo.FieldType) == TypeCode.Object) - { - switch (fieldInfo.FieldType.Name) - { - case "Vector2": - fieldInfo.SetValue(obj, new Vector2(dataReader.ReadSingle(), dataReader.ReadSingle())); - arrayLength -= 2; - break; - case "Vector3": - fieldInfo.SetValue(obj, new Vector3(dataReader.ReadSingle(), dataReader.ReadSingle(), dataReader.ReadSingle())); - arrayLength -= 3; - break; - case "LocalizedString": - LocalizedString locString = new LocalizedString(); - locString[Global.WorldMgr.GetDefaultDbcLocale()] = GetString(dataReader, x); - fieldInfo.SetValue(obj, locString); - arrayLength -= 1; - break; - case "FlagArray128": - FlagArray128 flagArray128 = new FlagArray128(dataReader.GetUInt32(_header.GetFieldBytes(x)), dataReader.GetUInt32(_header.GetFieldBytes(x)), dataReader.GetUInt32(_header.GetFieldBytes(x)), dataReader.GetUInt32(_header.GetFieldBytes(x))); - fieldInfo.SetValue(obj, flagArray128); - arrayLength -= 4; - break; - default: - Log.outError(LogFilter.ServerLoading, "Unknown Array Type {0} in DBClient File", fieldInfo.FieldType.Name, nameof(T)); - break; - } - } - else - SetValue(obj, fieldInfo, dataReader, x); - } - } - } - else - { - var fieldInfo = fieldsInfo[fieldIndex++]; - if (fieldInfo.IsArray) - { - Array array = (Array)fieldInfo.Getter(obj); - for (var y = 0; y < array.Length; ++y) - SetArrayValue(array, y, fieldInfo, dataReader, x + y); - - x += array.Length - 1; - } - else - SetValue(obj, fieldInfo, dataReader, x); - } - } - - commonDataFieldIndex = fieldIndex; - - storage.Add((uint)pair.Key, obj); - } - - //Get DB field Index - uint index = 0; - for (uint i = 0; i < _header.FieldCount && i < _header.IndexField; ++i) - index += meta.ArraySizes[i]; - - ReadCommonData(commonDataFieldIndex, storage, meta, fieldsInfo); - storage.LoadData(index, fieldsInfo, preparedStatement, preparedStatementLocale); - } - - Global.DB2Mgr.AddDB2(_header.TableHash, storage); - CliDB.LoadedFileCount++; - return storage; - } - - static void ReadCommonData(int fieldIndex, DB6Storage storage, DB6Meta meta, DBClientHelper[] helper) where T : new() - { - for (int x = (int)_header.FieldCount; x < _header.TotalFieldCount; ++x) - { - var fieldInfo = helper[fieldIndex++]; - int arrayLength = meta.ArraySizes[x]; - - foreach (var recordId in _commandData[x]) - { - var dataReader = new DB6BinaryReader(recordId.Value); - var record = storage.LookupByKey(recordId.Key); - - if (arrayLength > 1) - { - for (var z = 0; z < arrayLength; ++z) - { - if (fieldInfo.IsArray) - { - //Field is Array - Array array = (Array)fieldInfo.Getter(record); - for (var y = 0; y < array.Length; ++y) - SetArrayValue(array, y, fieldInfo, dataReader, x); - - arrayLength -= array.Length; - } - else - { - //Only Data is Array - if (Type.GetTypeCode(fieldInfo.FieldType) == TypeCode.Object) - { - Log.outError(LogFilter.Server, "We should not have custom classes in common data"); - switch (fieldInfo.FieldType.Name) - { - case "Vector2": - fieldInfo.SetValue(record, new Vector2(dataReader.ReadSingle(), dataReader.ReadSingle())); - arrayLength -= 2; - break; - case "Vector3": - fieldInfo.SetValue(record, new Vector3(dataReader.ReadSingle(), dataReader.ReadSingle(), dataReader.ReadSingle())); - arrayLength -= 3; - break; - case "LocalizedString": - LocalizedString locString = new LocalizedString(); - locString[Global.WorldMgr.GetDefaultDbcLocale()] = GetString(dataReader, x); - fieldInfo.SetValue(record, locString); - arrayLength -= 1; - break; - case "FlagArray128": - FlagArray128 flagArray128 = new FlagArray128(dataReader.ReadUInt32(), dataReader.ReadUInt32(), dataReader.ReadUInt32(), dataReader.ReadUInt32()); - fieldInfo.SetValue(record, flagArray128); - arrayLength -= 4; - break; - default: - Log.outError(LogFilter.ServerLoading, "Unknown Array Type {0} in DBClient File", fieldInfo.FieldType.Name, nameof(T)); - break; - } - } - else - SetValue(record, fieldInfo, dataReader, x); - } - } - } - else - { - if (fieldInfo.IsArray) - { - Array array = (Array)fieldInfo.Getter(record); - for (var y = 0; y < array.Length; ++y) - SetArrayValue(array, y, fieldInfo, dataReader, x + y); - - x += array.Length - 1; - } - else - SetValue(record, fieldInfo, dataReader, x); - } - } - } - } - - static void SetArrayValue(Array array, int arrayIndex, DBClientHelper helper, DB6BinaryReader reader, int field) - { - switch (Type.GetTypeCode(helper.RealType)) - { - case TypeCode.SByte: - helper.SetValue(array, reader.ReadSByte(), arrayIndex); - break; - case TypeCode.Byte: - helper.SetValue(array, reader.ReadByte(), arrayIndex); - break; - case TypeCode.Int16: - helper.SetValue(array, reader.ReadInt16(), arrayIndex); - break; - case TypeCode.UInt16: - helper.SetValue(array, reader.ReadUInt16(), arrayIndex); - break; - case TypeCode.Int32: - helper.SetValue(array, reader.GetInt32(_header.GetFieldBytes(field)), arrayIndex); - break; - case TypeCode.UInt32: - helper.SetValue(array, reader.GetUInt32(_header.GetFieldBytes(field)), arrayIndex); - break; - case TypeCode.Single: - helper.SetValue(array, reader.ReadSingle(), arrayIndex); - break; - case TypeCode.String: - helper.SetValue(array, GetString(reader, field), arrayIndex); - break; - default: - Log.outError(LogFilter.ServerLoading, "Wrong Array Type: {0}", helper.FieldType.Name); - break; - } - } - - static void SetValue(object obj, DBClientHelper helper, DB6BinaryReader reader, int field) - { - switch (Type.GetTypeCode(helper.RealType)) - { - case TypeCode.SByte: - helper.SetValue(obj, reader.ReadSByte()); - break; - case TypeCode.Byte: - helper.SetValue(obj, reader.ReadByte()); - break; - case TypeCode.Int16: - helper.SetValue(obj, reader.ReadInt16()); - break; - case TypeCode.UInt16: - helper.SetValue(obj, reader.ReadUInt16()); - break; - case TypeCode.Int32: - helper.SetValue(obj, reader.GetInt32(_header.GetFieldBytes(field))); - break; - case TypeCode.UInt32: - helper.SetValue(obj, reader.GetUInt32(_header.GetFieldBytes(field))); - break; - case TypeCode.Single: - helper.SetValue(obj, reader.ReadSingle()); - break; - case TypeCode.String: - string str = GetString(reader, field); - helper.SetValue(obj, str); - break; - case TypeCode.Object: - switch (helper.FieldType.Name) - { - case "Vector2": - helper.SetValue(obj, new Vector2(reader.ReadSingle(), reader.ReadSingle())); - break; - case "Vector3": - helper.SetValue(obj, new Vector3(reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle())); - break; - case "LocalizedString": - LocalizedString locString = new LocalizedString(); - locString[Global.WorldMgr.GetDefaultDbcLocale()] = GetString(reader, field); - helper.SetValue(obj, locString); - break; - default: - Log.outError(LogFilter.ServerLoading, "Wrong Array Type: {0}", helper.FieldType.Name); - break; - } - break; - default: - Log.outError(LogFilter.ServerLoading, "Wrong Array Type: {0}", helper.FieldType.Name); - break; - } - } - - static string GetString(DB6BinaryReader reader, int field) - { - if (_stringTable != null) - return _stringTable.LookupByKey(reader.GetUInt32(_header.GetFieldBytes(field))); - - return reader.ReadCString(); - } - - static DB6Header ReadHeader(BinaryReader reader) - { - DB6Header header = new DB6Header(); - header.Signature = reader.ReadStringFromChars(4); - header.RecordCount = reader.ReadUInt32(); - header.FieldCount = reader.ReadUInt32(); - header.RecordSize = reader.ReadUInt32(); - header.StringTableSize = reader.ReadUInt32(); // also offset for sparse table - - header.TableHash = reader.ReadUInt32(); - header.LayoutHash = reader.ReadUInt32(); // 21737: changed from build number to layoutHash - - header.MinId = reader.ReadInt32(); - header.MaxId = reader.ReadInt32(); - header.Locale = reader.ReadInt32(); - header.CopyTableSize = reader.ReadInt32(); - header.Flags = reader.ReadUInt16(); - header.IndexField = reader.ReadUInt16(); - - header.TotalFieldCount = reader.ReadUInt32(); - header.CommonDataSize = reader.ReadUInt32(); - - for (int i = 0; i < header.FieldCount; i++) - { - header.columnMeta.Add(new DB6Header.FieldEntry() { UnusedBits = reader.ReadInt16(), Offset = (short)(reader.ReadInt16() + (header.HasIndexTable() ? 4 : 0)) }); - } - - if (header.HasIndexTable()) - { - header.FieldCount++; - header.columnMeta.Insert(0, new DB6Header.FieldEntry()); - } - - return header; - } - - static Dictionary LoadData(BinaryReader reader) - { - Dictionary Data = new Dictionary(); - _stringTable = null; - - // headerSize - long recordsOffset = 56 + (_header.HasIndexTable() ? _header.FieldCount - 1 : _header.FieldCount) * 4; - long eof = reader.BaseStream.Length; - - long commonDataPos = eof - _header.CommonDataSize; - long copyTablePos = commonDataPos - _header.CopyTableSize; - long indexTablePos = copyTablePos - (_header.HasIndexTable() ? _header.RecordCount * 4 : 0); - long stringTablePos = indexTablePos - (_header.IsSparseTable() ? 0 : _header.StringTableSize); - - // Index table - int[] m_indexes = null; - - if (_header.HasIndexTable()) - { - reader.BaseStream.Position = indexTablePos; - - m_indexes = new int[_header.RecordCount]; - - for (int i = 0; i < _header.RecordCount; i++) - m_indexes[i] = reader.ReadInt32(); - } - - if (_header.IsSparseTable()) - { - // Records table - reader.BaseStream.Position = _header.StringTableSize; - - int ofsTableSize = _header.MaxId - _header.MinId + 1; - - for (int i = 0; i < ofsTableSize; i++) - { - int offset = reader.ReadInt32(); - int length = reader.ReadInt16(); - - if (offset == 0 || length == 0) - continue; - - int id = _header.MinId + i; - - long oldPos = reader.BaseStream.Position; - - reader.BaseStream.Position = offset; - - byte[] recordBytes = reader.ReadBytes(length); - - byte[] newRecordBytes = new byte[recordBytes.Length + 4]; - - Array.Copy(BitConverter.GetBytes(id), newRecordBytes, 4); - Array.Copy(recordBytes, 0, newRecordBytes, 4, recordBytes.Length); - - Data.Add(id, newRecordBytes); - - reader.BaseStream.Position = oldPos; - } - } - else - { - // Records table - reader.BaseStream.Position = recordsOffset; - - for (int i = 0; i < _header.RecordCount; i++) - { - reader.BaseStream.Position = recordsOffset + i * _header.RecordSize; - - byte[] recordBytes = reader.ReadBytes((int)_header.RecordSize); - - if (_header.HasIndexTable()) - { - byte[] newRecordBytes = new byte[_header.RecordSize + 4]; - - Array.Copy(BitConverter.GetBytes(m_indexes[i]), newRecordBytes, 4); - Array.Copy(recordBytes, 0, newRecordBytes, 4, recordBytes.Length); - - Data.Add(m_indexes[i], newRecordBytes); - } - else - { - int numBytes = (32 - _header.columnMeta[_header.IndexField].UnusedBits) >> 3; - int offset = _header.columnMeta[_header.IndexField].Offset; - int id = 0; - - for (int j = 0; j < numBytes; j++) - id |= (recordBytes[offset + j] << (j * 8)); - - Data.Add(id, recordBytes); - } - } - - // Strings table - reader.BaseStream.Position = stringTablePos; - - _stringTable = new Dictionary(); - while (reader.BaseStream.Position != stringTablePos + _header.StringTableSize) - { - int index = (int)(reader.BaseStream.Position - stringTablePos); - _stringTable[index] = reader.ReadCString(); - } - } - - // Copy index table - if (copyTablePos != reader.BaseStream.Length && _header.CopyTableSize != 0) - { - reader.BaseStream.Position = copyTablePos; - - while (reader.BaseStream.Position != reader.BaseStream.Length) - { - int id = reader.ReadInt32(); - int idcopy = reader.ReadInt32(); - - byte[] copyRow = Data[idcopy]; - byte[] newRow = new byte[copyRow.Length]; - - Array.Copy(copyRow, newRow, newRow.Length); - Array.Copy(BitConverter.GetBytes(id), newRow, 4); - - Data.Add(id, newRow); - } - } - - if (_header.CommonDataSize != 0) - { - reader.BaseStream.Position = commonDataPos; - - int fieldsCount = reader.ReadInt32(); - - _commandData = new Dictionary[fieldsCount]; - - for (int i = 0; i < fieldsCount; i++) - { - int count = reader.ReadInt32(); - byte type = reader.ReadByte(); - - _commandData[i] = new Dictionary(); - - for (int j = 0; j < count; j++) - { - int id = reader.ReadInt32(); - - switch (type) - { - case 1: // 2 bytes - _commandData[i].Add(id, reader.ReadBytes(2)); - reader.BaseStream.Position += 2; - break; - case 2: // 1 bytes - _commandData[i].Add(id, reader.ReadBytes(1)); - reader.BaseStream.Position += 3; - break; - case 3: // 4 bytes - case 4: - _commandData[i].Add(id, reader.ReadBytes(4)); - break; - default: - throw new Exception("Invalid data type " + type); - } - } - } - } - - return Data; - } - - static DB6Header _header; - static Dictionary _stringTable; - static Dictionary[] _commandData; - } - - public class GameTableReader - { - internal static GameTable Read(string fileName) where T : new() - { - GameTable storage = new GameTable(); - - if (!File.Exists(CliDB.DataPath + fileName)) - { - Log.outError(LogFilter.ServerLoading, "File {0} not found.", fileName); - return storage; - } - using (var reader = new StreamReader(CliDB.DataPath + fileName)) - { - string headers = reader.ReadLine(); - if (headers.IsEmpty()) - { - Log.outError(LogFilter.ServerLoading, "GameTable file {0} is empty.", fileName); - return storage; - } - - var columnDefs = new StringArray(headers, '\t'); - - List data = new List(); - data.Add(new T()); // row id 0, unused - - string line; - while (!(line = reader.ReadLine()).IsEmpty()) - { - var values = new StringArray(line, '\t'); - if (values.Length == 0) - break; - - var obj = new T(); - var fields = obj.GetType().GetFields(); - for (int fieldIndex = 0, valueIndex = 1; fieldIndex < fields.Length && valueIndex < values.Length; ++fieldIndex, ++valueIndex) - { - var field = fields[fieldIndex]; - if (field.FieldType.IsArray) - { - Array array = (Array)field.GetValue(obj); - for (var i = 0; i < array.Length; ++i) - array.SetValue(float.Parse(values[valueIndex++]), i); - } - else - fields[fieldIndex].SetValue(obj, float.Parse(values[valueIndex])); - } - - data.Add(obj); - } - - storage.SetData(data); - } - - CliDB.LoadedFileCount++; - return storage; - } - } - - public struct DBClientHelper - { - public DBClientHelper(FieldInfo fieldInfo) - { - IsArray = false; - FieldType = RealType = fieldInfo.FieldType; - - if (fieldInfo.FieldType.IsArray) - { - FieldType = RealType = fieldInfo.FieldType.GetElementType(); - IsArray = true; - } - - IsEnum = FieldType.IsEnum; - if (IsEnum) - { - IsEnum = FieldType.IsEnum; - RealType = FieldType.GetEnumUnderlyingType(); - } - - Setter = fieldInfo.CompileSetter(); - Getter = fieldInfo.CompileGetter(); - } - - public void SetValue(Array array, object value, int arrayIndex) - { - if (!IsEnum) - array.SetValue(Convert.ChangeType(value, FieldType), arrayIndex % array.Length); - else - array.SetValue(Enum.ToObject(FieldType, value), arrayIndex % array.Length); - } - - public void SetValue(object obj, object value) - { - if (!IsEnum) - Setter(obj, Convert.ChangeType(value, FieldType)); - else - Setter(obj, Enum.ToObject(FieldType, value)); - } - - public Type FieldType; - public Type RealType; - public bool IsArray; - bool IsEnum; - Action Setter; - public Func Getter; - } - - class DB6Header - { - public bool IsValidDB6File() - { - return Signature == "WDB6"; - } - - public bool IsSparseTable() - { - return Convert.ToBoolean(Flags & 0x1); - } - - public bool HasIndexTable() - { - return Convert.ToBoolean(Flags & 0x4); - } - - public int GetFieldBytes(int field) - { - if (columnMeta.Count <= field) - return 4; - - return 4 - columnMeta[field].UnusedBits / 8; - } - - public string Signature; - public uint RecordCount; - public uint FieldCount; - public uint RecordSize; - public uint StringTableSize; - - public uint TableHash; - public uint LayoutHash; - public int MinId; - public int MaxId; - public int Locale; - public int CopyTableSize; - public uint Flags; - public int IndexField; - public uint TotalFieldCount; - public uint CommonDataSize; - - public List columnMeta = new List(); - - public struct FieldEntry - { - public short UnusedBits; - public short Offset; - } - } - - class DB6BinaryReader : BinaryReader - { - public DB6BinaryReader(byte[] data) : base(new MemoryStream(data)) { } - - public int GetInt32(int fieldBytes) - { - switch (fieldBytes) - { - case 1: - return ReadSByte(); - case 2: - return ReadInt16(); - case 3: - byte[] bytes = ReadBytes(fieldBytes); - return bytes[0] | (bytes[1] << 8) | (bytes[2] << 16); - default: - return ReadInt32(); - } - } - - public uint GetUInt32(int fieldBytes) - { - switch (fieldBytes) - { - case 1: - return ReadByte(); - case 2: - return ReadUInt16(); - case 3: - byte[] bytes = ReadBytes(fieldBytes); - return bytes[0] | ((uint)bytes[1] << 8) | ((uint)bytes[2] << 16); - default: - return ReadUInt32(); - } - } - - public float GetSingle(int fieldBytes) - { - switch (fieldBytes) - { - case 1: - return ReadByte(); - case 2: - return ReadUInt16(); - case 3: - byte[] bytes = ReadBytes(fieldBytes); - return bytes[0] | ((uint)bytes[1] << 8) | ((uint)bytes[2] << 16); - default: - return ReadSingle(); - } - } - } - - public class LocalizedString - { - public bool HasString(LocaleConstant locale = SharedConst.DefaultLocale) - { - return !string.IsNullOrEmpty(stringStorage[(int)locale]); - } - - public string this[LocaleConstant locale] - { - get - { - return stringStorage[(int)locale] ?? ""; - } - set - { - stringStorage[(int)locale] = value; - } - } - - StringArray stringStorage = new StringArray((int)LocaleConstant.Total); - } -} diff --git a/Source/Game/DataStorage/ClientReader/DB6Meta.cs b/Source/Game/DataStorage/ClientReader/DB6Meta.cs deleted file mode 100644 index f0a3abc6c..000000000 --- a/Source/Game/DataStorage/ClientReader/DB6Meta.cs +++ /dev/null @@ -1,643 +0,0 @@ -/* - * 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 . - */ - -namespace Game.DataStorage -{ - public struct DB6Meta - { - public DB6Meta(int indexField, byte[] arraySizes) - { - IndexField = indexField; - ArraySizes = arraySizes; - } - - int IndexField; - public byte[] ArraySizes; - } - - public struct DB6Metas - { - public static DB6Meta AchievementMeta = new DB6Meta(12, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta AchievementCategoryMeta = new DB6Meta(3, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta AdventureJournalMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1 }); - public static DB6Meta AdventureMapPOIMeta = new DB6Meta(-1, new byte[] { 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta AnimKitMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta AnimKitBoneSetMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta AnimKitBoneSetAliasMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta AnimKitConfigMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta AnimKitConfigBoneSetMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta AnimKitPriorityMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta AnimKitReplacementMeta = new DB6Meta(4, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta AnimKitSegmentMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta AnimReplacementMeta = new DB6Meta(4, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta AnimReplacementSetMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta AnimationDataMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta AreaGroupMemberMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta AreaPOIMeta = new DB6Meta(-1, new byte[] { 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta AreaPOIStateMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta AreaTableMeta = new DB6Meta(-1, new byte[] { 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta AreaTriggerMeta = new DB6Meta(14, new byte[] { 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta AreaTriggerActionSetMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta AreaTriggerBoxMeta = new DB6Meta(-1, new byte[] { 1, 3 }); - public static DB6Meta AreaTriggerCylinderMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta AreaTriggerSphereMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta ArmorLocationMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta ArtifactMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta ArtifactAppearanceMeta = new DB6Meta(11, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta ArtifactAppearanceSetMeta = new DB6Meta(8, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta ArtifactCategoryMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta ArtifactPowerMeta = new DB6Meta(5, new byte[] { 2, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta ArtifactPowerLinkMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta ArtifactPowerPickerMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta ArtifactPowerRankMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta ArtifactQuestXPMeta = new DB6Meta(-1, new byte[] { 1, 10 }); - public static DB6Meta ArtifactTierMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta ArtifactUnlockMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta AuctionHouseMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta BankBagSlotPricesMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta BannedAddonsMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta BarberShopStyleMeta = new DB6Meta(7, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta BattlePetAbilityMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta BattlePetAbilityEffectMeta = new DB6Meta(6, new byte[] { 1, 1, 1, 1, 6, 1, 1 }); - public static DB6Meta BattlePetAbilityStateMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta BattlePetAbilityTurnMeta = new DB6Meta(5, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta BattlePetBreedQualityMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta BattlePetBreedStateMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta BattlePetEffectPropertiesMeta = new DB6Meta(-1, new byte[] { 1, 6, 1, 6 }); - public static DB6Meta BattlePetNPCTeamMemberMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta BattlePetSpeciesMeta = new DB6Meta(8, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta BattlePetSpeciesStateMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta BattlePetSpeciesXAbilityMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta BattlePetStateMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta BattlePetVisualMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta BattlemasterListMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 16, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta BeamEffectMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta BoneWindModifierModelMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta BoneWindModifiersMeta = new DB6Meta(-1, new byte[] { 1, 3, 1 }); - public static DB6Meta BountyMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta BountySetMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta BroadcastTextMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 3, 3, 1, 1, 1, 2, 1 }); - public static DB6Meta CameraEffectMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta CameraEffectEntryMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta CameraModeMeta = new DB6Meta(-1, new byte[] { 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta CameraShakesMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta CastableRaidBuffsMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta CelestialBodyMeta = new DB6Meta(14, new byte[] { 1, 1, 2, 1, 1, 2, 2, 2, 1, 2, 1, 3, 1, 1, 1 }); - public static DB6Meta Cfg_CategoriesMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta Cfg_ConfigsMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta Cfg_RegionsMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta CharBaseInfoMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta CharBaseSectionMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta CharComponentTextureLayoutsMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta CharComponentTextureSectionsMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta CharHairGeosetsMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta CharSectionsMeta = new DB6Meta(-1, new byte[] { 1, 3, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta CharShipmentMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta CharShipmentContainerMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta CharStartOutfitMeta = new DB6Meta(-1, new byte[] { 1, 24, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta CharTitlesMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta CharacterFaceBoneSetMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta CharacterFacialHairStylesMeta = new DB6Meta(-1, new byte[] { 1, 5, 1, 1, 1 }); - public static DB6Meta CharacterLoadoutMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta CharacterLoadoutItemMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta ChatChannelsMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta ChatProfanityMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta ChrClassRaceSexMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta ChrClassTitleMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta ChrClassUIDisplayMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta ChrClassVillainMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta ChrClassesMeta = new DB6Meta(18, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta ChrClassesXPowerTypesMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta ChrRacesMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3 }); - public static DB6Meta ChrSpecializationMeta = new DB6Meta(9, new byte[] { 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta ChrUpgradeBucketMeta = new DB6Meta(2, new byte[] { 1, 1, 1 }); - public static DB6Meta ChrUpgradeBucketSpellMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta ChrUpgradeTierMeta = new DB6Meta(3, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta CinematicCameraMeta = new DB6Meta(-1, new byte[] { 1, 1, 3, 1, 1 }); - public static DB6Meta CinematicSequencesMeta = new DB6Meta(-1, new byte[] { 1, 1, 8 }); - public static DB6Meta CloakDampeningMeta = new DB6Meta(-1, new byte[] { 1, 5, 5, 2, 2, 1, 1, 1 }); - public static DB6Meta CombatConditionMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 2, 2, 2, 2, 1, 2, 2, 1 }); - public static DB6Meta CommentatorStartLocationMeta = new DB6Meta(-1, new byte[] { 1, 3, 1 }); - public static DB6Meta CommentatorTrackedCooldownMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta ComponentModelFileDataMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta ComponentTextureFileDataMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta ConfigurationWarningMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta ContributionMeta = new DB6Meta(0, new byte[] { 1, 1, 1, 1, 4, 1 }); - public static DB6Meta ConversationLineMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta CreatureMeta = new DB6Meta(-1, new byte[] { 1, 3, 1, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta CreatureDifficultyMeta = new DB6Meta(-1, new byte[] { 1, 1, 7, 1, 1, 1, 1 }); - public static DB6Meta CreatureDispXUiCameraMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta CreatureDisplayInfoMeta = new DB6Meta(0, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta CreatureDisplayInfoCondMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3 }); - public static DB6Meta CreatureDisplayInfoEvtMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta CreatureDisplayInfoExtraMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1 }); - public static DB6Meta CreatureDisplayInfoTrnMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta CreatureFamilyMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 2, 1, 1, 1, 1 }); - public static DB6Meta CreatureImmunitiesMeta = new DB6Meta(-1, new byte[] { 1, 2, 1, 1, 1, 1, 1, 1, 8, 16 }); - public static DB6Meta CreatureModelDataMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta CreatureMovementInfoMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta CreatureSoundDataMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta CreatureTypeMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta CreatureXContributionMeta = new DB6Meta(0, new byte[] { 1, 1, 1 }); - public static DB6Meta CriteriaMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta CriteriaTreeMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta CriteriaTreeXEffectMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta CurrencyCategoryMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta CurrencyTypesMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta CurveMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta CurvePointMeta = new DB6Meta(-1, new byte[] { 1, 2, 1, 1 }); - public static DB6Meta DeathThudLookupsMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta DecalPropertiesMeta = new DB6Meta(0, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta DeclinedWordMeta = new DB6Meta(1, new byte[] { 1, 1 }); - public static DB6Meta DeclinedWordCasesMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta DestructibleModelDataMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta DeviceBlacklistMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta DeviceDefaultSettingsMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta DifficultyMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta DissolveEffectMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta DriverBlacklistMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta DungeonEncounterMeta = new DB6Meta(6, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta DungeonMapMeta = new DB6Meta(7, new byte[] { 2, 2, 1, 1, 1, 1, 1 }); - public static DB6Meta DungeonMapChunkMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta DurabilityCostsMeta = new DB6Meta(-1, new byte[] { 1, 21, 8 }); - public static DB6Meta DurabilityQualityMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta EdgeGlowEffectMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta EmotesMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta EmotesTextMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta EmotesTextDataMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta EmotesTextSoundMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta EnvironmentalDamageMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta ExhaustionMeta = new DB6Meta(7, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta FactionMeta = new DB6Meta(0, new byte[] { 1, 4, 4, 2, 1, 1, 4, 1, 4, 4, 1, 1, 2, 1, 1, 1 }); - public static DB6Meta FactionGroupMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta FactionTemplateMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 4, 4, 1, 1, 1 }); - public static DB6Meta FootprintTexturesMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta FootstepTerrainLookupMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta FriendshipRepReactionMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta FriendshipReputationMeta = new DB6Meta(3, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta FullScreenEffectMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta GMSurveyAnswersMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta GMSurveyCurrentSurveyMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta GMSurveyQuestionsMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta GMSurveySurveysMeta = new DB6Meta(-1, new byte[] { 1, 15 }); - public static DB6Meta GameObjectArtKitMeta = new DB6Meta(-1, new byte[] { 1, 3, 1 }); - public static DB6Meta GameObjectDiffAnimMapMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta GameObjectDisplayInfoMeta = new DB6Meta(-1, new byte[] { 1, 1, 6, 1, 1, 1 }); - public static DB6Meta GameObjectDisplayInfoXSoundKitMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta GameObjectsMeta = new DB6Meta(11, new byte[] { 3, 4, 1, 8, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta GameTipsMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta GarrAbilityMeta = new DB6Meta(7, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta GarrAbilityCategoryMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta GarrAbilityEffectMeta = new DB6Meta(11, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta GarrBuildingMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta GarrBuildingDoodadSetMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta GarrBuildingPlotInstMeta = new DB6Meta(4, new byte[] { 2, 1, 1, 1, 1 }); - public static DB6Meta GarrClassSpecMeta = new DB6Meta(7, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta GarrClassSpecPlayerCondMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta GarrEncounterMeta = new DB6Meta(5, new byte[] { 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta GarrEncounterSetXEncounterMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta GarrEncounterXMechanicMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta GarrFollItemSetMemberMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta GarrFollSupportSpellMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta GarrFollowerMeta = new DB6Meta(31, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta GarrFollowerLevelXPMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta GarrFollowerQualityMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta GarrFollowerSetXFollowerMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta GarrFollowerTypeMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta GarrFollowerUICreatureMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta GarrFollowerXAbilityMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta GarrItemLevelUpgradeDataMeta = new DB6Meta(0, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta GarrMechanicMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta GarrMechanicSetXMechanicMeta = new DB6Meta(1, new byte[] { 1, 1, 1 }); - public static DB6Meta GarrMechanicTypeMeta = new DB6Meta(4, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta GarrMissionMeta = new DB6Meta(19, new byte[] { 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta GarrMissionTextureMeta = new DB6Meta(-1, new byte[] { 1, 2, 1 }); - public static DB6Meta GarrMissionTypeMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta GarrMissionXEncounterMeta = new DB6Meta(1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta GarrMissionXFollowerMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta GarrMssnBonusAbilityMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta GarrPlotMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 2 }); - public static DB6Meta GarrPlotBuildingMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta GarrPlotInstanceMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta GarrPlotUICategoryMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta GarrSiteLevelMeta = new DB6Meta(-1, new byte[] { 1, 2, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta GarrSiteLevelPlotInstMeta = new DB6Meta(-1, new byte[] { 1, 2, 1, 1, 1 }); - public static DB6Meta GarrSpecializationMeta = new DB6Meta(-1, new byte[] { 1, 1, 2, 1, 1, 1, 1, 1 }); - public static DB6Meta GarrStringMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta GarrTalentMeta = new DB6Meta(7, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta GarrTalentTreeMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta GarrTypeMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 2 }); - public static DB6Meta GarrUiAnimClassInfoMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta GarrUiAnimRaceInfoMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta GemPropertiesMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta GlobalStringsMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta GlyphBindableSpellMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta GlyphExclusiveCategoryMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta GlyphPropertiesMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta GlyphRequiredSpecMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta GroundEffectDoodadMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta GroundEffectTextureMeta = new DB6Meta(-1, new byte[] { 1, 4, 4, 1, 1 }); - public static DB6Meta GroupFinderActivityMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta GroupFinderActivityGrpMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta GroupFinderCategoryMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta GuildColorBackgroundMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta GuildColorBorderMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta GuildColorEmblemMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta GuildPerkSpellsMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta HeirloomMeta = new DB6Meta(9, new byte[] { 1, 1, 1, 1, 1, 3, 3, 1, 1, 1 }); - public static DB6Meta HelmetAnimScalingMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta HelmetGeosetVisDataMeta = new DB6Meta(-1, new byte[] { 1, 9 }); - public static DB6Meta HighlightColorMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta HolidayDescriptionsMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta HolidayNamesMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta HolidaysMeta = new DB6Meta(-1, new byte[] { 1, 16, 10, 1, 1, 10, 1, 1, 1, 1, 1, 3 }); - public static DB6Meta HotfixMeta = new DB6Meta(0, new byte[] { 1, 1, 1 }); - public static DB6Meta ImportPriceArmorMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta ImportPriceQualityMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta ImportPriceShieldMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta ImportPriceWeaponMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta InvasionClientDataMeta = new DB6Meta(2, new byte[] { 1, 2, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta ItemMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta ItemAppearanceMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta ItemAppearanceXUiCameraMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta ItemArmorQualityMeta = new DB6Meta(-1, new byte[] { 1, 7, 1 }); - public static DB6Meta ItemArmorShieldMeta = new DB6Meta(-1, new byte[] { 1, 7, 1 }); - public static DB6Meta ItemArmorTotalMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta ItemBagFamilyMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta ItemBonusMeta = new DB6Meta(-1, new byte[] { 1, 2, 1, 1, 1 }); - public static DB6Meta ItemBonusListLevelDeltaMeta = new DB6Meta(1, new byte[] { 1, 1 }); - public static DB6Meta ItemBonusTreeNodeMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta ItemChildEquipmentMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta ItemClassMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta ItemContextPickerEntryMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta ItemCurrencyCostMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta ItemDamageAmmoMeta = new DB6Meta(-1, new byte[] { 1, 7, 1 }); - public static DB6Meta ItemDamageOneHandMeta = new DB6Meta(-1, new byte[] { 1, 7, 1 }); - public static DB6Meta ItemDamageOneHandCasterMeta = new DB6Meta(-1, new byte[] { 1, 7, 1 }); - public static DB6Meta ItemDamageTwoHandMeta = new DB6Meta(-1, new byte[] { 1, 7, 1 }); - public static DB6Meta ItemDamageTwoHandCasterMeta = new DB6Meta(-1, new byte[] { 1, 7, 1 }); - public static DB6Meta ItemDisenchantLootMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta ItemDisplayInfoMeta = new DB6Meta(-1, new byte[] { 1, 2, 2, 4, 4, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta ItemDisplayInfoMaterialResMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta ItemDisplayXUiCameraMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta ItemEffectMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta ItemExtendedCostMeta = new DB6Meta(-1, new byte[] { 1, 5, 5, 5, 1, 5, 1, 1, 1, 1, 1 }); - public static DB6Meta ItemGroupSoundsMeta = new DB6Meta(-1, new byte[] { 1, 4 }); - public static DB6Meta ItemLevelSelectorMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta ItemLevelSelectorQualityMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta ItemLevelSelectorQualitySetMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta ItemLimitCategoryMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta ItemLimitCategoryConditionMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta ItemModifiedAppearanceMeta = new DB6Meta(5, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta ItemModifiedAppearanceExtraMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta ItemNameDescriptionMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta ItemPetFoodMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta ItemPriceBaseMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta ItemRandomPropertiesMeta = new DB6Meta(-1, new byte[] { 1, 1, 5 }); - public static DB6Meta ItemRandomSuffixMeta = new DB6Meta(-1, new byte[] { 1, 1, 5, 5 }); - public static DB6Meta ItemRangedDisplayInfoMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta ItemSearchNameMeta = new DB6Meta(0, new byte[] { 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta ItemSetMeta = new DB6Meta(-1, new byte[] { 1, 1, 17, 1, 1, 1 }); - public static DB6Meta ItemSetSpellMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta ItemSparseMeta = new DB6Meta(-1, new byte[] { 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1 }); - public static DB6Meta ItemSpecMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta ItemSpecOverrideMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta ItemSubClassMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta ItemSubClassMaskMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta ItemUpgradeMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta ItemVisualsMeta = new DB6Meta(-1, new byte[] { 1, 5 }); - public static DB6Meta ItemXBonusTreeMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta JournalEncounterMeta = new DB6Meta(-1, new byte[] { 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta JournalEncounterCreatureMeta = new DB6Meta(6, new byte[] { 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta JournalEncounterItemMeta = new DB6Meta(5, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta JournalEncounterSectionMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta JournalEncounterXDifficultyMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta JournalEncounterXMapLocMeta = new DB6Meta(-1, new byte[] { 1, 2, 1, 1, 1, 1, 1 }); - public static DB6Meta JournalInstanceMeta = new DB6Meta(10, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta JournalItemXDifficultyMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta JournalSectionXDifficultyMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta JournalTierMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta JournalTierXInstanceMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta KeychainMeta = new DB6Meta(-1, new byte[] { 1, 32 }); - public static DB6Meta KeystoneAffixMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta LanguageWordsMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta LanguagesMeta = new DB6Meta(1, new byte[] { 1, 1 }); - public static DB6Meta LfgDungeonExpansionMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta LfgDungeonGroupMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta LFGDungeonsMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta LfgDungeonsGroupingMapMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta LfgRoleRequirementMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta LightMeta = new DB6Meta(-1, new byte[] { 1, 3, 1, 1, 1, 8 }); - public static DB6Meta LightDataMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta LightParamsMeta = new DB6Meta(10, new byte[] { 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1 }); - public static DB6Meta LightSkyboxMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta LiquidMaterialMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta LiquidObjectMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta LiquidTypeMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 6, 2, 18, 4, 1, 1, 1, 1, 1, 1, 6, 1 }); - public static DB6Meta LoadingScreenTaxiSplinesMeta = new DB6Meta(-1, new byte[] { 1, 10, 10, 1, 1, 1 }); - public static DB6Meta LoadingScreensMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta LocaleMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta LocationMeta = new DB6Meta(-1, new byte[] { 1, 3, 3 }); - public static DB6Meta LockMeta = new DB6Meta(-1, new byte[] { 1, 8, 8, 8, 8 }); - public static DB6Meta LockTypeMeta = new DB6Meta(4, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta LookAtControllerMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta MailTemplateMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta ManagedWorldStateMeta = new DB6Meta(9, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta ManagedWorldStateBuffMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta ManagedWorldStateInputMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta ManifestInterfaceActionIconMeta = new DB6Meta(0, new byte[] { 1 }); - public static DB6Meta ManifestInterfaceDataMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta ManifestInterfaceItemIconMeta = new DB6Meta(0, new byte[] { 1 }); - public static DB6Meta ManifestInterfaceTOCDataMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta ManifestMP3Meta = new DB6Meta(0, new byte[] { 1 }); - public static DB6Meta MapMeta = new DB6Meta(-1, new byte[] { 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta MapCelestialBodyMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta MapChallengeModeMeta = new DB6Meta(0, new byte[] { 1, 1, 1, 3, 1 }); - public static DB6Meta MapDifficultyMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta MapDifficultyXConditionMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta MapLoadingScreenMeta = new DB6Meta(-1, new byte[] { 1, 2, 2, 1, 1, 1 }); - public static DB6Meta MarketingPromotionsXLocaleMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta MaterialMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta MinorTalentMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta MissileTargetingMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2 }); - public static DB6Meta ModelAnimCloakDampeningMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta ModelFileDataMeta = new DB6Meta(1, new byte[] { 1, 1, 1 }); - public static DB6Meta ModelRibbonQualityMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta ModifierTreeMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta MountMeta = new DB6Meta(8, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta MountCapabilityMeta = new DB6Meta(6, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta MountTypeXCapabilityMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta MountXDisplayMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta MovieMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta MovieFileDataMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta MovieVariationMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta NPCModelItemSlotDisplayInfoMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta NPCSoundsMeta = new DB6Meta(-1, new byte[] { 1, 4 }); - public static DB6Meta NameGenMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta NamesProfanityMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta NamesReservedMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta NamesReservedLocaleMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta ObjectEffectMeta = new DB6Meta(-1, new byte[] { 1, 3, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta ObjectEffectGroupMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta ObjectEffectModifierMeta = new DB6Meta(-1, new byte[] { 1, 4, 1, 1, 1 }); - public static DB6Meta ObjectEffectPackageMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta ObjectEffectPackageElemMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta OutlineEffectMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta OverrideSpellDataMeta = new DB6Meta(-1, new byte[] { 1, 10, 1, 1 }); - public static DB6Meta PageTextMaterialMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta PaperDollItemFrameMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta ParagonReputationMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta ParticleColorMeta = new DB6Meta(-1, new byte[] { 1, 3, 3, 3 }); - public static DB6Meta PathMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta PathNodeMeta = new DB6Meta(0, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta PathNodePropertyMeta = new DB6Meta(3, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta PathPropertyMeta = new DB6Meta(3, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta PhaseMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta PhaseShiftZoneSoundsMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta PhaseXPhaseGroupMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta PlayerConditionMeta = new DB6Meta(0, new byte[] { 1, 1, 2, 4, 1, 4, 4, 4, 4, 4, 4, 2, 4, 4, 1, 3, 4, 4, 4, 4, 1, 3, 4, 4, 4, 4, 4, 6, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta PositionerMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta PositionerStateMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta PositionerStateEntryMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta PowerDisplayMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta PowerTypeMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta PrestigeLevelInfoMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta PvpBracketTypesMeta = new DB6Meta(-1, new byte[] { 1, 1, 4 }); - public static DB6Meta PvpDifficultyMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta PvpItemMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta PvpRewardMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta PvpScalingEffectMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta PvpScalingEffectTypeMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta PvpTalentMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta PvpTalentUnlockMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta QuestFactionRewardMeta = new DB6Meta(-1, new byte[] { 1, 10 }); - public static DB6Meta QuestFeedbackEffectMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta QuestInfoMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta QuestLineMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta QuestLineXQuestMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta QuestMoneyRewardMeta = new DB6Meta(-1, new byte[] { 1, 10 }); - public static DB6Meta QuestObjectiveMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta QuestPOIBlobMeta = new DB6Meta(0, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta QuestPOIPointMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta QuestPOIPointCliTaskMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta QuestPackageItemMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta QuestSortMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta QuestV2Meta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta QuestV2CliTaskMeta = new DB6Meta(20, new byte[] { 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta QuestXGroupActivityMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta QuestXPMeta = new DB6Meta(-1, new byte[] { 1, 10 }); - public static DB6Meta RandPropPointsMeta = new DB6Meta(-1, new byte[] { 1, 5, 5, 5 }); - public static DB6Meta RelicSlotTierRequirementMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta RelicTalentMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta ResearchBranchMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta ResearchFieldMeta = new DB6Meta(2, new byte[] { 1, 1, 1 }); - public static DB6Meta ResearchProjectMeta = new DB6Meta(7, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta ResearchSiteMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta ResistancesMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta RewardPackMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta RewardPackXCurrencyTypeMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta RewardPackXItemMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta RibbonQualityMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta RulesetItemUpgradeMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta ScalingStatDistributionMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta ScenarioMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta ScenarioEventEntryMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta ScenarioStepMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SceneScriptMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta SceneScriptPackageMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta SceneScriptPackageMemberMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta ScheduledIntervalMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta ScheduledWorldStateMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta ScheduledWorldStateGroupMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta ScheduledWorldStateXUniqCatMeta = new DB6Meta(0, new byte[] { 1, 1, 1 }); - public static DB6Meta ScreenEffectMeta = new DB6Meta(-1, new byte[] { 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta ScreenLocationMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta SeamlessSiteMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta ServerMessagesMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta ShadowyEffectMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SkillLineMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SkillLineAbilityMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SkillRaceClassInfoMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SoundAmbienceMeta = new DB6Meta(-1, new byte[] { 1, 1, 2, 1, 1 }); - public static DB6Meta SoundAmbienceFlavorMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta SoundBusMeta = new DB6Meta(7, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SoundBusOverrideMeta = new DB6Meta(0, new byte[] { 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SoundEmitterPillPointsMeta = new DB6Meta(-1, new byte[] { 1, 3, 1 }); - public static DB6Meta SoundEmittersMeta = new DB6Meta(9, new byte[] { 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SoundEnvelopeMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SoundFilterMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta SoundFilterElemMeta = new DB6Meta(-1, new byte[] { 1, 9, 1, 1 }); - public static DB6Meta SoundKitMeta = new DB6Meta(0, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SoundKitAdvancedMeta = new DB6Meta(0, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SoundKitChildMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta SoundKitEntryMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta SoundKitFallbackMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta SoundKitNameMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta SoundOverrideMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta SoundProviderPreferencesMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SourceInfoMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta SpamMessagesMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta SpecializationSpellsMeta = new DB6Meta(5, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SpellMeta = new DB6Meta(5, new byte[] { 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SpellActionBarPrefMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta SpellActivationOverlayMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 4, 1, 1, 1 }); - public static DB6Meta SpellAuraOptionsMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SpellAuraRestrictionsMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SpellAuraVisXChrSpecMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta SpellAuraVisibilityMeta = new DB6Meta(3, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta SpellCastTimesMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta SpellCastingRequirementsMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SpellCategoriesMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SpellCategoryMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SpellChainEffectsMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3 }); - public static DB6Meta SpellClassOptionsMeta = new DB6Meta(-1, new byte[] { 1, 1, 4, 1, 1 }); - public static DB6Meta SpellCooldownsMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SpellDescriptionVariablesMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta SpellDispelTypeMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta SpellDurationMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta SpellEffectMeta = new DB6Meta(1, new byte[] { 4, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SpellEffectEmissionMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta SpellEffectGroupSizeMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta SpellEffectScalingMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta SpellEquippedItemsMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta SpellFlyoutMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SpellFlyoutItemMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta SpellFocusObjectMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta SpellInterruptsMeta = new DB6Meta(-1, new byte[] { 1, 1, 2, 2, 1, 1 }); - public static DB6Meta SpellItemEnchantmentMeta = new DB6Meta(-1, new byte[] { 1, 3, 1, 3, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SpellItemEnchantmentConditionMeta = new DB6Meta(-1, new byte[] { 1, 5, 5, 5, 5, 5, 5 }); - public static DB6Meta SpellKeyboundOverrideMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta SpellLabelMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta SpellLearnSpellMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta SpellLevelsMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SpellMechanicMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta SpellMiscMeta = new DB6Meta(-1, new byte[] { 1, 14, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SpellMiscDifficultyMeta = new DB6Meta(2, new byte[] { 1, 1, 1 }); - public static DB6Meta SpellMissileMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SpellMissileMotionMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta SpellPowerMeta = new DB6Meta(8, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SpellPowerDifficultyMeta = new DB6Meta(2, new byte[] { 1, 1, 1 }); - public static DB6Meta SpellProceduralEffectMeta = new DB6Meta(2, new byte[] { 4, 1, 1 }); - public static DB6Meta SpellProcsPerMinuteMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta SpellProcsPerMinuteModMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta SpellRadiusMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta SpellRangeMeta = new DB6Meta(-1, new byte[] { 1, 2, 2, 1, 1, 1 }); - public static DB6Meta SpellReagentsMeta = new DB6Meta(-1, new byte[] { 1, 1, 8, 8 }); - public static DB6Meta SpellReagentsCurrencyMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta SpellScalingMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SpellShapeshiftMeta = new DB6Meta(-1, new byte[] { 1, 1, 2, 2, 1 }); - public static DB6Meta SpellShapeshiftFormMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 8 }); - public static DB6Meta SpellSpecialUnitEffectMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta SpellTargetRestrictionsMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SpellTotemsMeta = new DB6Meta(-1, new byte[] { 1, 1, 2, 2 }); - public static DB6Meta SpellVisualMeta = new DB6Meta(4, new byte[] { 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SpellVisualAnimMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta SpellVisualColorEffectMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SpellVisualEffectNameMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SpellVisualEventMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SpellVisualKitMeta = new DB6Meta(0, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SpellVisualKitAreaModelMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SpellVisualKitEffectMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta SpellVisualKitModelAttachMeta = new DB6Meta(6, new byte[] { 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SpellVisualMissileMeta = new DB6Meta(13, new byte[] { 1, 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta SpellXSpellVisualMeta = new DB6Meta(2, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta StartupFilesMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta Startup_StringsMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta StationeryMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 2 }); - public static DB6Meta SummonPropertiesMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta TactKeyMeta = new DB6Meta(-1, new byte[] { 1, 16 }); - public static DB6Meta TactKeyLookupMeta = new DB6Meta(-1, new byte[] { 1, 8 }); - public static DB6Meta TalentMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 2, 1 }); - public static DB6Meta TaxiNodesMeta = new DB6Meta(-1, new byte[] { 1, 3, 1, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta TaxiPathMeta = new DB6Meta(2, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta TaxiPathNodeMeta = new DB6Meta(8, new byte[] { 3, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta TerrainMaterialMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta TerrainTypeMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta TerrainTypeSoundsMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta TextureBlendSetMeta = new DB6Meta(-1, new byte[] { 1, 3, 3, 3, 3, 3, 4, 1, 1, 1, 1 }); - public static DB6Meta TextureFileDataMeta = new DB6Meta(2, new byte[] { 1, 1 }); - public static DB6Meta TotemCategoryMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta ToyMeta = new DB6Meta(4, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta TradeSkillCategoryMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta TradeSkillItemMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta TransformMatrixMeta = new DB6Meta(-1, new byte[] { 1, 3, 1, 1, 1, 1 }); - public static DB6Meta TransmogHolidayMeta = new DB6Meta(0, new byte[] { 1, 1 }); - public static DB6Meta TransmogSetMeta = new DB6Meta(4, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta TransmogSetGroupMeta = new DB6Meta(1, new byte[] { 1, 1 }); - public static DB6Meta TransmogSetItemMeta = new DB6Meta(0, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta TransportAnimationMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 3, 1 }); - public static DB6Meta TransportPhysicsMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta TransportRotationMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 4 }); - public static DB6Meta TrophyMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta UIExpansionDisplayInfoMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta UIExpansionDisplayInfoIconMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta UiCamFbackTransmogChrRaceMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta UiCamFbackTransmogWeaponMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta UiCameraMeta = new DB6Meta(-1, new byte[] { 1, 1, 3, 3, 3, 1, 1, 1, 1, 1 }); - public static DB6Meta UiCameraTypeMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta UiMapPOIMeta = new DB6Meta(6, new byte[] { 1, 3, 1, 1, 1, 1, 1 }); - public static DB6Meta UiModelSceneMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta UiModelSceneActorMeta = new DB6Meta(7, new byte[] { 1, 3, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta UiModelSceneActorDisplayMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta UiModelSceneCameraMeta = new DB6Meta(14, new byte[] { 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta UiTextureAtlasMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta UiTextureAtlasMemberMeta = new DB6Meta(0, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta UiTextureKitMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta UnitBloodMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta UnitBloodLevelsMeta = new DB6Meta(-1, new byte[] { 1, 3 }); - public static DB6Meta UnitConditionMeta = new DB6Meta(-1, new byte[] { 1, 8, 1, 8, 8 }); - public static DB6Meta UnitPowerBarMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 6, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta UnitTestMeta = new DB6Meta(2, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta VehicleMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 1, 3, 1, 1, 1 }); - public static DB6Meta VehicleSeatMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta VehicleUIIndSeatMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta VehicleUIIndicatorMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta VideoHardwareMeta = new DB6Meta(14, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta VignetteMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta VirtualAttachmentMeta = new DB6Meta(-1, new byte[] { 1, 1, 1}); - public static DB6Meta VirtualAttachmentCustomizationMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta VocalUISoundsMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 2 }); - public static DB6Meta WbAccessControlListMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1 }); - public static DB6Meta WbCertWhitelistMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta WeaponImpactSoundsMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 11, 11, 11, 11 }); - public static DB6Meta WeaponSwingSounds2Meta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta WeaponTrailMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 3, 3, 3, 3, 3 }); - public static DB6Meta WeaponTrailModelDefMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta WeaponTrailParamMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta WeatherMeta = new DB6Meta(-1, new byte[] { 1, 2, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta WindSettingsMeta = new DB6Meta(-1, new byte[] { 1, 1, 3, 1, 1, 3, 1, 3, 1, 1, 1 }); - public static DB6Meta WMOAreaTableMeta = new DB6Meta(13, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta WMOMinimapTextureMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1}); - public static DB6Meta WorldBossLockoutMeta = new DB6Meta(-1, new byte[] { 1, 1, 1 }); - public static DB6Meta WorldChunkSoundsMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta WorldEffectMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta WorldElapsedTimerMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta WorldMapAreaMeta = new DB6Meta(15, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta WorldMapContinentMeta = new DB6Meta(-1, new byte[] { 1, 2, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta WorldMapOverlayMeta = new DB6Meta(0, new byte[] { 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta WorldMapTransformsMeta = new DB6Meta(-1, new byte[] { 1, 6, 2, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta WorldSafeLocsMeta = new DB6Meta(-1, new byte[] { 1, 3, 1, 1, 1 }); - public static DB6Meta WorldStateExpressionMeta = new DB6Meta(-1, new byte[] { 1, 1 }); - public static DB6Meta WorldStateUIMeta = new DB6Meta(14, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta WorldStateZoneSoundsMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta World_PVP_AreaMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1, 1, 1, 1 }); - public static DB6Meta ZoneIntroMusicTableMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1, 1 }); - public static DB6Meta ZoneLightMeta = new DB6Meta(-1, new byte[] { 1, 1, 1, 1 }); - public static DB6Meta ZoneLightPointMeta = new DB6Meta(-1, new byte[] { 1, 2, 1, 1 }); - public static DB6Meta ZoneMusicMeta = new DB6Meta(-1, new byte[] { 1, 1, 2, 2, 2 }); - } -} diff --git a/Source/Game/DataStorage/ClientReader/DB6Storage.cs b/Source/Game/DataStorage/ClientReader/DB6Storage.cs index 1d342884f..27537fd4c 100644 --- a/Source/Game/DataStorage/ClientReader/DB6Storage.cs +++ b/Source/Game/DataStorage/ClientReader/DB6Storage.cs @@ -37,14 +37,14 @@ namespace Game.DataStorage [Serializable] public class DB6Storage : Dictionary, IDB2Storage where T : new() { - public void LoadData(uint indexField, DBClientHelper[] helpers, HotfixStatements preparedStatement, HotfixStatements preparedStatementLocale) + public void LoadData(int indexField, DB6FieldInfo[] helpers, HotfixStatements preparedStatement, HotfixStatements preparedStatementLocale) { SQLResult result = DB.Hotfix.Query(DB.Hotfix.GetPreparedStatement(preparedStatement)); if (!result.IsEmpty()) { do { - var idValue = result.Read((int)indexField); + var idValue = result.Read(indexField == -1 ? 0 : indexField); var obj = new T(); int index = 0; @@ -56,7 +56,7 @@ namespace Game.DataStorage Array array = (Array)helper.Getter(obj); for (var i = 0; i < array.Length; ++i) { - switch (Type.GetTypeCode(helper.RealType)) + switch (Type.GetTypeCode(helper.FieldType)) { case TypeCode.SByte: helper.SetValue(array, result.Read(index++), i); @@ -116,7 +116,7 @@ namespace Game.DataStorage } else { - switch (Type.GetTypeCode(helper.RealType)) + switch (Type.GetTypeCode(helper.FieldType)) { case TypeCode.SByte: helper.SetValue(obj, result.Read(index++)); diff --git a/Source/Game/DataStorage/ClientReader/DBReader.cs b/Source/Game/DataStorage/ClientReader/DBReader.cs new file mode 100644 index 000000000..ff2b179ff --- /dev/null +++ b/Source/Game/DataStorage/ClientReader/DBReader.cs @@ -0,0 +1,800 @@ +using Framework.Collections; +using Framework.Constants; +using Framework.Database; +using Framework.Dynamic; +using Framework.GameMath; +using Framework.IO; +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using System.Runtime.InteropServices; +using System.Linq; + +namespace Game.DataStorage +{ + class DBReader + { + public static DB6Storage Read(string fileName, HotfixStatements preparedStatement, HotfixStatements preparedStatementLocale = 0) where T : new() + { + ClearData(); + + DB6Storage storage = new DB6Storage(); + + if (!File.Exists(CliDB.DataPath + fileName)) + { + Log.outError(LogFilter.ServerLoading, "File {0} not found.", fileName); + return storage; + } + + //First lets load field Info + var fields = typeof(T).GetFields(); + DB6FieldInfo[] fieldsInfo = new DB6FieldInfo[fields.Length]; + for (var i = 0; i < fields.Length; ++i) + fieldsInfo[i] = new DB6FieldInfo(fields[i]); + + using (var fileReader = new BinaryReader(new MemoryStream(File.ReadAllBytes(CliDB.DataPath + fileName)))) + { + ReadHeader(fileReader); + + var records = ReadData(fileReader); + foreach (var pair in records) + { + using (MemoryStream ms = new MemoryStream(pair.Value)) + using (BinaryReader dataReader = new BinaryReader(ms, System.Text.Encoding.UTF8)) + { + var obj = new T(); + + int objectFieldIndex = 0; + //First check if index is in data + if (Header.HasIndexTable()) + fieldsInfo[objectFieldIndex++].SetValue(obj, (uint)pair.Key); + + for (var dataFieldIndex = 0; dataFieldIndex < Header.FieldCount; ++dataFieldIndex) + { + int arrayLength = ColumnMeta[dataFieldIndex].ArraySize; + if (arrayLength > 1) + { + for (var arrayIndex = 0; arrayIndex < arrayLength; ++arrayIndex) + { + var fieldInfo = fieldsInfo[objectFieldIndex++]; + if (fieldInfo.IsArray) + { + Array array = (Array)fieldInfo.Getter(obj); + SetArrayValue(obj, array.Length, fieldInfo, dataReader); + + arrayLength -= array.Length; + } + else + { + //Only Data is Array + if (Type.GetTypeCode(fieldInfo.FieldType) == TypeCode.Object) + { + switch (fieldInfo.FieldType.Name) + { + case "Vector2": + fieldInfo.SetValue(obj, dataReader.Read()); + arrayLength -= 2; + break; + case "Vector3": + fieldInfo.SetValue(obj, dataReader.Read()); + arrayLength -= 3; + break; + case "LocalizedString": + LocalizedString locString = new LocalizedString(); + locString[Global.WorldMgr.GetDefaultDbcLocale()] = GetString(dataReader); + fieldInfo.SetValue(obj, locString); + arrayLength -= 1; + break; + case "FlagArray128": + fieldInfo.SetValue(obj, new FlagArray128(dataReader.ReadUInt32(), dataReader.ReadUInt32(), dataReader.ReadUInt32(), dataReader.ReadUInt32())); + arrayLength -= 4; + break; + default: + Log.outError(LogFilter.ServerLoading, "Unknown Array Type {0} in DBClient File", fieldInfo.FieldType.Name, nameof(T)); + break; + } + } + else + SetValue(obj, fieldInfo, dataReader); + } + + dataReader.BaseStream.Position += GetPadding(fieldInfo.FieldType, dataFieldIndex); + } + } + else + { + var fieldInfo = fieldsInfo[objectFieldIndex++]; + if (fieldInfo.IsArray) + { + Array array = (Array)fieldInfo.Getter(obj); + SetArrayValue(obj, array.Length, fieldInfo, dataReader); + + dataFieldIndex += array.Length - 1; + } + else + SetValue(obj, fieldInfo, dataReader); + + dataReader.BaseStream.Position += GetPadding(fieldInfo.FieldType, dataFieldIndex); + } + } + + //Check if there is parent ids and fill them + if (objectFieldIndex < fieldsInfo.Length && Header.LookupColumnCount > 0) + fieldsInfo[objectFieldIndex].SetValue(obj, dataReader.ReadUInt32()); + + storage.Add((uint)pair.Key, obj); + } + } + + storage.LoadData(Header.IdIndex, fieldsInfo, preparedStatement, preparedStatementLocale); + } + + Global.DB2Mgr.AddDB2(Header.TableHash, storage); + CliDB.LoadedFileCount++; + return storage; + } + + static void ClearData() + { + Header = null; + StringTable = null; + FieldStructure = null; + ColumnMeta = null; + RelationShipData = null; + } + + static void ReadHeader(BinaryReader reader) + { + Header = new DB6Header(); + Header.Signature = reader.ReadStringFromChars(4); + Header.RecordCount = reader.ReadUInt32(); + Header.FieldCount = reader.ReadUInt32(); + Header.RecordSize = reader.ReadUInt32(); + Header.StringTableSize = reader.ReadUInt32(); // also offset for sparse table + + Header.TableHash = reader.ReadUInt32(); + Header.LayoutHash = reader.ReadUInt32(); + Header.MinId = reader.ReadInt32(); + Header.MaxId = reader.ReadInt32(); + Header.Locale = reader.ReadInt32(); + Header.CopyTableSize = reader.ReadInt32(); + Header.Flags = (HeaderFlags)reader.ReadUInt16(); + Header.IdIndex = reader.ReadUInt16(); + Header.TotalFieldCount = reader.ReadUInt32(); + + Header.BitpackedDataOffset = reader.ReadUInt32(); + Header.LookupColumnCount = reader.ReadUInt32(); + Header.OffsetTableOffset = reader.ReadUInt32(); + Header.IdListSize = reader.ReadUInt32(); + Header.ColumnMetaSize = reader.ReadUInt32(); + Header.CommonDataSize = reader.ReadUInt32(); + Header.PalletDataSize = reader.ReadUInt32(); + Header.RelationshipDataSize = reader.ReadUInt32(); + + //Gather field structures + FieldStructure = new List(); + for (int i = 0; i < Header.FieldCount; i++) + { + var field = new FieldStructureEntry(reader.ReadInt16(), reader.ReadUInt16()); + FieldStructure.Add(field); + } + } + + static Dictionary ReadData(BinaryReader reader) + { + Dictionary CopyTable = new Dictionary(); + List> offsetmap = new List>(); + Dictionary firstindex = new Dictionary(); + Dictionary OffsetDuplicates = new Dictionary(); + Dictionary> Copies = new Dictionary>(); + + byte[] recordData; + if (Header.HasOffsetTable()) + recordData = reader.ReadBytes((int)(Header.OffsetTableOffset - 84 - 4 * Header.FieldCount)); + else + { + recordData = reader.ReadBytes((int)(Header.RecordCount * Header.RecordSize)); + Array.Resize(ref recordData, recordData.Length + 8); + } + + if (Header.StringTableSize != 0) + { + // string data + StringTable = new Dictionary(); + + for (int i = 0; i < Header.StringTableSize;) + { + long oldPos = reader.BaseStream.Position; + + StringTable[i] = reader.ReadCString(); + + i += (int)(reader.BaseStream.Position - oldPos); + + } + } + + int[] m_indexes = null; + + // OffsetTable + if (Header.HasOffsetTable() && Header.OffsetTableOffset > 0) + { + reader.BaseStream.Position = Header.OffsetTableOffset; + for (int i = 0; i < (Header.MaxId - Header.MinId + 1); i++) + { + int offset = reader.ReadInt32(); + short length = reader.ReadInt16(); + + if (offset == 0 || length == 0) + continue; + + // special case, may contain duplicates in the offset map that we don't want + if (Header.CopyTableSize == 0) + { + if (!firstindex.ContainsKey(offset)) + firstindex.Add(offset, new OffsetDuplicate(offsetmap.Count, firstindex.Count)); + else + OffsetDuplicates.Add(Header.MinId + i, firstindex[offset].VisibleIndex); + } + + offsetmap.Add(new Tuple(offset, length)); + } + } + + // IndexTable + if (Header.HasIndexTable()) + { + m_indexes = new int[Header.RecordCount]; + for (int i = 0; i < Header.RecordCount; i++) + m_indexes[i] = reader.ReadInt32(); + } + + // Copytable + if (Header.CopyTableSize > 0) + { + long end = reader.BaseStream.Position + Header.CopyTableSize; + while (reader.BaseStream.Position < end) + { + int id = reader.ReadInt32(); + int idcopy = reader.ReadInt32(); + + if (!Copies.ContainsKey(idcopy)) + Copies.Add(idcopy, new List()); + + Copies[idcopy].Add(id); + } + + CliDB.Size += (uint)(Copies.Count * Header.RecordSize); + } + + // ColumnMeta + ColumnMeta = new List(); + if (Header.ColumnMetaSize != 0) + { + for (int i = 0; i < Header.FieldCount; i++) + { + var column = new ColumnStructureEntry() + { + RecordOffset = reader.ReadUInt16(), + Size = reader.ReadUInt16(), + AdditionalDataSize = reader.ReadUInt32(), // size of pallet / sparse values + CompressionType = (DB2ColumnCompression)reader.ReadUInt32(), + BitOffset = reader.ReadInt32(), + BitWidth = reader.ReadInt32(), + Cardinality = reader.ReadInt32() + }; + + // preload arraysizes + if (column.CompressionType == DB2ColumnCompression.None) + column.ArraySize = Math.Max(column.Size / FieldStructure[i].BitCount, 1); + else if (column.CompressionType == DB2ColumnCompression.PalletArray) + column.ArraySize = Math.Max(column.Cardinality, 1); + + ColumnMeta.Add(column); + } + } + + // Pallet values + for (int i = 0; i < ColumnMeta.Count; i++) + { + if (ColumnMeta[i].CompressionType == DB2ColumnCompression.Pallet || ColumnMeta[i].CompressionType == DB2ColumnCompression.PalletArray) + { + int elements = (int)ColumnMeta[i].AdditionalDataSize / 4; + int cardinality = Math.Max(ColumnMeta[i].Cardinality, 1); + + ColumnMeta[i].PalletValues = new List(); + for (int j = 0; j < elements / cardinality; j++) + ColumnMeta[i].PalletValues.Add(reader.ReadBytes(cardinality * 4)); + } + } + + // Sparse values + for (int i = 0; i < ColumnMeta.Count; i++) + { + if (ColumnMeta[i].CompressionType == DB2ColumnCompression.CommonData) + { + ColumnMeta[i].SparseValues = new Dictionary(); + for (int j = 0; j < ColumnMeta[i].AdditionalDataSize / 8; j++) + ColumnMeta[i].SparseValues[reader.ReadInt32()] = reader.ReadBytes(4); + } + } + + // Relationships + if (Header.RelationshipDataSize > 0) + { + RelationShipData = new RelationShipData() + { + Records = reader.ReadUInt32(), + MinId = reader.ReadUInt32(), + MaxId = reader.ReadUInt32(), + Entries = new Dictionary() + }; + + for (int i = 0; i < RelationShipData.Records; i++) + { + byte[] foreignKey = reader.ReadBytes(4); + uint index = reader.ReadUInt32(); + // has duplicates just like the copy table does... why? + if (!RelationShipData.Entries.ContainsKey(index)) + RelationShipData.Entries.Add(index, foreignKey); + } + } + + // Record Data + for (int i = 0; i < Header.RecordCount; i++) + { + int id = 0; + + if (Header.HasOffsetTable() && Header.HasIndexTable()) + { + id = m_indexes[CopyTable.Count]; + var map = offsetmap[i]; + + if (Header.CopyTableSize == 0 && firstindex[map.Item1].HiddenIndex != i) // ignore duplicates + continue; + + reader.BaseStream.Position = map.Item1; + + byte[] data = reader.ReadBytes(map.Item2); + + IEnumerable recordbytes = data; + + // append relationship id + if (RelationShipData != null) + { + // seen cases of missing indicies + if (RelationShipData.Entries.TryGetValue((uint)i, out byte[] foreignData)) + recordbytes = recordbytes.Concat(foreignData); + else + recordbytes = recordbytes.Concat(new byte[4]); + } + + CopyTable.Add(id, recordbytes.ToArray()); + + if (Copies.ContainsKey(id)) + { + foreach (int copy in Copies[id]) + CopyTable.Add(copy, data.ToArray()); + } + } + else + { + BitReader bitReader = new BitReader(recordData); + bitReader.Offset = i * (int)Header.RecordSize; + + List data = new List(); + + if (Header.HasIndexTable()) + id = m_indexes[i]; + + for (int f = 0; f < Header.FieldCount; f++) + { + int bitWidth = ColumnMeta[f].BitWidth; + + switch (ColumnMeta[f].CompressionType) + { + case DB2ColumnCompression.None: + int bitSize = FieldStructure[f].BitCount; + if (!Header.HasIndexTable() && f == Header.IdIndex) + { + id = (int)bitReader.ReadUInt32(bitSize);// always read Ids as ints + data.AddRange(BitConverter.GetBytes(id)); + } + else + { + for (int x = 0; x < ColumnMeta[f].ArraySize; x++) + data.AddRange(bitReader.ReadValue64(bitSize).GetBytes(bitSize)); + } + break; + + case DB2ColumnCompression.Immediate: + if (!Header.HasIndexTable() && f == Header.IdIndex) + { + id = (int)bitReader.ReadUInt32(bitWidth);// always read Ids as ints + data.AddRange(BitConverter.GetBytes(id)); + continue; + } + else + { + data.AddRange(bitReader.ReadValue64(bitWidth).GetBytes(bitWidth)); + } + break; + + case DB2ColumnCompression.CommonData: + if (ColumnMeta[f].SparseValues.TryGetValue(id, out byte[] valBytes)) + data.AddRange(valBytes); + else + data.AddRange(BitConverter.GetBytes(ColumnMeta[f].BitOffset)); + break; + + case DB2ColumnCompression.Pallet: + case DB2ColumnCompression.PalletArray: + uint palletIndex = bitReader.ReadUInt32(bitWidth); + data.AddRange(ColumnMeta[f].PalletValues[(int)palletIndex]); + break; + + default: + throw new Exception($"Unknown compression {ColumnMeta[f].CompressionType}"); + } + } + + // append relationship id + if (RelationShipData != null) + { + // seen cases of missing indicies + if (RelationShipData.Entries.TryGetValue((uint)i, out byte[] foreignData)) + data.AddRange(foreignData); + else + data.AddRange(new byte[4]); + } + + CopyTable.Add(id, data.ToArray()); + + if (Copies.ContainsKey(id)) + { + foreach (int copy in Copies[id]) + { + byte[] newrecord = CopyTable[id].ToArray(); + CopyTable.Add(copy, newrecord); + } + } + } + } + + return CopyTable; + } + + static Dictionary bytecounts = new Dictionary() + { + { typeof(byte), 1 }, + { typeof(short), 2 }, + { typeof(ushort), 2 }, + }; + + static int GetPadding(Type type, int fieldIndex) + { + if (!bytecounts.ContainsKey(type)) + return 0; + + if (ColumnMeta[fieldIndex].CompressionType < DB2ColumnCompression.CommonData) + return 0; + + return 4 - bytecounts[type]; + } + + static FieldStructureEntry[] GetBits() + { + List bits = new List(); + for (int i = 0; i < ColumnMeta.Count; i++) + { + short bitcount = (short)(FieldStructure[i].BitCount == 64 ? FieldStructure[i].BitCount : 0); // force bitcounts + bits.Add(new FieldStructureEntry(bitcount, 0)); + } + + return bits.ToArray(); + } + + static void SetArrayValue(object obj, int arraySize, DB6FieldInfo fieldInfo, BinaryReader reader) + { + switch (Type.GetTypeCode(fieldInfo.FieldType)) + { + case TypeCode.SByte: + fieldInfo.SetValue(obj, reader.ReadArray(arraySize)); + break; + case TypeCode.Byte: + fieldInfo.SetValue(obj, reader.ReadArray(arraySize)); + break; + case TypeCode.Int16: + fieldInfo.SetValue(obj, reader.ReadArray(arraySize)); + break; + case TypeCode.UInt16: + fieldInfo.SetValue(obj, reader.ReadArray(arraySize)); + break; + case TypeCode.Int32: + fieldInfo.SetValue(obj, reader.ReadArray(arraySize)); + break; + case TypeCode.UInt32: + fieldInfo.SetValue(obj, reader.ReadArray(arraySize)); + break; + case TypeCode.Int64: + fieldInfo.SetValue(obj, reader.ReadArray(arraySize)); + break; + case TypeCode.UInt64: + fieldInfo.SetValue(obj, reader.ReadArray(arraySize)); + break; + case TypeCode.Single: + fieldInfo.SetValue(obj, reader.ReadArray(arraySize)); + break; + case TypeCode.String: + string[] str = new string[arraySize]; + for (var i = 0; i < arraySize; ++i) + str[i] = GetString(reader); + fieldInfo.SetValue(obj, str); + break; + default: + Log.outError(LogFilter.ServerLoading, "Wrong Array Type: {0}", fieldInfo.FieldType.Name); + break; + } + } + + static void SetValue(object obj, DB6FieldInfo fieldInfo, BinaryReader reader) + { + switch (Type.GetTypeCode(fieldInfo.FieldType)) + { + case TypeCode.SByte: + fieldInfo.SetValue(obj, reader.ReadSByte()); + break; + case TypeCode.Byte: + fieldInfo.SetValue(obj, reader.ReadByte()); + break; + case TypeCode.Int16: + fieldInfo.SetValue(obj, reader.ReadInt16()); + break; + case TypeCode.UInt16: + fieldInfo.SetValue(obj, reader.ReadUInt16()); + break; + case TypeCode.Int32: + fieldInfo.SetValue(obj, reader.ReadInt32()); + break; + case TypeCode.UInt32: + fieldInfo.SetValue(obj, reader.ReadUInt32()); + break; + case TypeCode.Int64: + fieldInfo.SetValue(obj, reader.ReadInt64()); + break; + case TypeCode.UInt64: + fieldInfo.SetValue(obj, reader.ReadUInt64()); + break; + case TypeCode.Single: + fieldInfo.SetValue(obj, reader.ReadSingle()); + break; + case TypeCode.String: + string str = GetString(reader); + fieldInfo.SetValue(obj, str); + break; + case TypeCode.Object: + switch (fieldInfo.FieldType.Name) + { + case "Vector2": + fieldInfo.SetValue(obj, reader.Read()); + break; + case "Vector3": + fieldInfo.SetValue(obj, reader.Read()); + break; + case "LocalizedString": + LocalizedString locString = new LocalizedString(); + locString[Global.WorldMgr.GetDefaultDbcLocale()] = GetString(reader); + fieldInfo.SetValue(obj, locString); + break; + default: + Log.outError(LogFilter.ServerLoading, "Wrong Array Type: {0}", fieldInfo.FieldType.Name); + break; + } + break; + default: + Log.outError(LogFilter.ServerLoading, "Wrong Array Type: {0}", fieldInfo.FieldType.Name); + break; + } + } + + static string GetString(BinaryReader reader) + { + if (StringTable != null) + return StringTable.LookupByKey(reader.ReadUInt32()); + + return reader.ReadCString(); + } + + static DB6Header Header; + static Dictionary StringTable; + + static List FieldStructure; + static List ColumnMeta; + static RelationShipData RelationShipData; + } + + public struct DB6FieldInfo + { + public DB6FieldInfo(FieldInfo fieldInfo) + { + IsArray = false; + FieldType = fieldInfo.FieldType; + + if (fieldInfo.FieldType.IsArray) + { + FieldType = fieldInfo.FieldType.GetElementType(); + IsArray = true; + } + + Setter = fieldInfo.CompileSetter(); + Getter = fieldInfo.CompileGetter(); + } + + public void SetValue(Array array, object value, int arrayIndex) + { + array.SetValue(value, arrayIndex % array.Length); + } + + public void SetValue(object obj, object value) + { + Setter(obj, value); + } + + public Type FieldType; + public bool IsArray; + Action Setter; + public Func Getter; + } + + public class DB6Header + { + public bool HasIndexTable() + { + return Convert.ToBoolean(Flags & HeaderFlags.IndexMap); + } + + public bool HasOffsetTable() + { + return Convert.ToBoolean(Flags & HeaderFlags.OffsetMap); + } + + public string Signature; + public uint RecordCount; + public uint FieldCount; + public uint RecordSize; + public uint StringTableSize; + + public uint TableHash; + public uint LayoutHash; + public int MinId; + public int MaxId; + public int Locale; + public int CopyTableSize; + public HeaderFlags Flags; + public int IdIndex; + public uint TotalFieldCount; + public uint BitpackedDataOffset; + public uint LookupColumnCount; + public uint OffsetTableOffset; + public uint IdListSize; + public uint ColumnMetaSize; + public uint CommonDataSize; + public uint PalletDataSize; + public uint RelationshipDataSize; + } + + public class FieldStructureEntry + { + public short Bits; + public ushort Offset; + public int Length = 1; + + public int ByteCount + { + get + { + int value = (32 - Bits) >> 3; + return (value < 0 ? Math.Abs(value) + 4 : value); + } + } + + public int BitCount + { + get + { + int bitSize = 32 - Bits; + if (bitSize < 0) + bitSize = (bitSize * -1) + 32; + return bitSize; + } + } + + public FieldStructureEntry(short bits, ushort offset) + { + this.Bits = bits; + this.Offset = offset; + } + + public void SetLength(FieldStructureEntry nextField) + { + this.Length = Math.Max(1, (int)Math.Floor((nextField.Offset - this.Offset) / (double)this.ByteCount)); + } + } + + public class ColumnStructureEntry + { + public ushort RecordOffset { get; set; } + public ushort Size { get; set; } + public uint AdditionalDataSize { get; set; } + public DB2ColumnCompression CompressionType { get; set; } + public int BitOffset { get; set; } // used as common data column for Sparse + public int BitWidth { get; set; } + public int Cardinality { get; set; } // flags for Immediate, &1: Signed + + public List PalletValues { get; set; } + public Dictionary SparseValues { get; set; } + public int ArraySize { get; set; } = 1; + } + + public class RelationShipData + { + public uint Records; + public uint MinId; + public uint MaxId; + public Dictionary Entries; // index, id + } + + struct OffsetDuplicate + { + public int HiddenIndex { get; set; } + public int VisibleIndex { get; set; } + + public OffsetDuplicate(int hidden, int visible) + { + this.HiddenIndex = hidden; + this.VisibleIndex = visible; + } + } + + public class LocalizedString + { + public bool HasString(LocaleConstant locale = SharedConst.DefaultLocale) + { + return !string.IsNullOrEmpty(stringStorage[(int)locale]); + } + + public string this[LocaleConstant locale] + { + get + { + return stringStorage[(int)locale] ?? ""; + } + set + { + stringStorage[(int)locale] = value; + } + } + + StringArray stringStorage = new StringArray((int)LocaleConstant.Total); + } + + public enum DB2ColumnCompression : uint + { + None, + Immediate, + CommonData, + Pallet, + PalletArray + } + + [Flags] + public enum HeaderFlags : short + { + None = 0x0, + OffsetMap = 0x1, + SecondIndex = 0x2, + IndexMap = 0x4, + Unknown = 0x8, + Compressed = 0x10, + } +} diff --git a/Source/Game/DataStorage/ClientReader/GameTables.cs b/Source/Game/DataStorage/ClientReader/GameTables.cs index 10d071dd7..09b4753ca 100644 --- a/Source/Game/DataStorage/ClientReader/GameTables.cs +++ b/Source/Game/DataStorage/ClientReader/GameTables.cs @@ -15,10 +15,71 @@ * along with this program. If not, see . */ +using Framework.Collections; +using System; using System.Collections.Generic; +using System.IO; namespace Game.DataStorage { + public class GameTableReader + { + internal static GameTable Read(string fileName) where T : new() + { + GameTable storage = new GameTable(); + + if (!File.Exists(CliDB.DataPath + fileName)) + { + Log.outError(LogFilter.ServerLoading, "File {0} not found.", fileName); + return storage; + } + using (var reader = new StreamReader(CliDB.DataPath + fileName)) + { + string headers = reader.ReadLine(); + if (headers.IsEmpty()) + { + Log.outError(LogFilter.ServerLoading, "GameTable file {0} is empty.", fileName); + return storage; + } + + var columnDefs = new StringArray(headers, '\t'); + + List data = new List(); + data.Add(new T()); // row id 0, unused + + string line; + while (!(line = reader.ReadLine()).IsEmpty()) + { + var values = new StringArray(line, '\t'); + if (values.Length == 0) + break; + + var obj = new T(); + var fields = obj.GetType().GetFields(); + for (int fieldIndex = 0, valueIndex = 1; fieldIndex < fields.Length && valueIndex < values.Length; ++fieldIndex, ++valueIndex) + { + var field = fields[fieldIndex]; + if (field.FieldType.IsArray) + { + Array array = (Array)field.GetValue(obj); + for (var i = 0; i < array.Length; ++i) + array.SetValue(float.Parse(values[valueIndex++]), i); + } + else + fields[fieldIndex].SetValue(obj, float.Parse(values[valueIndex])); + } + + data.Add(obj); + } + + storage.SetData(data); + } + + CliDB.LoadedFileCount++; + return storage; + } + } + public class GameTable where T : new() { public T GetRow(uint row) diff --git a/Source/Game/DataStorage/DB2Manager.cs b/Source/Game/DataStorage/DB2Manager.cs index 4c37a77eb..78f35e8dc 100644 --- a/Source/Game/DataStorage/DB2Manager.cs +++ b/Source/Game/DataStorage/DB2Manager.cs @@ -346,7 +346,7 @@ namespace Game.DataStorage } foreach (PvpRewardRecord pvpReward in CliDB.PvpRewardStorage.Values) - _pvpRewardPack[Tuple.Create(pvpReward.Prestige, pvpReward.HonorLevel)] = pvpReward.RewardPackID; + _pvpRewardPack[Tuple.Create((uint)pvpReward.Prestige, (uint)pvpReward.HonorLevel)] = pvpReward.RewardPackID; CliDB.PvpRewardStorage.Clear(); @@ -454,7 +454,7 @@ namespace Game.DataStorage CliDB.TransmogSetItemStorage.Clear(); foreach (WMOAreaTableRecord entry in CliDB.WMOAreaTableStorage.Values) - _wmoAreaTableLookup[Tuple.Create(entry.WMOID, entry.NameSet, entry.WMOGroupID)] = entry; + _wmoAreaTableLookup[Tuple.Create((short)entry.WMOID, entry.NameSet, entry.WMOGroupID)] = entry; CliDB.WMOAreaTableStorage.Clear(); diff --git a/Source/Game/DataStorage/Structs/A_Records.cs b/Source/Game/DataStorage/Structs/A_Records.cs index f00b684a4..e904d1c2c 100644 --- a/Source/Game/DataStorage/Structs/A_Records.cs +++ b/Source/Game/DataStorage/Structs/A_Records.cs @@ -25,8 +25,8 @@ namespace Game.DataStorage { public LocalizedString Title; public LocalizedString Description; - public AchievementFlags Flags; public LocalizedString Reward; + public AchievementFlags Flags; public short MapID; public ushort Supercedes; public ushort Category; @@ -37,7 +37,7 @@ namespace Game.DataStorage public byte MinimumCriteria; public uint Id; public uint IconFileDataID; - public uint CriteriaTree; + public ushort CriteriaTree; } public sealed class AnimKitRecord @@ -51,17 +51,17 @@ namespace Game.DataStorage public sealed class AreaGroupMemberRecord { public uint Id; - public ushort AreaGroupID; public ushort AreaID; + public uint AreaGroupID; } public sealed class AreaTableRecord { public uint Id; - public AreaFlags[] Flags = new AreaFlags[2]; public string ZoneName; - public float AmbientMultiplier; public LocalizedString AreaName; + public AreaFlags[] Flags = new AreaFlags[2]; + public float AmbientMultiplier; public ushort MapId; public ushort ParentAreaID; public short AreaBit; @@ -80,7 +80,7 @@ namespace Game.DataStorage public byte WildBattlePetLevelMin; public byte WildBattlePetLevelMax; public byte WindSettingsID; - public byte[] UWIntroSound = new byte[2]; + public byte UWIntroSound; public bool IsSanctuary() { @@ -127,7 +127,7 @@ namespace Game.DataStorage public ushort SpecID; public byte ArtifactCategoryID; public byte Flags; - public uint UiModelSceneID; + public byte UiModelSceneID; public uint SpellVisualKitID; } @@ -145,9 +145,9 @@ namespace Game.DataStorage public byte Flags; public byte ModifiesShapeshiftFormDisplay; public uint Id; - public uint PlayerConditionID; - public uint ItemAppearanceID; - public uint AltItemAppearanceID; + public ushort PlayerConditionID; + public byte ItemAppearanceID; + public byte AltItemAppearanceID; } public sealed class ArtifactAppearanceSetRecord @@ -156,11 +156,11 @@ namespace Game.DataStorage public LocalizedString Name2; public ushort UiCameraID; public ushort AltHandUICameraID; - public byte ArtifactID; public byte DisplayIndex; public byte AttachmentPoint; public byte Flags; public uint Id; + public uint ArtifactID; } public sealed class ArtifactCategoryRecord @@ -178,7 +178,7 @@ namespace Game.DataStorage public byte MaxRank; public byte ArtifactTier; public uint Id; - public int RelicType; + public byte RelicType; } public sealed class ArtifactPowerLinkRecord @@ -191,7 +191,7 @@ namespace Game.DataStorage public sealed class ArtifactPowerPickerRecord { public uint Id; - public uint PlayerConditionID; + public ushort PlayerConditionID; } public sealed class ArtifactPowerRankRecord @@ -199,9 +199,9 @@ namespace Game.DataStorage public uint Id; public uint SpellID; public float Value; - public ushort ArtifactPowerID; public ushort Unknown; public byte Rank; + public uint ArtifactPowerID; } public sealed class ArtifactQuestXPRecord diff --git a/Source/Game/DataStorage/Structs/B_Records.cs b/Source/Game/DataStorage/Structs/B_Records.cs index 760da0643..af55abc8a 100644 --- a/Source/Game/DataStorage/Structs/B_Records.cs +++ b/Source/Game/DataStorage/Structs/B_Records.cs @@ -54,41 +54,41 @@ namespace Game.DataStorage { public uint Id; public short Value; - public byte BreedID; public byte State; + public uint BreedID; } public sealed class BattlePetSpeciesRecord { + public LocalizedString SourceText; + public LocalizedString Description; public uint CreatureID; public uint IconFileID; public uint SummonSpellID; - public LocalizedString SourceText; - public LocalizedString Description; public ushort Flags; public byte PetType; public sbyte Source; public uint Id; - public uint CardModelSceneID; - public uint LoadoutModelSceneID; + public byte CardModelSceneID; + public byte LoadoutModelSceneID; } public sealed class BattlePetSpeciesStateRecord { public uint Id; public int Value; - public ushort SpeciesID; public byte State; + public uint SpeciesID; } public sealed class BattlemasterListRecord { public uint Id; public LocalizedString Name; - public uint IconFileDataID; public LocalizedString GameType; public LocalizedString ShortDescription; public LocalizedString LongDescription; + public uint IconFileDataID; public short[] MapId = new short[16]; public ushort HolidayWorldState; public ushort PlayerConditionId; @@ -113,7 +113,7 @@ namespace Game.DataStorage public ushort UnkEmoteID; public byte Language; public byte Type; - public uint[] SoundID = new uint[2]; public uint PlayerConditionID; + public uint[] SoundID = new uint[2]; } } diff --git a/Source/Game/DataStorage/Structs/C_Records.cs b/Source/Game/DataStorage/Structs/C_Records.cs index 95dc75d83..86124d92e 100644 --- a/Source/Game/DataStorage/Structs/C_Records.cs +++ b/Source/Game/DataStorage/Structs/C_Records.cs @@ -54,11 +54,11 @@ namespace Game.DataStorage public uint Id; public int[] ItemID = new int[24]; public uint PetDisplayID; - public byte RaceID; public byte ClassID; public byte GenderID; public byte OutfitID; public byte PetFamilyID; + public uint RaceID; } public sealed class CharTitlesRecord @@ -73,9 +73,9 @@ namespace Game.DataStorage public sealed class ChatChannelsRecord { public uint Id; - public ChannelDBCFlags Flags; public LocalizedString Name; public LocalizedString Shortcut; + public ChannelDBCFlags Flags; public byte FactionGroup; } @@ -90,6 +90,7 @@ namespace Game.DataStorage public uint SelectScreenFileDataID; public uint IconFileDataID; public uint LowResScreenFileDataID; + public uint StartingLevel; public ushort Flags; public ushort CinematicSequenceID; public ushort DefaultSpec; @@ -105,28 +106,28 @@ namespace Game.DataStorage public sealed class ChrClassesXPowerTypesRecord { public uint Id; - public byte ClassID; public byte PowerType; + public uint ClassID; } public sealed class ChrRacesRecord { - public uint Id; - public uint Flags; - public uint MaleDisplayID; - public uint FemaleDisplayID; public uint ClientPrefix; public uint ClientFileString; public LocalizedString Name; - public LocalizedString NameFemale; - public LocalizedString NameMale; - public string[] FacialHairCustomization = new string[2]; - public string HairCustomization; + public string NameFemale; + public string LowercaseName; + public string LowercaseNameFemale; + public uint Flags; + public uint MaleDisplayID; + public uint FemaleDisplayID; public uint CreateScreenFileDataID; public uint SelectScreenFileDataID; public uint[] MaleCustomizeOffset = new uint[3]; public uint[] FemaleCustomizeOffset = new uint[3]; public uint LowResScreenFileDataID; + public uint StartingLevel; + public uint UIDisplayOrder; public ushort FactionID; public ushort ResSicknessSpellID; public ushort SplashSoundID; @@ -141,18 +142,22 @@ namespace Game.DataStorage public byte NeutralRaceID; public byte ItemAppearanceFrameRaceID; public byte CharComponentTexLayoutHiResID; + public uint Id; public uint HighResMaleDisplayID; public uint HighResFemaleDisplayID; + public uint HeritageArmorAchievementID; + public uint MaleCorpseBonesModelFileDataID; + public uint FemaleCorpseBonesModelFileDataID; public uint[] AlteredFormTransitionSpellVisualID = new uint[3]; public uint[] AlteredFormTransitionSpellVisualKitID = new uint[3]; } public sealed class ChrSpecializationRecord { + public string Name; + public string Name2; + public string Description; public uint[] MasterySpellID = new uint[PlayerConst.MaxMasterySpells]; - public LocalizedString Name; - public LocalizedString Name2; - public LocalizedString Description; public byte ClassID; public byte OrderIndex; public byte PetTalentType; @@ -208,7 +213,6 @@ namespace Game.DataStorage public byte Flags; public sbyte Gender; public uint ExtendedDisplayInfoID; - public uint[] TextureVariation = new uint[3]; public uint PortraitTextureFileDataID; public byte CreatureModelAlpha; public ushort SoundID; @@ -223,6 +227,7 @@ namespace Game.DataStorage public uint StateSpellVisualKitID; public float InstanceOtherPlayerPetScale; // scale of not own player pets inside dungeons/raids/scenarios public uint MountSpellVisualKitID; + public uint[] TextureVariation = new uint[3]; } public sealed class CreatureDisplayInfoExtraRecord @@ -245,9 +250,9 @@ namespace Game.DataStorage public sealed class CreatureFamilyRecord { public uint Id; + public LocalizedString Name; public float MinScale; public float MaxScale; - public LocalizedString Name; public uint IconFileDataID; public ushort[] SkillLine = new ushort[2]; public ushort PetFoodMask; @@ -280,12 +285,12 @@ namespace Game.DataStorage public float HoverHeight; public uint Flags; public uint FileDataID; - public uint SizeClass; + public byte SizeClass; public uint BloodID; - public uint FootprintTextureID; - public uint FoleyMaterialID; - public uint FootstepEffectID; - public uint DeathThudEffectID; + public byte FootprintTextureID; + public byte FoleyMaterialID; + public byte FootstepEffectID; + public byte DeathThudEffectID; public uint SoundID; public uint CreatureGeosetDataID; } @@ -316,23 +321,23 @@ namespace Game.DataStorage public sealed class CriteriaTreeRecord { public uint Id; + public string Description; public uint Amount; - public LocalizedString Description; public CriteriaTreeFlags Flags; public byte Operator; - public uint CriteriaID; - public uint Parent; + public ushort CriteriaID; + public ushort Parent; public int OrderIndex; } public sealed class CurrencyTypesRecord { public uint Id; - public LocalizedString Name; + public string Name; + public string Description; public uint MaxQty; public uint MaxEarnablePerWeek; public CurrencyFlags Flags; - public LocalizedString Description; public byte CategoryID; public byte SpellCategory; public byte Quality; diff --git a/Source/Game/DataStorage/Structs/E_Records.cs b/Source/Game/DataStorage/Structs/E_Records.cs index 780de6ecb..a7d7fac5f 100644 --- a/Source/Game/DataStorage/Structs/E_Records.cs +++ b/Source/Game/DataStorage/Structs/E_Records.cs @@ -20,15 +20,15 @@ namespace Game.DataStorage public sealed class EmotesRecord { public uint Id; + public long RaceMask; public uint EmoteSlashCommand; public uint SpellVisualKitID; public uint EmoteFlags; - public int RaceMask; public ushort AnimID; public byte EmoteSpecProc; public uint EmoteSpecProcParam; - public uint EmoteSoundID; - public int ClassMask; + public byte EmoteSoundID; + public short ClassMask; } public sealed class EmotesTextRecord @@ -41,10 +41,10 @@ namespace Game.DataStorage public sealed class EmotesTextSoundRecord { public uint Id; - public ushort EmotesTextId; public byte RaceId; public byte SexId; public byte ClassId; public uint SoundId; + public uint EmotesTextId; } } diff --git a/Source/Game/DataStorage/Structs/F_Records.cs b/Source/Game/DataStorage/Structs/F_Records.cs index 66bbd759f..47ac5c461 100644 --- a/Source/Game/DataStorage/Structs/F_Records.cs +++ b/Source/Game/DataStorage/Structs/F_Records.cs @@ -22,13 +22,13 @@ namespace Game.DataStorage { public sealed class FactionRecord { + public ulong[] ReputationRaceMask = new ulong[4]; + public LocalizedString Name; + public string Description; public uint Id; - public uint[] ReputationRaceMask = new uint[4]; public int[] ReputationBase = new int[4]; public float ParentFactionModIn; // Faction gains incoming rep * ParentFactionModIn public float ParentFactionModOut; // Faction outputs rep * ParentFactionModOut as spillover reputation - public LocalizedString Name; - public LocalizedString Description; public uint[] ReputationMax = new uint[4]; public short ReputationIndex; public ushort[] ReputationClassMask = new ushort[4]; diff --git a/Source/Game/DataStorage/Structs/G_Records.cs b/Source/Game/DataStorage/Structs/G_Records.cs index cf0031d38..dbd7709a9 100644 --- a/Source/Game/DataStorage/Structs/G_Records.cs +++ b/Source/Game/DataStorage/Structs/G_Records.cs @@ -22,6 +22,7 @@ namespace Game.DataStorage { public sealed class GameObjectsRecord { + public LocalizedString Name; public Vector3 Position; public float RotationX; public float RotationY; @@ -29,7 +30,6 @@ namespace Game.DataStorage public float RotationW; public float Size; public int[] Data = new int[8]; - public LocalizedString Name; public ushort MapID; public ushort DisplayID; public ushort PhaseID; @@ -65,12 +65,12 @@ namespace Game.DataStorage public sealed class GarrBuildingRecord { public uint Id; + public string NameAlliance; + public string NameHorde; + public string Description; + public string Tooltip; public uint HordeGameObjectID; public uint AllianceGameObjectID; - public LocalizedString NameAlliance; - public LocalizedString NameHorde; - public LocalizedString Description; - public LocalizedString Tooltip; public uint IconFileDataID; public ushort CostCurrencyID; public ushort HordeTexPrefixKitID; @@ -86,9 +86,9 @@ namespace Game.DataStorage public GarrisonBuildingFlags Flags; public byte MaxShipments; public byte GarrTypeID; - public int BuildDuration; + public ushort BuildDuration; public int CostCurrencyAmount; - public int BonusAmount; + public byte BonusAmount; } public sealed class GarrBuildingPlotInstRecord @@ -114,15 +114,15 @@ namespace Game.DataStorage public sealed class GarrFollowerRecord { + public string HordeSourceText; + public string AllianceSourceText; + public string Name; public uint HordeCreatureID; public uint AllianceCreatureID; - public LocalizedString HordeSourceText; - public LocalizedString AllianceSourceText; public uint HordePortraitIconID; public uint AlliancePortraitIconID; public uint HordeAddedBroadcastTextID; public uint AllianceAddedBroadcastTextID; - public LocalizedString Name; public ushort HordeGarrFollItemSetID; public ushort AllianceGarrFollItemSetID; public ushort ItemLevelWeapon; @@ -151,9 +151,9 @@ namespace Game.DataStorage public sealed class GarrFollowerXAbilityRecord { public uint Id; - public ushort GarrFollowerID; public ushort GarrAbilityID; public byte FactionIndex; + public uint GarrFollowerID; } public sealed class GarrPlotRecord @@ -165,8 +165,7 @@ namespace Game.DataStorage public byte GarrPlotUICategoryID; public byte PlotType; public byte Flags; - public uint MinCount; - public uint MaxCount; + public uint[] Count = new uint[2]; } public sealed class GarrPlotBuildingRecord @@ -218,7 +217,7 @@ namespace Game.DataStorage { public uint Id; public uint SpellID; - public ushort GlyphPropertiesID; + public uint GlyphPropertiesID; } public sealed class GlyphPropertiesRecord @@ -233,14 +232,13 @@ namespace Game.DataStorage public sealed class GlyphRequiredSpecRecord { public uint Id; - public ushort GlyphPropertiesID; public ushort ChrSpecializationID; + public uint GlyphPropertiesID; } public sealed class GuildColorBackgroundRecord { public uint Id; - public byte Red; public byte Green; public byte Blue; diff --git a/Source/Game/DataStorage/Structs/H_Records.cs b/Source/Game/DataStorage/Structs/H_Records.cs index 7d17978d6..79ce5f282 100644 --- a/Source/Game/DataStorage/Structs/H_Records.cs +++ b/Source/Game/DataStorage/Structs/H_Records.cs @@ -21,8 +21,8 @@ namespace Game.DataStorage { public sealed class HeirloomRecord { + public string SourceText; public uint ItemID; - public LocalizedString SourceText; public uint[] OldItem = new uint[2]; public uint NextDifficultyItemID; public uint[] UpgradeItemID = new uint[3]; @@ -43,8 +43,8 @@ namespace Game.DataStorage public byte Priority; public sbyte CalendarFilterType; public byte Flags; - public uint HolidayNameID; - public uint HolidayDescriptionID; + public ushort HolidayNameID; + public ushort HolidayDescriptionID; public int[] TextureFileDataID = new int[3]; } } diff --git a/Source/Game/DataStorage/Structs/I_Records.cs b/Source/Game/DataStorage/Structs/I_Records.cs index 991badf06..542093842 100644 --- a/Source/Game/DataStorage/Structs/I_Records.cs +++ b/Source/Game/DataStorage/Structs/I_Records.cs @@ -98,7 +98,7 @@ namespace Game.DataStorage public sealed class ItemBonusRecord { public uint Id; - public int[] Value = new int[2]; + public int[] Value = new int[3]; public ushort BonusListID; public ItemBonusType Type; public byte Index; @@ -113,26 +113,26 @@ namespace Game.DataStorage public sealed class ItemBonusTreeNodeRecord { public uint Id; - public ushort BonusTreeID; public ushort SubTreeID; public ushort BonusListID; public ushort ItemLevelSelectorID; public byte BonusTreeModID; + public uint BonusTreeID; } public sealed class ItemChildEquipmentRecord { public uint Id; - public uint ItemID; public uint AltItemID; public byte AltEquipmentSlot; + public uint ItemID; } public sealed class ItemClassRecord { public uint Id; + public string Name; public float PriceMod; - public LocalizedString Name; public byte OldEnumValue; public byte Flags; } @@ -165,15 +165,15 @@ namespace Game.DataStorage public ushort MinItemLevel; public ushort MaxItemLevel; public ushort RequiredDisenchantSkill; - public byte ItemClass; public sbyte ItemSubClass; public byte ItemQuality; + public sbyte Expansion; + public uint ItemClass; } public sealed class ItemEffectRecord { public uint Id; - public uint ItemID; public uint SpellID; public int Cooldown; public int CategoryCooldown; @@ -182,6 +182,7 @@ namespace Game.DataStorage public ushort ChrSpecializationID; public byte OrderIndex; public ItemSpelltriggerType Trigger; + public uint ItemID; } public sealed class ItemExtendedCostRecord @@ -210,8 +211,8 @@ namespace Game.DataStorage { public uint ID; public uint ItemBonusListID; - public ushort ItemLevelSelectorQualitySetID; public byte Quality; + public uint ItemLevelSelectorQualitySetID; } public sealed class ItemLevelSelectorQualitySetRecord @@ -232,11 +233,11 @@ namespace Game.DataStorage public sealed class ItemModifiedAppearanceRecord { public uint ItemID; - public ushort AppearanceID; + public uint Id; public byte AppearanceModID; + public ushort AppearanceID; public byte Index; public byte SourceType; - public uint Id; } public sealed class ItemPriceBaseRecord @@ -264,17 +265,17 @@ namespace Game.DataStorage public sealed class ItemSearchNameRecord { - public uint Id; + public ulong AllowableRace; public LocalizedString Name; + public uint Id; public uint[] Flags = new uint[3]; - public uint AllowableRace; public ushort ItemLevel; public byte Quality; public byte RequiredExpansion; public byte RequiredLevel; - public int AllowableClass; public ushort RequiredReputationFaction; public byte RequiredReputationRank; + public short AllowableClass; public ushort RequiredSkill; public ushort RequiredSkillRank; public uint RequiredSpell; @@ -286,7 +287,7 @@ namespace Game.DataStorage public LocalizedString Name; public uint[] ItemID = new uint[17]; public ushort RequiredSkillRank; - public uint RequiredSkill; + public byte RequiredSkill; public ItemSetFlags Flags; } @@ -294,34 +295,34 @@ namespace Game.DataStorage { public uint Id; public uint SpellID; - public ushort ItemSetID; public ushort ChrSpecID; public byte Threshold; + public uint ItemSetID; } public sealed class ItemSparseRecord { public uint Id; + public long AllowableRace; + public LocalizedString Name; + public string Name2; + public string Name3; + public string Name4; + public string Description; public uint[] Flags = new uint[4]; public float Unk1; public float Unk2; public uint BuyCount; public uint BuyPrice; public uint SellPrice; - public int AllowableRace; public uint RequiredSpell; public uint MaxCount; public uint Stackable; public int[] ItemStatAllocation = new int[ItemConst.MaxStats]; public float[] ItemStatSocketCostMultiplier = new float[ItemConst.MaxStats]; public float RangedModRange; - public LocalizedString Name; - public LocalizedString Name2; - public LocalizedString Name3; - public LocalizedString Name4; - public LocalizedString Description; public uint BagFamily; - public float ArmorDamageModifier; + public float ArmorDamageModifier;//wrong? public uint Duration; public float StatScalingFactor; public short AllowableClass; @@ -382,8 +383,8 @@ namespace Game.DataStorage public sealed class ItemSpecOverrideRecord { public uint Id; - public uint ItemID; public ushort SpecID; + public uint ItemID; } public sealed class ItemUpgradeRecord @@ -399,7 +400,7 @@ namespace Game.DataStorage public sealed class ItemXBonusTreeRecord { public uint Id; - public uint ItemID; public ushort BonusTreeID; + public uint ItemID; } } diff --git a/Source/Game/DataStorage/Structs/L_Records.cs b/Source/Game/DataStorage/Structs/L_Records.cs index 47b8c474e..2019562e9 100644 --- a/Source/Game/DataStorage/Structs/L_Records.cs +++ b/Source/Game/DataStorage/Structs/L_Records.cs @@ -24,8 +24,8 @@ namespace Game.DataStorage { public uint Id; public LocalizedString Name; + public string Description; public LfgFlags Flags; - public LocalizedString Description; public float MinItemLevel; public ushort MaxLevel; public ushort TargetLevelMax; @@ -35,7 +35,7 @@ namespace Game.DataStorage public ushort LastBossJournalEncounterID; public ushort BonusReputationAmount; public ushort MentorItemLevel; - public uint PlayerConditionID; + public ushort PlayerConditionID; public byte MinLevel; public byte TargetLevel; public byte TargetLevelMin; @@ -75,13 +75,13 @@ namespace Game.DataStorage { public uint Id; public LocalizedString Name; + public string[] Texture = new string[6]; public uint SpellID; public float MaxDarkenDepth; public float FogDarkenIntensity; public float AmbDarkenIntensity; public float DirDarkenIntensity; public float ParticleScale; - public string[] Texture = new string[6]; public uint[] Color = new uint[2]; public float[] Float = new float[18]; public uint[] Int = new uint[4]; @@ -92,7 +92,7 @@ namespace Game.DataStorage public byte ParticleTexSlots; public byte MaterialID; public byte[] DepthTexCount = new byte[6]; - public uint SoundID; + public ushort SoundID; } public sealed class LockRecord diff --git a/Source/Game/DataStorage/Structs/M2Structure.cs b/Source/Game/DataStorage/Structs/M2Structure.cs index fb6ac7a47..8406c51f3 100644 --- a/Source/Game/DataStorage/Structs/M2Structure.cs +++ b/Source/Game/DataStorage/Structs/M2Structure.cs @@ -37,6 +37,7 @@ namespace Game.DataStorage struct M2Header { + /* public M2Header(BinaryReader reader) { Magic = null;/// reader.ReadStringFromChars(4); @@ -108,6 +109,7 @@ namespace Game.DataStorage nBlendMaps = reader.ReadUInt32(); ofsBlendMaps = reader.ReadUInt32(); } + */ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] public char[] Magic; // "MD20" diff --git a/Source/Game/DataStorage/Structs/M_Records.cs b/Source/Game/DataStorage/Structs/M_Records.cs index f6e112bf0..6a76bc5b9 100644 --- a/Source/Game/DataStorage/Structs/M_Records.cs +++ b/Source/Game/DataStorage/Structs/M_Records.cs @@ -29,16 +29,15 @@ namespace Game.DataStorage public sealed class MapRecord { public uint Id; - public uint Directory; + public LocalizedString MapName; + public string MapDescription0; // Horde + public string MapDescription1; // Alliance + public string ShortDescription; + public string LongDescription; public MapFlags[] Flags = new MapFlags[2]; public float MinimapIconScale; public Vector2 CorpsePos; // entrance coordinates in ghost mode (in most cases = normal entrance) - public LocalizedString MapName; - public LocalizedString MapDescription0; // Horde - public LocalizedString MapDescription1; // Alliance - public LocalizedString ShortDescription; - public LocalizedString LongDescription; public ushort AreaTableID; public ushort LoadingScreenID; public short CorpseMapID; // map_id of entrance map in ghost mode (continent always and in most cases = normal entrance) @@ -95,7 +94,6 @@ namespace Game.DataStorage { public uint Id; public LocalizedString Message_lang; // m_message_lang (text showed when transfer to map failed) - public ushort MapID; public byte DifficultyID; public byte RaidDurationType; // 1 means daily reset, 2 means weekly public byte MaxPlayers; // m_maxPlayers some heroic versions have 0 when expected same amount as in normal version @@ -103,6 +101,7 @@ namespace Game.DataStorage public byte Flags; public byte ItemBonusTreeModID; public uint Context; + public uint MapID; public uint GetRaidDuration() { @@ -127,17 +126,17 @@ namespace Game.DataStorage public sealed class MountRecord { + public string Name; + public string Description; + public string SourceDescription; public uint SpellId; - public LocalizedString Name; - public LocalizedString Description; - public LocalizedString SourceDescription; public float CameraPivotMultiplier; public ushort MountTypeId; public ushort Flags; public byte Source; public uint Id; public uint PlayerConditionId; - public int UiModelSceneID; + public byte UiModelSceneID; } public sealed class MountCapabilityRecord @@ -149,7 +148,7 @@ namespace Game.DataStorage public short RequiredMap; public MountCapabilityFlags Flags; public uint Id; - public uint RequiredAura; + public byte RequiredAura; } public sealed class MountTypeXCapabilityRecord @@ -162,10 +161,10 @@ namespace Game.DataStorage public sealed class MountXDisplayRecord { - public uint ID; - public uint MountID; + public uint Id; public uint DisplayID; public uint PlayerConditionID; + public uint MountID; } public sealed class MovieRecord diff --git a/Source/Game/DataStorage/Structs/P_Records.cs b/Source/Game/DataStorage/Structs/P_Records.cs index 852a4f7ab..7be5c1f7c 100644 --- a/Source/Game/DataStorage/Structs/P_Records.cs +++ b/Source/Game/DataStorage/Structs/P_Records.cs @@ -30,48 +30,24 @@ namespace Game.DataStorage { public uint Id; public ushort PhaseId; - public ushort PhaseGroupID; + public uint PhaseGroupID; } public sealed class PlayerConditionRecord { + public long RaceMask; + public string FailureDescription; public uint Id; - public uint RaceMask; - public uint[] Time = new uint[2]; - public uint[] AuraSpellID = new uint[4]; - public LocalizedString FailureDescription; - public ushort[] SkillID = new ushort[4]; - public short[] MinSkill = new short[4]; - public short[] MaxSkill = new short[4]; - public ushort[] PrevQuestID = new ushort[4]; - public ushort[] CurrQuestID = new ushort[4]; - public ushort[] CurrentCompletedQuestID = new ushort[4]; - public ushort[] Explored = new ushort[2]; - public ushort[] Achievement = new ushort[4]; - public ushort[] AreaID = new ushort[4]; public byte Flags; - public byte[] MinReputation = new byte[3]; - public byte[] AuraCount = new byte[4]; - public byte[] LfgStatus = new byte[4]; - public byte[] LfgCompare = new byte[4]; - public byte[] CurrencyCount = new byte[4]; - public int ClassMask; - public uint[] MinFactionID = new uint[3]; - public uint[] SpellID = new uint[4]; - public uint[] ItemID = new uint[4]; - public uint[] ItemCount = new uint[4]; - public uint[] LfgValue = new uint[4]; - public uint[] CurrencyID = new uint[4]; - public uint[] QuestKillMonster = new uint[6]; - public int[] MovementFlags = new int[2]; public ushort MinLevel; public ushort MaxLevel; + public int ClassMask; public sbyte Gender; public sbyte NativeGender; public uint SkillLogic; public byte LanguageID; public byte MinLanguage; - public uint MaxLanguage; + public int MaxLanguage; public ushort MaxFactionID; public byte MaxReputation; public uint ReputationLogic; @@ -105,17 +81,41 @@ namespace Game.DataStorage public byte PhaseUseFlags; public ushort PhaseID; public uint PhaseGroupID; - public uint MinAvgItemLevel; - public uint MaxAvgItemLevel; + public int MinAvgItemLevel; + public int MaxAvgItemLevel; public ushort MinAvgEquippedItemLevel; public ushort MaxAvgEquippedItemLevel; public sbyte ChrSpecializationIndex; public sbyte ChrSpecializationRole; public sbyte PowerType; - public sbyte PowerTypeComp; - public sbyte PowerTypeValue; + public byte PowerTypeComp; + public byte PowerTypeValue; public uint ModifierTreeID; - public uint MainHandItemSubclassMask; + public int MainHandItemSubclassMask; + public ushort[] SkillID = new ushort[4]; + public short[] MinSkill = new short[4]; + public short[] MaxSkill = new short[4]; + public uint[] MinFactionID = new uint[3]; + public byte[] MinReputation = new byte[3]; + public ushort[] PrevQuestID = new ushort[4]; + public ushort[] CurrQuestID = new ushort[4]; + public ushort[] CurrentCompletedQuestID = new ushort[4]; + public uint[] SpellID = new uint[4]; + public uint[] ItemID = new uint[4]; + public uint[] ItemCount = new uint[4]; + public ushort[] Explored = new ushort[2]; + public uint[] Time = new uint[2]; + public uint[] AuraSpellID = new uint[4]; + public byte[] AuraCount = new byte[4]; + public ushort[] Achievement = new ushort[4]; + public byte[] LfgStatus = new byte[4]; + public byte[] LfgCompare = new byte[4]; + public uint[] LfgValue = new uint[4]; + public ushort[] AreaID = new ushort[4]; + public uint[] CurrencyID = new uint[4]; + public byte[] CurrencyCount = new byte[4]; + public uint[] QuestKillMonster = new uint[6]; + public int[] MovementFlags = new int[2]; } public sealed class PowerDisplayRecord @@ -147,9 +147,9 @@ namespace Game.DataStorage public sealed class PrestigeLevelInfoRecord { - public uint ID; + public uint Id; + public string PrestigeText; public uint IconID; - public LocalizedString PrestigeText; public byte PrestigeLevel; public PrestigeLevelInfoFlags Flags; @@ -159,10 +159,10 @@ namespace Game.DataStorage public sealed class PVPDifficultyRecord { public uint Id; - public ushort MapID; public byte BracketID; public byte MinLevel; public byte MaxLevel; + public uint MapID; // helpers public BattlegroundBracketId GetBracketId() { return (BattlegroundBracketId)BracketID; } @@ -171,8 +171,8 @@ namespace Game.DataStorage public sealed class PvpRewardRecord { public uint Id; - public uint HonorLevel; - public uint Prestige; - public uint RewardPackID; + public byte HonorLevel; + public byte Prestige; + public ushort RewardPackID; } } diff --git a/Source/Game/DataStorage/Structs/R_Records.cs b/Source/Game/DataStorage/Structs/R_Records.cs index 5d8a57155..ac019d95a 100644 --- a/Source/Game/DataStorage/Structs/R_Records.cs +++ b/Source/Game/DataStorage/Structs/R_Records.cs @@ -32,16 +32,16 @@ namespace Game.DataStorage public float ArtifactXPMultiplier; public byte ArtifactXPDifficulty; public byte ArtifactCategoryID; - public uint TitleID; - public uint Unused; + public ushort TitleID; + public ushort Unused; } public sealed class RewardPackXItemRecord { public uint Id; public uint ItemID; - public uint RewardPackID; public uint Amount; + public uint RewardPackID; } public sealed class RulesetItemUpgradeRecord diff --git a/Source/Game/DataStorage/Structs/S_Records.cs b/Source/Game/DataStorage/Structs/S_Records.cs index 8965a94db..2225df8c8 100644 --- a/Source/Game/DataStorage/Structs/S_Records.cs +++ b/Source/Game/DataStorage/Structs/S_Records.cs @@ -21,11 +21,19 @@ using System; namespace Game.DataStorage { + public sealed class SandboxScalingRecord + { + public uint Id; + public uint MinLevel; + public uint MaxLevel; + public uint Flags; + } + public sealed class ScalingStatDistributionRecord { public uint Id; public ushort ItemLevelCurveID; - public uint MinLevel; + public byte MinLevel; public uint MaxLevel; } @@ -48,8 +56,8 @@ namespace Game.DataStorage public ushort QuestRewardID; public byte Step; public ScenarioStepFlags Flags; - public uint CriteriaTreeID; - public uint BonusRequiredStepID; // Bonus step can only be completed if scenario is in the step specified in this field + public ushort CriteriaTreeID; + public byte BonusRequiredStepID; // Bonus step can only be completed if scenario is in the step specified in this field // helpers public bool IsBonusObjective() @@ -61,18 +69,30 @@ namespace Game.DataStorage public sealed class SceneScriptRecord { public uint Id; - public string Name; - public string Script; public ushort PrevScriptId; public ushort NextScriptId; } + public sealed class SceneScriptGlobalTextRecord + { + public uint Id; + public string Name; + public string Script; + } + public sealed class SceneScriptPackageRecord { public uint Id; public string Name; } + public sealed class SceneScriptTextRecord + { + public uint Id; + public string Name; + public string Script; + } + public sealed class SkillLineRecord { public uint Id; @@ -83,31 +103,31 @@ namespace Game.DataStorage public SkillCategory CategoryID; public byte CanLink; public uint IconFileDataID; - public uint ParentSkillLineID; + public byte ParentSkillLineID; } public sealed class SkillLineAbilityRecord { + public ulong RaceMask; public uint Id; public uint SpellID; - public uint RaceMask; public uint SupercedesSpell; public ushort SkillLine; - public ushort MinSkillLineRank; public ushort TrivialSkillLineRankHigh; public ushort TrivialSkillLineRankLow; public ushort UniqueBit; public ushort TradeSkillCategoryID; - public AbilytyLearnType AcquireMethod; public byte NumSkillUps; - public byte Unknown703; public int ClassMask; + public ushort MinSkillLineRank; + public AbilytyLearnType AcquireMethod; + public byte Flags; } public sealed class SkillRaceClassInfoRecord { public uint Id; - public int RaceMask; + public long RaceMask; public ushort SkillID; public SkillRaceClassInfoFlags Flags; public ushort SkillTierID; @@ -138,9 +158,9 @@ namespace Game.DataStorage public sealed class SpecializationSpellsRecord { + public string Description; public uint SpellID; public uint OverridesSpellID; - public LocalizedString Description; public ushort SpecID; public byte OrderIndex; public uint Id; @@ -148,19 +168,16 @@ namespace Game.DataStorage public sealed class SpellRecord { - public LocalizedString Name; - public LocalizedString NameSubtext; - public LocalizedString Description; - public LocalizedString AuraDescription; - public uint MiscID; public uint Id; - public uint DescriptionVariablesID; + public LocalizedString Name; + public string NameSubtext; + public string Description; + public string AuraDescription; } public sealed class SpellAuraOptionsRecord { public uint Id; - public uint SpellID; public uint ProcCharges; public uint ProcTypeMask; public uint ProcCategoryRecovery; @@ -168,12 +185,12 @@ namespace Game.DataStorage public ushort SpellProcsPerMinuteID; public byte DifficultyID; public byte ProcChance; + public uint SpellID; } public sealed class SpellAuraRestrictionsRecord { public uint Id; - public uint SpellID; public uint CasterAuraSpell; public uint TargetAuraSpell; public uint ExcludeCasterAuraSpell; @@ -183,6 +200,7 @@ namespace Game.DataStorage public byte TargetAuraState; public byte ExcludeCasterAuraState; public byte ExcludeTargetAuraState; + public uint SpellID; } public sealed class SpellCastTimesRecord @@ -208,7 +226,6 @@ namespace Game.DataStorage public sealed class SpellCategoriesRecord { public uint Id; - public uint SpellID; public ushort Category; public ushort StartRecoveryCategory; public ushort ChargeCategory; @@ -217,6 +234,7 @@ namespace Game.DataStorage public byte DispelType; public byte Mechanic; public byte PreventionType; + public uint SpellID; } public sealed class SpellCategoryRecord @@ -227,7 +245,7 @@ namespace Game.DataStorage public SpellCategoryFlags Flags; public byte UsesPerWeek; public byte MaxCharges; - public uint ChargeCategoryType; + public byte ChargeCategoryType; } public sealed class SpellClassOptionsRecord @@ -236,17 +254,17 @@ namespace Game.DataStorage public uint SpellID; public FlagArray128 SpellClassMask; public byte SpellClassSet; - public uint ModalNextSpell; + public ushort ModalNextSpell; } public sealed class SpellCooldownsRecord { public uint Id; - public uint SpellID; public uint CategoryRecoveryTime; public uint RecoveryTime; public uint StartRecoveryTime; public byte DifficultyID; + public uint SpellID; } public sealed class SpellDurationRecord @@ -259,18 +277,11 @@ namespace Game.DataStorage public sealed class SpellEffectRecord { - public FlagArray128 EffectSpellClassMask; public uint Id; - public uint SpellID; public uint Effect; - public uint EffectAura; public int EffectBasePoints; - public uint EffectIndex; - public int EffectMiscValue; - public int EffectMiscValueB; - public uint EffectRadiusIndex; - public uint EffectRadiusMaxIndex; - public uint[] ImplicitTarget = new uint[2]; + public byte EffectIndex; + public uint EffectAura; public uint DifficultyID; public float EffectAmplitude; public uint EffectAuraPeriod; @@ -287,15 +298,17 @@ namespace Game.DataStorage public uint EffectAttributes; public float BonusCoefficientFromAP; public float PvPMultiplier; - } - - public sealed class SpellEffectScalingRecord - { - public uint Id; public float Coefficient; public float Variance; public float ResourceCoefficient; - public uint SpellEffectID; + public float GroupSizeCoefficient; + public FlagArray128 EffectSpellClassMask; + public int EffectMiscValue; + public int EffectMiscValueB; + public uint EffectRadiusIndex; + public uint EffectRadiusMaxIndex; + public uint[] ImplicitTarget = new uint[2]; + public uint SpellID; } public sealed class SpellEquippedItemsRecord @@ -316,18 +329,18 @@ namespace Game.DataStorage public sealed class SpellInterruptsRecord { public uint Id; - public uint SpellID; + public byte DifficultyID; + public ushort InterruptFlags; public uint[] AuraInterruptFlags = new uint[2]; public uint[] ChannelInterruptFlags = new uint[2]; - public ushort InterruptFlags; - public byte DifficultyID; + public uint SpellID; } public sealed class SpellItemEnchantmentRecord { public uint Id; + public string Name; public uint[] EffectSpellID = new uint[ItemConst.MaxItemEnchantmentEffects]; - public LocalizedString Name; public float[] EffectScalingPoints = new float[ItemConst.MaxItemEnchantmentEffects]; public uint TransmogCost; public uint TextureFileDataID; @@ -344,18 +357,18 @@ namespace Game.DataStorage public byte MaxLevel; public sbyte ScalingClass; public sbyte ScalingClassRestricted; - public uint PlayerConditionID; + public ushort PlayerConditionID; } public sealed class SpellItemEnchantmentConditionRecord { public uint Id; + public uint[] LTOperand = new uint[5]; public byte[] LTOperandType = new byte[5]; public byte[] Operator = new byte[5]; public byte[] RTOperandType = new byte[5]; public byte[] RTOperand = new byte[5]; public byte[] Logic = new byte[5]; - public uint[] LTOperand = new uint[5]; } public sealed class SpellLearnSpellRecord @@ -369,17 +382,26 @@ namespace Game.DataStorage public sealed class SpellLevelsRecord { public uint Id; - public uint SpellID; public ushort BaseLevel; public ushort MaxLevel; public ushort SpellLevel; public byte DifficultyID; public byte MaxUsableLevel; + public uint SpellID; } public sealed class SpellMiscRecord { public uint Id; + public ushort CastingTimeIndex; + public ushort DurationIndex; + public ushort RangeIndex; + public byte SchoolMask; + public uint IconFileDataID; + public float Speed; + public uint ActiveIconFileDataID; + public float MultistrikeSpeedMod; + public byte DifficultyID; public uint Attributes; public uint AttributesEx; public uint AttributesExB; @@ -394,19 +416,11 @@ namespace Game.DataStorage public uint AttributesExK; public uint AttributesExL; public uint AttributesExM; - public float Speed; - public float MultistrikeSpeedMod; - public ushort CastingTimeIndex; - public ushort DurationIndex; - public ushort RangeIndex; - public byte SchoolMask; - public uint IconFileDataID; - public uint ActiveIconFileDataID; + public uint SpellID; } public sealed class SpellPowerRecord { - public uint SpellID; public int ManaCost; public float ManaCostPercentage; public float ManaCostPercentagePerSecond; @@ -415,12 +429,13 @@ namespace Game.DataStorage public byte PowerIndex; public PowerType PowerType; public uint Id; - public int ManaCostPerLevel; - public int ManaCostPerSecond; + public byte ManaCostPerLevel; + public ushort ManaCostPerSecond; public int ManaCostAdditional; // Spell uses [ManaCost, ManaCost+ManaCostAdditional] power - affects tooltip parsing as multiplier on SpellEffectEntry::EffectPointsPerResource // only SPELL_EFFECT_WEAPON_DAMAGE_NOSCHOOL, SPELL_EFFECT_WEAPON_PERCENT_DAMAGE, SPELL_EFFECT_WEAPON_DAMAGE, SPELL_EFFECT_NORMALIZED_WEAPON_DMG public uint PowerDisplayID; public uint UnitPowerBarID; + public uint SpellID; } public sealed class SpellPowerDifficultyRecord @@ -442,8 +457,8 @@ namespace Game.DataStorage public uint Id; public float Coeff; public ushort Param; - public byte SpellProcsPerMinuteID; public SpellProcsPerMinuteModType Type; + public uint SpellProcsPerMinuteID; } public sealed class SpellRadiusRecord @@ -458,12 +473,12 @@ namespace Game.DataStorage public sealed class SpellRangeRecord { public uint Id; + public string DisplayName; + public string DisplayNameShort; public float MinRangeHostile; public float MinRangeFriend; public float MaxRangeHostile; public float MaxRangeFriend; - public LocalizedString DisplayName; - public LocalizedString DisplayNameShort; public SpellRangeFlag Flags; } @@ -480,8 +495,8 @@ namespace Game.DataStorage public uint Id; public uint SpellID; public ushort ScalesFromItemLevel; - public int ScalingClass; - public uint MinScalingLevel; + public byte ScalingClass; + public byte MinScalingLevel; public uint MaxScalingLevel; } @@ -512,7 +527,6 @@ namespace Game.DataStorage public sealed class SpellTargetRestrictionsRecord { public uint Id; - public uint SpellID; public float ConeAngle; public float Width; public uint Targets; @@ -520,6 +534,7 @@ namespace Game.DataStorage public byte DifficultyID; public byte MaxAffectedTargets; public uint MaxTargetLevel; + public uint SpellID; } public sealed class SpellTotemsRecord @@ -532,7 +547,6 @@ namespace Game.DataStorage public sealed class SpellXSpellVisualRecord { - public uint SpellID; public uint SpellVisualID; public uint Id; public float Chance; @@ -545,6 +559,7 @@ namespace Game.DataStorage public byte Flags; public byte DifficultyID; public byte Priority; + public uint SpellID; } public sealed class SummonPropertiesRecord @@ -552,8 +567,8 @@ namespace Game.DataStorage public uint Id; public uint Flags; public SummonCategory Category; - public uint Faction; + public ushort Faction; public SummonType Type; - public int Slot; + public byte Slot; } } diff --git a/Source/Game/DataStorage/Structs/T_Records.cs b/Source/Game/DataStorage/Structs/T_Records.cs index b6ae9bdcc..1775c618f 100644 --- a/Source/Game/DataStorage/Structs/T_Records.cs +++ b/Source/Game/DataStorage/Structs/T_Records.cs @@ -29,9 +29,9 @@ namespace Game.DataStorage public sealed class TalentRecord { public uint Id; + public string Description; public uint SpellID; public uint OverridesSpellID; - public LocalizedString Description; public ushort SpecID; public byte TierID; public byte ColumnIndex; @@ -43,8 +43,8 @@ namespace Game.DataStorage public sealed class TaxiNodesRecord { public uint Id; - public Vector3 Pos; public LocalizedString Name; + public Vector3 Pos; public uint[] MountCreatureID = new uint[2]; public Vector2 MapOffset; public float Unk730; @@ -88,8 +88,8 @@ namespace Game.DataStorage public sealed class ToyRecord { - public uint ItemID; public LocalizedString Description; + public uint ItemID; public byte Flags; public byte CategoryFilter; public uint Id; @@ -108,11 +108,11 @@ namespace Game.DataStorage public ushort UIOrder; public byte ExpansionID; public uint Id; - public int Flags; + public byte Flags; public int QuestID; public int ClassMask; public int ItemNameDescriptionID; - public uint TransmogSetGroupID; + public byte TransmogSetGroupID; } public sealed class TransmogSetGroupRecord @@ -132,20 +132,20 @@ namespace Game.DataStorage public sealed class TransportAnimationRecord { public uint Id; - public uint TransportID; public uint TimeIndex; public Vector3 Pos; public byte SequenceID; + public uint TransportID; } public sealed class TransportRotationRecord { public uint Id; - public uint TransportID; public uint TimeIndex; public float X; public float Y; public float Z; public float W; + public uint TransportID; } } diff --git a/Source/Game/DataStorage/Structs/U_Records.cs b/Source/Game/DataStorage/Structs/U_Records.cs index fdf3d057f..0b3beb0da 100644 --- a/Source/Game/DataStorage/Structs/U_Records.cs +++ b/Source/Game/DataStorage/Structs/U_Records.cs @@ -20,21 +20,21 @@ namespace Game.DataStorage public sealed class UnitPowerBarRecord { public uint Id; + public string Name; + public string Cost; + public string OutOfError; + public string ToolTip; public float RegenerationPeace; public float RegenerationCombat; public uint[] FileDataID = new uint[6]; public uint[] Color = new uint[6]; - public LocalizedString Name; - public LocalizedString Cost; - public LocalizedString OutOfError; - public LocalizedString ToolTip; public float StartInset; public float EndInset; public ushort StartPower; public ushort Flags; public byte CenterPower; public byte BarType; - public uint MinPower; + public byte MinPower; public uint MaxPower; } } diff --git a/Source/Game/DataStorage/Structs/V_Records.cs b/Source/Game/DataStorage/Structs/V_Records.cs index 4c4db3970..9d835ac05 100644 --- a/Source/Game/DataStorage/Structs/V_Records.cs +++ b/Source/Game/DataStorage/Structs/V_Records.cs @@ -41,7 +41,7 @@ namespace Game.DataStorage public ushort[] PowerDisplayID = new ushort[3]; public byte FlagsB; public byte UILocomotionType; - public int MissileTargetingID; + public ushort MissileTargetingID; } public sealed class VehicleSeatRecord @@ -105,7 +105,7 @@ namespace Game.DataStorage public sbyte VehicleRideAnimLoopBone; public byte VehicleAbilityDisplay; public uint EnterUISoundID; - public uint ExitUISoundID; + public ushort ExitUISoundID; public bool CanEnterOrExit() diff --git a/Source/Game/DataStorage/Structs/W_Records.cs b/Source/Game/DataStorage/Structs/W_Records.cs index 9e18901bc..7233214b9 100644 --- a/Source/Game/DataStorage/Structs/W_Records.cs +++ b/Source/Game/DataStorage/Structs/W_Records.cs @@ -22,9 +22,8 @@ namespace Game.DataStorage { public sealed class WMOAreaTableRecord { + public string AreaName; public int WMOGroupID; // used in group WMO - public LocalizedString AreaName; - public short WMOID; // used in root WMO public ushort AmbienceID; public ushort ZoneMusic; public ushort IntroSound; @@ -35,8 +34,9 @@ namespace Game.DataStorage public byte SoundProviderPref; public byte SoundProviderPrefUnderwater; public byte Flags; - public uint I; - public uint UWZoneMusic; + public uint Id; + public byte UWZoneMusic; + public uint WMOID; // used in root WMO } public sealed class WorldEffectRecord @@ -47,7 +47,7 @@ namespace Game.DataStorage public byte TargetType; public byte WhenToDisplay; public uint QuestFeedbackEffectID; - public uint PlayerConditionID; + public ushort PlayerConditionID; } public sealed class WorldMapAreaRecord @@ -73,20 +73,21 @@ namespace Game.DataStorage public sealed class WorldMapOverlayRecord { - public uint Id; public string TextureName; + public uint Id; public ushort TextureWidth; public ushort TextureHeight; - public uint MapAreaID; // idx in WorldMapArea.dbc - public uint[] AreaID = new uint[SharedConst.MaxWorldMapOverlayArea]; - public int OffsetX; - public int OffsetY; - public int HitRectTop; - public int HitRectLeft; - public int HitRectBottom; - public int HitRectRight; - public uint PlayerConditionID; - public uint Flags; + public ushort MapAreaID; // idx in WorldMapArea.dbc + public ushort OffsetX; + public uint OffsetY; + public ushort HitRectTop; + public ushort HitRectLeft; + public ushort HitRectBottom; + public ushort HitRectRight; + public ushort PlayerConditionID; + public byte Flags; + public uint[] AreaID = new uint[SharedConst.MaxWorldMapOverlayArea]; // needs checked + } public sealed class WorldMapTransformsRecord @@ -108,9 +109,9 @@ namespace Game.DataStorage public sealed class WorldSafeLocsRecord { public uint Id; + public string AreaName; public Vector3 Loc; public float Facing; - public LocalizedString AreaName; public ushort MapID; } } diff --git a/Source/Game/Entities/Item/Item.cs b/Source/Game/Entities/Item/Item.cs index 14b24f508..8683f9c3a 100644 --- a/Source/Game/Entities/Item/Item.cs +++ b/Source/Game/Entities/Item/Item.cs @@ -1580,158 +1580,166 @@ namespace Game.Entities return true; } - // used by mail items, transmog cost, stationeryinfo and others - static uint GetSellPrice(ItemTemplate proto, out bool normalSellPrice) + uint GetBuyPrice(Player owner, out bool standardPrice) { - normalSellPrice = true; - - if (proto.GetFlags2().HasAnyFlag(ItemFlags2.OverrideGoldCost)) - { - return proto.GetBuyPrice(); - } - else - { - var qualityPrice = CliDB.ImportPriceQualityStorage.LookupByKey(proto.GetQuality() + 1); - var basePrice = CliDB.ItemPriceBaseStorage.LookupByKey(proto.GetBaseItemLevel()); - - if (qualityPrice == null || basePrice == null) - return 0; - - float qualityFactor = qualityPrice.Factor; - float baseFactor = 0.0f; - - var inventoryType = proto.GetInventoryType(); - - if (inventoryType == InventoryType.Weapon || - inventoryType == InventoryType.Weapon2Hand || - inventoryType == InventoryType.WeaponMainhand || - inventoryType == InventoryType.WeaponOffhand || - inventoryType == InventoryType.Ranged || - inventoryType == InventoryType.Thrown || - inventoryType == InventoryType.RangedRight) - baseFactor = basePrice.WeaponFactor; - else - baseFactor = basePrice.ArmorFactor; - - if (inventoryType == InventoryType.Robe) - inventoryType = InventoryType.Chest; - - float typeFactor = 0.0f; - sbyte weapType = -1; - - switch (inventoryType) - { - case InventoryType.Head: - case InventoryType.Shoulders: - case InventoryType.Chest: - case InventoryType.Waist: - case InventoryType.Legs: - case InventoryType.Feet: - case InventoryType.Wrists: - case InventoryType.Hands: - case InventoryType.Cloak: - { - var armorPrice = CliDB.ImportPriceArmorStorage.LookupByKey(inventoryType); - if (armorPrice == null) - return 0; - - switch ((ItemSubClassArmor)proto.GetSubClass()) - { - case ItemSubClassArmor.Miscellaneous: - case ItemSubClassArmor.Cloth: - typeFactor = armorPrice.ClothFactor; - break; - case ItemSubClassArmor.Leather: - typeFactor = armorPrice.LeatherFactor; - break; - case ItemSubClassArmor.Mail: - typeFactor = armorPrice.MailFactor; - break; - case ItemSubClassArmor.Plate: - typeFactor = armorPrice.PlateFactor; - break; - default: - return 0; - } - - break; - } - case InventoryType.Shield: - { - var shieldPrice = CliDB.ImportPriceShieldStorage.LookupByKey(1); // it only has two rows, it's unclear which is the one used - if (shieldPrice == null) - return 0; - - typeFactor = shieldPrice.Factor; - break; - } - case InventoryType.WeaponMainhand: - weapType = 0; - break; - case InventoryType.WeaponOffhand: - weapType = 1; - break; - case InventoryType.Weapon: - weapType = 2; - break; - case InventoryType.Weapon2Hand: - weapType = 3; - break; - case InventoryType.Ranged: - case InventoryType.RangedRight: - case InventoryType.Relic: - weapType = 4; - break; - default: - return proto.GetBuyPrice(); - } - - if (weapType != -1) - { - var weaponPrice = CliDB.ImportPriceWeaponStorage.LookupByKey(weapType + 1); - if (weaponPrice == null) - return 0; - - typeFactor = weaponPrice.Factor; - } - - normalSellPrice = false; - return (uint)(qualityFactor * proto.GetUnk2() * proto.GetUnk1() * typeFactor * baseFactor); - } + return GetBuyPrice(GetTemplate(), (uint)GetQuality(), GetItemLevel(owner), out standardPrice); } - public static uint GetSpecialPrice(ItemTemplate proto, uint minimumPrice = 10000) + static uint GetBuyPrice(ItemTemplate proto, uint quality, uint itemLevel, out bool standardPrice) { - uint cost = 0; + standardPrice = true; if (proto.GetFlags2().HasAnyFlag(ItemFlags2.OverrideGoldCost)) - cost = proto.GetSellPrice(); - else - { - bool normalPrice; - cost = GetSellPrice(proto, out normalPrice); + return proto.GetBuyPrice(); - if (!normalPrice) - { - if (proto.GetBuyCount() <= 1) - { - var classEntry = Global.DB2Mgr.GetItemClassByOldEnum(proto.GetClass()); - if (classEntry != null) - cost *= (uint)classEntry.PriceMod; - else - cost = 0; - } - else - cost /= 4 * proto.GetBuyCount(); - } - else - cost = proto.GetSellPrice(); + var qualityPrice = CliDB.ImportPriceQualityStorage.LookupByKey(quality + 1); + if (qualityPrice == null) + return 0; + + var basePrice = CliDB.ItemPriceBaseStorage.LookupByKey(proto.GetBaseItemLevel()); + if (basePrice == null) + return 0; + + float qualityFactor = qualityPrice.Factor; + float baseFactor = 0.0f; + + var inventoryType = proto.GetInventoryType(); + + if (inventoryType == InventoryType.Weapon || + inventoryType == InventoryType.Weapon2Hand || + inventoryType == InventoryType.WeaponMainhand || + inventoryType == InventoryType.WeaponOffhand || + inventoryType == InventoryType.Ranged || + inventoryType == InventoryType.Thrown || + inventoryType == InventoryType.RangedRight) + baseFactor = basePrice.WeaponFactor; + else + baseFactor = basePrice.ArmorFactor; + + if (inventoryType == InventoryType.Robe) + inventoryType = InventoryType.Chest; + + if (proto.GetClass() == ItemClass.Gem && (ItemSubClassGem)proto.GetSubClass() == ItemSubClassGem.ArtifactRelic) + { + inventoryType = InventoryType.Weapon; + baseFactor = basePrice.WeaponFactor / 3.0f; } - if (cost < minimumPrice) - cost = minimumPrice; - return cost; + float typeFactor = 0.0f; + sbyte weapType = -1; + + switch (inventoryType) + { + case InventoryType.Head: + case InventoryType.Neck: + case InventoryType.Shoulders: + case InventoryType.Chest: + case InventoryType.Waist: + case InventoryType.Legs: + case InventoryType.Feet: + case InventoryType.Wrists: + case InventoryType.Hands: + case InventoryType.Finger: + case InventoryType.Trinket: + case InventoryType.Cloak: + case InventoryType.Holdable: + { + var armorPrice = CliDB.ImportPriceArmorStorage.LookupByKey(inventoryType); + if (armorPrice == null) + return 0; + + switch ((ItemSubClassArmor)proto.GetSubClass()) + { + case ItemSubClassArmor.Miscellaneous: + case ItemSubClassArmor.Cloth: + typeFactor = armorPrice.ClothFactor; + break; + case ItemSubClassArmor.Leather: + typeFactor = armorPrice.LeatherFactor; + break; + case ItemSubClassArmor.Mail: + typeFactor = armorPrice.MailFactor; + break; + case ItemSubClassArmor.Plate: + typeFactor = armorPrice.PlateFactor; + break; + default: + typeFactor = 1.0f; + break; + } + + break; + } + case InventoryType.Shield: + { + var shieldPrice = CliDB.ImportPriceShieldStorage.LookupByKey(2); // it only has two rows, it's unclear which is the one used + if (shieldPrice == null) + return 0; + + typeFactor = shieldPrice.Factor; + break; + } + case InventoryType.WeaponMainhand: + weapType = 0; + break; + case InventoryType.WeaponOffhand: + weapType = 1; + break; + case InventoryType.Weapon: + weapType = 2; + break; + case InventoryType.Weapon2Hand: + weapType = 3; + break; + case InventoryType.Ranged: + case InventoryType.RangedRight: + case InventoryType.Relic: + weapType = 4; + break; + default: + return proto.GetBuyPrice(); + } + + if (weapType != -1) + { + var weaponPrice = CliDB.ImportPriceWeaponStorage.LookupByKey(weapType + 1); + if (weaponPrice == null) + return 0; + + typeFactor = weaponPrice.Factor; + } + + standardPrice = false; + return (uint)(proto.GetUnk2() * typeFactor * baseFactor * qualityFactor * proto.GetUnk1()); + } + + public uint GetSellPrice(Player owner) + { + return GetSellPrice(GetTemplate(), (uint)GetQuality(), GetItemLevel(owner)); + } + + public static uint GetSellPrice(ItemTemplate proto, uint quality, uint itemLevel) + { + if (proto.GetFlags2().HasAnyFlag(ItemFlags2.OverrideGoldCost)) + return proto.GetSellPrice(); + + bool standardPrice; + uint cost = GetBuyPrice(proto, quality, itemLevel, out standardPrice); + + if (standardPrice) + { + ItemClassRecord classEntry = Global.DB2Mgr.GetItemClassByOldEnum(proto.GetClass()); + if (classEntry != null) + { + uint buyCount = Math.Max(proto.GetBuyCount(), 1u); + return (uint)(cost * classEntry.PriceMod / buyCount); + } + + return 0; + } + else + return proto.GetSellPrice(); } public int GetReforgableStat(ItemModType statType) @@ -1967,35 +1975,41 @@ namespace Game.Entities public uint GetItemLevel(Player owner) { - ItemTemplate stats = GetTemplate(); - if (stats == null) + return GetItemLevel(GetTemplate(), _bonusData, owner.getLevel(), GetModifier(ItemModifier.ScalingStatDistributionFixedLevel), GetModifier(ItemModifier.UpgradeId)); + } + + public static uint GetItemLevel(ItemTemplate itemTemplate, BonusData bonusData, uint level, uint fixedLevel, uint upgradeId) + { + if (itemTemplate == null) return 1; - uint itemLevel = stats.GetBaseItemLevel(); - ScalingStatDistributionRecord ssd = CliDB.ScalingStatDistributionStorage.LookupByKey(GetScalingStatDistribution()); + uint itemLevel = itemTemplate.GetBaseItemLevel(); + ScalingStatDistributionRecord ssd = CliDB.ScalingStatDistributionStorage.LookupByKey(bonusData.ScalingStatDistribution); if (ssd != null) { - uint level = owner.getLevel(); - - uint fixedLevel = GetModifier(ItemModifier.ScalingStatDistributionFixedLevel); if (fixedLevel != 0) level = fixedLevel; else level = Math.Min(Math.Max(level, ssd.MinLevel), ssd.MaxLevel); + SandboxScalingRecord sandbox = CliDB.SandboxScalingStorage.LookupByKey(bonusData.SandboxScalingId); + if (sandbox != null) + if ((Convert.ToBoolean(sandbox.Flags & 2) || sandbox.MinLevel != 0 || sandbox.MaxLevel != 0) && !Convert.ToBoolean(sandbox.Flags & 4)) + level = Math.Min(Math.Max(level, sandbox.MinLevel), sandbox.MaxLevel); + uint heirloomIlvl = (uint)Global.DB2Mgr.GetCurveValueAt(ssd.ItemLevelCurveID, level); if (heirloomIlvl != 0) itemLevel = heirloomIlvl; } - itemLevel += (uint)_bonusData.ItemLevelBonus; + itemLevel += (uint)bonusData.ItemLevelBonus; - ItemUpgradeRecord upgrade = CliDB.ItemUpgradeStorage.LookupByKey(GetModifier(ItemModifier.UpgradeId)); + ItemUpgradeRecord upgrade = CliDB.ItemUpgradeStorage.LookupByKey(upgradeId); if (upgrade != null) itemLevel += upgrade.ItemLevelBonus; for (uint i = 0; i < ItemConst.MaxGemSockets; ++i) - itemLevel += _bonusData.GemItemLevelBonus[i]; + itemLevel += bonusData.GemItemLevelBonus[i]; return Math.Min(Math.Max(itemLevel, 1), 1300); } @@ -2018,6 +2032,48 @@ namespace Game.Entities return _bonusData.ItemStatValue[index]; } + public ItemDisenchantLootRecord GetDisenchantLoot(Player owner) + { + return GetDisenchantLoot(GetTemplate(), (uint)GetQuality(), GetItemLevel(owner)); + } + + public static ItemDisenchantLootRecord GetDisenchantLoot(ItemTemplate itemTemplate, uint quality, uint itemLevel) + { + if (itemTemplate.GetFlags().HasAnyFlag(ItemFlags.Conjured | ItemFlags.NoDisenchant) || itemTemplate.GetBonding() == ItemBondingType.Quest) + return null; + + if (itemTemplate.GetArea() != 0 || itemTemplate.GetMap() != 0 || itemTemplate.GetMaxStackSize() > 1) + return null; + + if (GetSellPrice(itemTemplate, quality, itemLevel) == 0 && !Global.DB2Mgr.HasItemCurrencyCost(itemTemplate.GetId())) + return null; + + byte itemClass = (byte)itemTemplate.GetClass(); + uint itemSubClass = itemTemplate.GetSubClass(); + byte expansion = itemTemplate.GetRequiredExpansion(); + foreach (ItemDisenchantLootRecord disenchant in CliDB.ItemDisenchantLootStorage.Values) + { + if (disenchant.ItemClass != itemClass) + continue; + + if (disenchant.ItemSubClass >= 0 && itemSubClass != 0) + continue; + + if (disenchant.ItemQuality != quality) + continue; + + if (disenchant.MinItemLevel > itemLevel || disenchant.MaxItemLevel < itemLevel) + continue; + + if (disenchant.Expansion != -2 && disenchant.Expansion != expansion) + continue; + + return disenchant; + } + + return null; + } + public uint GetDisplayId(Player owner) { ItemModifier transmogModifier = ItemModifier.TransmogAppearanceAllSpecs; @@ -2535,8 +2591,6 @@ namespace Game.Entities public uint GetScriptId() { return GetTemplate().ScriptId; } - public uint GetSpecialPrice(uint minimumPrice = 10000) { return GetSpecialPrice(GetTemplate(), minimumPrice); } - public ObjectGuid GetChildItem() { return m_childItem; } public void SetChildItem(ObjectGuid childItem) { m_childItem = childItem; } @@ -2804,6 +2858,7 @@ namespace Game.Entities if (values[1] < _state.ScalingStatDistributionPriority) { ScalingStatDistribution = (uint)values[0]; + SandboxScalingId = (uint)values[2]; _state.ScalingStatDistributionPriority = values[1]; } break; @@ -2813,6 +2868,9 @@ namespace Game.Entities case ItemBonusType.RelicType: RelicType = values[0]; break; + case ItemBonusType.OverrideRequiredLevel: + RequiredLevel = values[0]; + break; } } @@ -2828,6 +2886,8 @@ namespace Game.Entities public uint AppearanceModID; public float RepairCostMultiplier; public uint ScalingStatDistribution; + public uint SandboxScalingId; + public uint DisenchantLootId; public uint[] GemItemLevelBonus = new uint[ItemConst.MaxGemSockets]; public int[] GemRelicType = new int[ItemConst.MaxGemSockets]; public ushort[] GemRelicRankBonus = new ushort[ItemConst.MaxGemSockets]; diff --git a/Source/Game/Entities/Item/ItemTemplate.cs b/Source/Game/Entities/Item/ItemTemplate.cs index 3d60a922c..47e591024 100644 --- a/Source/Game/Entities/Item/ItemTemplate.cs +++ b/Source/Game/Entities/Item/ItemTemplate.cs @@ -237,9 +237,9 @@ namespace Game.Entities public uint GetBuyCount() { return Math.Max(ExtendedData.BuyCount, 1u); } public uint GetBuyPrice() { return ExtendedData.BuyPrice; } public uint GetSellPrice() { return ExtendedData.SellPrice; } - public InventoryType GetInventoryType() { return (InventoryType)ExtendedData.inventoryType; } + public InventoryType GetInventoryType() { return ExtendedData.inventoryType; } public int GetAllowableClass() { return ExtendedData.AllowableClass; } - public int GetAllowableRace() { return ExtendedData.AllowableRace; } + public long GetAllowableRace() { return ExtendedData.AllowableRace; } public uint GetBaseItemLevel() { return ExtendedData.ItemLevel; } public int GetBaseRequiredLevel() { return ExtendedData.RequiredLevel; } public uint GetRequiredSkill() { return ExtendedData.RequiredSkill; } @@ -297,6 +297,7 @@ namespace Game.Entities public HolidayIds GetHolidayID() { return (HolidayIds)ExtendedData.HolidayID; } public float GetStatScalingFactor() { return ExtendedData.StatScalingFactor; } public byte GetArtifactID() { return ExtendedData.ArtifactID; } + public byte GetRequiredExpansion() { return ExtendedData.RequiredExpansion; } public bool IsCurrencyToken() { return (GetBagFamily() & BagFamilyMask.CurrencyTokens) != 0; } @@ -321,8 +322,6 @@ namespace Game.Entities // extra fields, not part of db2 files public uint ScriptId; - public uint DisenchantID; - public uint RequiredDisenchantSkill; public uint FoodType; public uint MinMoneyLoot; public uint MaxMoneyLoot; diff --git a/Source/Game/Entities/Player/Player.DB.cs b/Source/Game/Entities/Player/Player.DB.cs index a1fa16fa4..4f421147d 100644 --- a/Source/Game/Entities/Player/Player.DB.cs +++ b/Source/Game/Entities/Player/Player.DB.cs @@ -3046,7 +3046,7 @@ namespace Game.Entities float bubble0 = 0.031f; //speed collect rest bonus in offline, in logout, in tavern, city (section/in hour) float bubble1 = 0.125f; - float bubble = result.Read(32) > 0 + float bubble = result.Read(33) > 0 ? bubble1 * WorldConfig.GetFloatValue(WorldCfg.RateRestOfflineInTavernOrCity) : bubble0 * WorldConfig.GetFloatValue(WorldCfg.RateRestOfflineInWilderness); @@ -3125,7 +3125,7 @@ namespace Game.Entities stmt.AddValue(index++, transLowGUID); StringBuilder ss = new StringBuilder(); - for (byte i = 0; i < PlayerConst.TaxiMaskSize; ++i) + for (int i = 0; i < PlayerConst.TaxiMaskSize; ++i) ss.Append(m_taxi.m_taximask[i] + " "); stmt.AddValue(index++, ss.ToString()); @@ -3274,7 +3274,7 @@ namespace Game.Entities stmt.AddValue(index++, transLowGUID); StringBuilder ss = new StringBuilder(); - for (byte i = 0; i < PlayerConst.TaxiMaskSize; ++i) + for (int i = 0; i < PlayerConst.TaxiMaskSize; ++i) ss.Append(m_taxi.m_taximask[i] + " "); stmt.AddValue(index++, ss.ToString()); diff --git a/Source/Game/Entities/Player/Player.Items.cs b/Source/Game/Entities/Player/Player.Items.cs index 94c35ca0b..c8779dbe6 100644 --- a/Source/Game/Entities/Player/Player.Items.cs +++ b/Source/Game/Entities/Player/Player.Items.cs @@ -1476,7 +1476,7 @@ namespace Game.Entities if (Convert.ToBoolean(proto.GetFlags2() & ItemFlags2.FactionAlliance) && GetTeam() != Team.Alliance) return InventoryResult.CantEquipEver; - if ((proto.GetAllowableClass() & getClassMask()) == 0 || (proto.GetAllowableRace() & getRaceMask()) == 0) + if ((proto.GetAllowableClass() & getClassMask()) == 0 || (proto.GetAllowableRace() & (long)getRaceMask()) == 0) return InventoryResult.CantEquipEver; if (proto.GetRequiredSkill() != 0) @@ -3323,7 +3323,7 @@ namespace Game.Entities return InventoryResult.ItemNotFound; // Used by group, function GroupLoot, to know if a prototype can be used by a player - if ((proto.GetAllowableClass() & getClassMask()) == 0 || (proto.GetAllowableRace() & getRaceMask()) == 0) + if ((proto.GetAllowableClass() & getClassMask()) == 0 || (proto.GetAllowableRace() & (long)getRaceMask()) == 0) return InventoryResult.CantEquipEver; if (proto.GetRequiredSpell() != 0 && !HasSpell(proto.GetRequiredSpell())) @@ -6320,7 +6320,7 @@ namespace Game.Entities switch (loot_type) { case LootType.Disenchanting: - loot.FillLoot(item.GetTemplate().DisenchantID, LootStorage.Disenchant, this, true); + loot.FillLoot(item.GetDisenchantLoot(this).Id, LootStorage.Disenchant, this, true); break; case LootType.Prospecting: loot.FillLoot(item.GetEntry(), LootStorage.Prospecting, this, true); diff --git a/Source/Game/Entities/Player/Player.Quest.cs b/Source/Game/Entities/Player/Player.Quest.cs index 99ee49481..7528b4442 100644 --- a/Source/Game/Entities/Player/Player.Quest.cs +++ b/Source/Game/Entities/Player/Player.Quest.cs @@ -1382,7 +1382,7 @@ namespace Game.Entities if (reqraces == -1) return true; - if ((reqraces & getRaceMask()) == 0) + if ((reqraces & (long)getRaceMask()) == 0) { if (msg) { diff --git a/Source/Game/Entities/Player/Player.Spells.cs b/Source/Game/Entities/Player/Player.Spells.cs index b652ae536..00a3998a0 100644 --- a/Source/Game/Entities/Player/Player.Spells.cs +++ b/Source/Game/Entities/Player/Player.Spells.cs @@ -1573,7 +1573,7 @@ namespace Game.Entities void LearnSkillRewardedSpells(uint skillId, uint skillValue) { - uint raceMask = getRaceMask(); + ulong raceMask = getRaceMask(); uint classMask = getClassMask(); foreach (var ability in CliDB.SkillLineAbilityStorage.Values) { diff --git a/Source/Game/Entities/Player/Player.cs b/Source/Game/Entities/Player/Player.cs index a7b096fb1..5c4ab030d 100644 --- a/Source/Game/Entities/Player/Player.cs +++ b/Source/Game/Entities/Player/Player.cs @@ -5330,7 +5330,7 @@ namespace Game.Entities if (pet) pet.SynchronizeLevelWithOwner(); - MailLevelReward mailReward = Global.ObjectMgr.GetMailLevelReward(level, getRaceMask()); + MailLevelReward mailReward = Global.ObjectMgr.GetMailLevelReward(level, (uint)getRaceMask()); if (mailReward != null) { //- TODO: Poor design of mail system @@ -7057,7 +7057,7 @@ namespace Game.Entities } public bool IsSpellFitByClassAndRace(uint spell_id) { - uint racemask = getRaceMask(); + ulong racemask = getRaceMask(); uint classmask = getClassMask(); var bounds = Global.SpellMgr.GetSkillLineAbilityMapBounds(spell_id); diff --git a/Source/Game/Entities/Unit/Unit.Spells.cs b/Source/Game/Entities/Unit/Unit.Spells.cs index 2d99d6600..cb054d300 100644 --- a/Source/Game/Entities/Unit/Unit.Spells.cs +++ b/Source/Game/Entities/Unit/Unit.Spells.cs @@ -4185,7 +4185,11 @@ namespace Game.Entities if (castItem != null) { castItemGuid = castItem.GetGUID(); - castItemLevel = (int)castItem.GetItemLevel(castItem.GetOwner()); + Player owner = castItem.GetOwner(); + if (owner) + castItemLevel = (int)castItem.GetItemLevel(owner); + else if (castItem.GetOwnerGUID() == caster.GetGUID()) + castItemLevel = (int)castItem.GetItemLevel(caster.ToPlayer()); } // find current aura from spell and change it's stackamount, or refresh it's duration diff --git a/Source/Game/Entities/Unit/Unit.cs b/Source/Game/Entities/Unit/Unit.cs index 6bba882bd..7facc2e5d 100644 --- a/Source/Game/Entities/Unit/Unit.cs +++ b/Source/Game/Entities/Unit/Unit.cs @@ -2126,9 +2126,9 @@ namespace Game.Entities { return (Race)GetByteValue(UnitFields.Bytes0, 0); } - public uint getRaceMask() + public ulong getRaceMask() { - return (uint)(1 << ((int)GetRace() - 1)); + return (1ul << ((int)GetRace() - 1)); } public Class GetClass() { diff --git a/Source/Game/Globals/ObjectManager.cs b/Source/Game/Globals/ObjectManager.cs index 3a915ff2d..5cdc4cab6 100644 --- a/Source/Game/Globals/ObjectManager.cs +++ b/Source/Game/Globals/ObjectManager.cs @@ -444,7 +444,7 @@ namespace Game _raceUnlockRequirementStorage.Clear(); // 0 1 2 - SQLResult result = DB.World.Query("SELECT raceID, expansion, achievementId FROM `race_expansion_requirement`"); + SQLResult result = DB.World.Query("SELECT raceID, expansion, achievementId FROM `race_unlock_requirement`"); if (!result.IsEmpty()) { uint count = 0; @@ -4414,9 +4414,7 @@ namespace Game continue; var itemTemplate = new ItemTemplate(db2Data, sparse); - itemTemplate.MaxDurability = FillMaxDurability(db2Data.Class, db2Data.SubClass, sparse.inventoryType, (ItemQuality)sparse.Quality, sparse.ItemLevel); - FillDisenchantFields(out itemTemplate.DisenchantID, out itemTemplate.RequiredDisenchantSkill, itemTemplate); var itemSpecOverrides = Global.DB2Mgr.GetItemSpecOverrides(sparse.Id); if (itemSpecOverrides != null) @@ -4595,40 +4593,6 @@ namespace Game return 5 * (uint)(Math.Round(18.0f * qualityMultipliers[(int)quality] * weaponMultipliers[itemSubClass] * levelPenalty)); } - void FillDisenchantFields(out uint disenchantID, out uint requiredDisenchantSkill, ItemTemplate itemTemplate) - { - disenchantID = 0; - requiredDisenchantSkill = 0xFFFFFFFF; - if (itemTemplate.GetFlags().HasAnyFlag(ItemFlags.Conjured | ItemFlags.NoDisenchant) || - itemTemplate.GetBonding() == ItemBondingType.Quest || itemTemplate.GetArea() != 0 || itemTemplate.GetMap() != 0 || - itemTemplate.GetMaxStackSize() > 1 || - itemTemplate.GetQuality() < ItemQuality.Uncommon || itemTemplate.GetQuality() > ItemQuality.Epic || - !(itemTemplate.GetClass() == ItemClass.Armor || itemTemplate.GetClass() == ItemClass.Weapon) || - !(Item.GetSpecialPrice(itemTemplate) != 0 || Global.DB2Mgr.HasItemCurrencyCost(itemTemplate.GetId()))) - return; - - foreach (var disenchant in CliDB.ItemDisenchantLootStorage.Values) - { - if (disenchant.ItemClass == (uint)itemTemplate.GetClass() && disenchant.ItemQuality == (uint)itemTemplate.GetQuality() && - disenchant.MinItemLevel <= itemTemplate.GetBaseItemLevel() && disenchant.MaxItemLevel >= itemTemplate.GetBaseItemLevel()) - { - if (disenchant.Id == 60 || disenchant.Id == 61) // epic item disenchant ilvl range 66-99 (classic) - { - if (itemTemplate.GetBaseRequiredLevel() > 60 || itemTemplate.GetRequiredSkillRank() > 300) - continue; // skip to epic item disenchant ilvl range 90-199 (TBC) - } - else if (disenchant.Id == 66 || disenchant.Id == 67) // epic item disenchant ilvl range 90-199 (TBC) - { - if (itemTemplate.GetBaseRequiredLevel() <= 60 || (itemTemplate.GetRequiredSkill() != 0 && itemTemplate.GetRequiredSkillRank() <= 300)) - continue; - } - - disenchantID = disenchant.Id; - requiredDisenchantSkill = disenchant.RequiredDisenchantSkill; - return; - } - } - } public void LoadItemTemplateAddon() { var time = Time.GetMSTime(); @@ -5344,7 +5308,7 @@ namespace Game { for (int raceIndex = (int)Race.Human; raceIndex < (int)Race.Max; ++raceIndex) { - if (rcInfo.RaceMask == -1 || Convert.ToBoolean((1 << (raceIndex - 1)) & rcInfo.RaceMask)) + if (rcInfo.RaceMask == -1 || Convert.ToBoolean((1L << (raceIndex - 1)) & rcInfo.RaceMask)) { for (int classIndex = (int)Class.Warrior; classIndex < (int)Class.Max; ++classIndex) { diff --git a/Source/Game/Groups/Group.cs b/Source/Game/Groups/Group.cs index 6e32f6015..b241188f1 100644 --- a/Source/Game/Groups/Group.cs +++ b/Source/Game/Groups/Group.cs @@ -812,6 +812,11 @@ namespace Game.Groups startLootRoll.Method = GetLootMethod(); r.FillPacket(startLootRoll.Item); + ItemDisenchantLootRecord disenchant = r.GetItemDisenchantLoot(p); + if (disenchant != null) + if (m_maxEnchantingLevel >= disenchant.RequiredDisenchantSkill) + startLootRoll.ValidRolls |= RollMask.Disenchant; + p.SendPacket(startLootRoll); } @@ -950,8 +955,6 @@ namespace Game.Groups { r.setLoot(loot); r.itemSlot = itemSlot; - if (item.DisenchantID != 0 && m_maxEnchantingLevel >= item.RequiredDisenchantSkill) - r.rollTypeMask |= RollMask.Disenchant; if (item.GetFlags2().HasAnyFlag(ItemFlags2.CanOnlyRollGreed)) r.rollTypeMask &= ~RollMask.Need; @@ -1236,17 +1239,18 @@ namespace Game.Groups item.is_looted = true; roll.getLoot().NotifyItemRemoved(roll.itemSlot); roll.getLoot().unlootedCount--; - ItemTemplate pProto = Global.ObjectMgr.GetItemTemplate(roll.itemid); player.UpdateCriteria(CriteriaTypes.CastSpell, 13262); // Disenchant + ItemDisenchantLootRecord disenchant = roll.GetItemDisenchantLoot(player); + List dest = new List(); InventoryResult msg = player.CanStoreNewItem(ItemConst.NullBag, ItemConst.NullSlot, dest, roll.itemid, item.count); if (msg == InventoryResult.Ok) - player.AutoStoreLoot(pProto.DisenchantID, LootStorage.Disenchant, true); + player.AutoStoreLoot(disenchant.Id, LootStorage.Disenchant, true); else // If the player's inventory is full, send the disenchant result in a mail. { Loot loot = new Loot(); - loot.FillLoot(pProto.DisenchantID, LootStorage.Disenchant, player, true); + loot.FillLoot(disenchant.Id, LootStorage.Disenchant, player, true); uint max_slot = loot.GetMaxSlotInLootFor(player); for (uint i = 0; i < max_slot; ++i) @@ -2620,6 +2624,22 @@ namespace Game.Groups } } + public ItemDisenchantLootRecord GetItemDisenchantLoot(Player player) + { + LootItem lootItemInSlot = getTarget().GetItemInSlot(itemSlot); + if (lootItemInSlot != null) + { + ItemInstance itemInstance = new ItemInstance(lootItemInSlot); + BonusData bonusData = new BonusData(itemInstance); + + ItemTemplate itemTemplate = Global.ObjectMgr.GetItemTemplate(itemid); + uint itemLevel = Item.GetItemLevel(itemTemplate, bonusData, player.getLevel(), 0, lootItemInSlot.upgradeId); + return Item.GetDisenchantLoot(itemTemplate, (uint)bonusData.Quality, itemLevel); + } + + return null; + } + public uint itemid; public ItemRandomEnchantmentId itemRandomPropId; public uint itemRandomSuffix; diff --git a/Source/Game/Handlers/TransmogrificationHandler.cs b/Source/Game/Handlers/TransmogrificationHandler.cs index 3291010df..be047d591 100644 --- a/Source/Game/Handlers/TransmogrificationHandler.cs +++ b/Source/Game/Handlers/TransmogrificationHandler.cs @@ -98,7 +98,7 @@ namespace Game bindAppearances.Add((uint)transmogItem.ItemModifiedAppearanceID); // add cost - cost += itemTransmogrified.GetSpecialPrice(); + cost += itemTransmogrified.GetSellPrice(_player); } else resetAppearanceItems.Add(itemTransmogrified); diff --git a/Source/Game/Network/Packets/CharacterPackets.cs b/Source/Game/Network/Packets/CharacterPackets.cs index af8b11afb..e509e58b7 100644 --- a/Source/Game/Network/Packets/CharacterPackets.cs +++ b/Source/Game/Network/Packets/CharacterPackets.cs @@ -217,6 +217,7 @@ namespace Game.Network.Packets data.WriteUInt32(LastPlayedTime); data.WriteUInt16(SpecID); data.WriteUInt32(Unknown703); + data.WriteUInt32(LastLoginBuild); data.WriteUInt32(Flags4); data.WriteBits(Name.GetByteCount(), 6); data.WriteBit(FirstLogin); diff --git a/Source/Game/Network/Packets/WhoPackets.cs b/Source/Game/Network/Packets/WhoPackets.cs index 8c16fba2b..bcea7de28 100644 --- a/Source/Game/Network/Packets/WhoPackets.cs +++ b/Source/Game/Network/Packets/WhoPackets.cs @@ -137,7 +137,7 @@ namespace Game.Network.Packets public string VirtualRealmName; public string Guild; public string GuildVirtualRealmName; - public long RaceFilter = 0; + public long RaceFilter; public int ClassFilter = -1; public List Words = new List(); public bool ShowEnemies; diff --git a/Source/Game/Quest/Quest.cs b/Source/Game/Quest/Quest.cs index dcc7edd6a..1f0384f32 100644 --- a/Source/Game/Quest/Quest.cs +++ b/Source/Game/Quest/Quest.cs @@ -117,7 +117,7 @@ namespace Game SoundTurnIn = fields.Read(102); AreaGroupID = fields.Read(103); LimitTime = fields.Read(104); - AllowableRaces = fields.Read(105); + AllowableRaces = fields.Read(105); QuestRewardID = fields.Read(106); Expansion = fields.Read(107); diff --git a/Source/Game/Reputation/ReputationManager.cs b/Source/Game/Reputation/ReputationManager.cs index b78363fe4..0ee623025 100644 --- a/Source/Game/Reputation/ReputationManager.cs +++ b/Source/Game/Reputation/ReputationManager.cs @@ -91,7 +91,7 @@ namespace Game if (factionEntry == null) return 0; - uint raceMask = _player.getRaceMask(); + ulong raceMask = _player.getRaceMask(); uint classMask = _player.getClassMask(); for (var i = 0; i < 4; i++) { @@ -149,7 +149,7 @@ namespace Game if (factionEntry == null) return 0; - uint raceMask = _player.getRaceMask(); + ulong raceMask = _player.getRaceMask(); uint classMask = _player.getClassMask(); for (int i = 0; i < 4; i++) { @@ -625,13 +625,13 @@ namespace Game if (factionEntry == null) return 0; - uint raceMask = (1u << ((int)race - 1)); + ulong raceMask = (1ul << ((int)race - 1)); uint classMask = (1u << ((int)playerClass - 1)); for (int i = 0; i < 4; i++) { if ((factionEntry.ReputationClassMask[i] == 0 || factionEntry.ReputationClassMask[i].HasAnyFlag((ushort)classMask)) - && (factionEntry.ReputationRaceMask[i] == 0 || factionEntry.ReputationRaceMask[i].HasAnyFlag(raceMask))) + && (factionEntry.ReputationRaceMask[i] == 0 || factionEntry.ReputationRaceMask[i].HasAnyFlag((uint)raceMask))) return factionEntry.ReputationBase[i]; } diff --git a/Source/Game/Spells/Spell.cs b/Source/Game/Spells/Spell.cs index ded2825db..2caca26ae 100644 --- a/Source/Game/Spells/Spell.cs +++ b/Source/Game/Spells/Spell.cs @@ -6108,30 +6108,23 @@ namespace Game.Spells break; case SpellEffectName.Disenchant: { - if (m_targets.GetItemTarget() == null) + Item item = m_targets.GetItemTarget(); + if (!item) return SpellCastResult.CantBeDisenchanted; // prevent disenchanting in trade slot - if (m_targets.GetItemTarget().GetOwnerGUID() != m_caster.GetGUID()) + if (item.GetOwnerGUID() != m_caster.GetGUID()) return SpellCastResult.CantBeDisenchanted; - ItemTemplate itemProto = m_targets.GetItemTarget().GetTemplate(); + ItemTemplate itemProto = item.GetTemplate(); if (itemProto == null) return SpellCastResult.CantBeDisenchanted; - int item_quality = (int)itemProto.GetQuality(); - // 2.0.x addon: Check player enchanting level against the item disenchanting requirements - uint item_disenchantskilllevel = itemProto.RequiredDisenchantSkill; - if (item_disenchantskilllevel == Convert.ToUInt32(-1)) + ItemDisenchantLootRecord itemDisenchantLoot = item.GetDisenchantLoot(m_caster.ToPlayer()); + if (itemDisenchantLoot == null) return SpellCastResult.CantBeDisenchanted; - if (item_disenchantskilllevel > player.GetSkillValue(SkillType.Enchanting)) + if (itemDisenchantLoot.RequiredDisenchantSkill > player.GetSkillValue(SkillType.Enchanting)) return SpellCastResult.LowCastlevel; - if (item_quality > 4 || item_quality < 2) - return SpellCastResult.CantBeDisenchanted; - if (itemProto.GetClass() != ItemClass.Weapon && itemProto.GetClass() != ItemClass.Armor) - return SpellCastResult.CantBeDisenchanted; - if (itemProto.DisenchantID == 0) - return SpellCastResult.CantBeDisenchanted; break; } case SpellEffectName.Prospecting: diff --git a/Source/Game/Spells/SpellEffects.cs b/Source/Game/Spells/SpellEffects.cs index 10f427b92..0a7cb9129 100644 --- a/Source/Game/Spells/SpellEffects.cs +++ b/Source/Game/Spells/SpellEffects.cs @@ -3740,9 +3740,6 @@ namespace Game.Spells if (effectHandleMode != SpellEffectHandleMode.HitTarget) return; - if (itemTarget == null || itemTarget.GetTemplate().DisenchantID == 0) - return; - Player caster = m_caster.ToPlayer(); if (caster != null) { diff --git a/Source/Game/Spells/SpellInfo.cs b/Source/Game/Spells/SpellInfo.cs index be0fbd7ef..cf6c063f3 100644 --- a/Source/Game/Spells/SpellInfo.cs +++ b/Source/Game/Spells/SpellInfo.cs @@ -30,13 +30,12 @@ namespace Game.Spells { public class SpellInfo { - public SpellInfo(SpellInfoLoadHelper data, Dictionary effectsMap, MultiMap visuals, Dictionary effectScaling) + public SpellInfo(SpellInfoLoadHelper data, Dictionary effectsMap, MultiMap visuals) { Id = data.Entry.Id; _effects = new Dictionary(); - // SpellDifficultyEntry if (effectsMap != null) { foreach (var pair in effectsMap) @@ -50,8 +49,7 @@ namespace Game.Spells if (effect == null) continue; - var scaling = effectScaling.LookupByKey(effect.Id); - _effects[pair.Key][effect.EffectIndex] = new SpellEffectInfo(scaling, this, effect.EffectIndex, effect); + _effects[pair.Key][effect.EffectIndex] = new SpellEffectInfo(this, effect.EffectIndex, effect); } } } @@ -3671,7 +3669,7 @@ namespace Game.Spells public class SpellEffectInfo { - public SpellEffectInfo(SpellEffectScalingRecord spellEffectScaling, SpellInfo spellInfo, uint effIndex, SpellEffectRecord _effect) + public SpellEffectInfo(SpellInfo spellInfo, uint effIndex, SpellEffectRecord _effect) { _spellInfo = spellInfo; EffectIndex = effIndex; @@ -3706,14 +3704,13 @@ namespace Game.Spells TriggerSpell = _effect.EffectTriggerSpell; SpellClassMask = _effect.EffectSpellClassMask; BonusCoefficientFromAP = _effect.BonusCoefficientFromAP; + Scaling.Coefficient = _effect.Coefficient; + Scaling.Variance = _effect.Variance; + Scaling.ResourceCoefficient = _effect.ResourceCoefficient; } ImplicitTargetConditions = null; - Scaling.Coefficient = spellEffectScaling != null ? spellEffectScaling.Coefficient : 0.0f; - Scaling.Variance = spellEffectScaling != null ? spellEffectScaling.Variance : 0.0f; - Scaling.ResourceCoefficient = spellEffectScaling != null ? spellEffectScaling.ResourceCoefficient : 0.0f; - _immunityInfo = new ImmunityInfo(); } diff --git a/Source/Game/Spells/SpellManager.cs b/Source/Game/Spells/SpellManager.cs index 2ff02a0cc..5cc432a4e 100644 --- a/Source/Game/Spells/SpellManager.cs +++ b/Source/Game/Spells/SpellManager.cs @@ -1935,7 +1935,6 @@ namespace Game.Entities Dictionary> effectsBySpell = new Dictionary>(); Dictionary> visualsBySpell = new Dictionary>(); - Dictionary spellEffectScallingByEffectId = new Dictionary(); foreach (var effect in CliDB.SpellEffectStorage.Values) { /*Contract.Assert(effect.EffectIndex < MAX_SPELL_EFFECTS, "MAX_SPELL_EFFECTS must be at least {0}", effect.EffectIndex); @@ -1993,11 +1992,6 @@ namespace Game.Entities } CliDB.SpellCooldownsStorage.Clear(); - foreach (SpellEffectScalingRecord spellEffectScaling in CliDB.SpellEffectScalingStorage.Values) - spellEffectScallingByEffectId[spellEffectScaling.SpellEffectID] = spellEffectScaling; - - CliDB.SpellEffectScalingStorage.Clear(); - foreach (SpellEquippedItemsRecord equippedItems in CliDB.SpellEquippedItemsStorage.Values) loadData[equippedItems.SpellID].EquippedItems = equippedItems; @@ -2016,6 +2010,10 @@ namespace Game.Entities loadData[levels.SpellID].Levels = levels; } + foreach (SpellMiscRecord misc in CliDB.SpellMiscStorage.Values) + if (misc.DifficultyID == 0) + loadData[misc.SpellID].Misc = misc; + foreach (SpellReagentsRecord reagents in CliDB.SpellReagentsStorage.Values) loadData[reagents.SpellID].Reagents = reagents; @@ -2054,8 +2052,7 @@ namespace Game.Entities foreach (var spellEntry in CliDB.SpellStorage.Values) { loadData[spellEntry.Id].Entry = spellEntry; - loadData[spellEntry.Id].Misc = CliDB.SpellMiscStorage.LookupByKey(spellEntry.MiscID); - mSpellInfoMap[spellEntry.Id] = new SpellInfo(loadData[spellEntry.Id], effectsBySpell.LookupByKey(spellEntry.Id), visualsBySpell.LookupByKey(spellEntry.Id), spellEffectScallingByEffectId); + mSpellInfoMap[spellEntry.Id] = new SpellInfo(loadData[spellEntry.Id], effectsBySpell.LookupByKey(spellEntry.Id), visualsBySpell.LookupByKey(spellEntry.Id)); } CliDB.SpellStorage.Clear(); diff --git a/Source/WorldServer/Server.cs b/Source/WorldServer/Server.cs index 0fc5863c6..617750633 100644 --- a/Source/WorldServer/Server.cs +++ b/Source/WorldServer/Server.cs @@ -42,8 +42,6 @@ namespace WorldServer if (!ConfigMgr.Load(System.Diagnostics.Process.GetCurrentProcess().ProcessName + ".conf")) ExitNow(); - var WorldSocketMgr = new WorldSocketManager(); - if (!StartDB()) ExitNow(); @@ -66,6 +64,7 @@ namespace WorldServer return; } + var WorldSocketMgr = new WorldSocketManager(); if (!WorldSocketMgr.StartNetwork(worldListener, worldPort, networkThreads)) { Log.outError(LogFilter.Network, "Failed to start Realm Network");