diff options
34 files changed, 2804 insertions, 1458 deletions
diff --git a/sql/updates/hotfixes/2015_07_05_00_hotfixes.sql b/sql/updates/hotfixes/2015_07_05_00_hotfixes.sql new file mode 100644 index 00000000000..6308d4b1eb0 --- /dev/null +++ b/sql/updates/hotfixes/2015_07_05_00_hotfixes.sql @@ -0,0 +1,1025 @@ +-- +-- Table structure for table `auction_house` +-- + +DROP TABLE IF EXISTS `auction_house`; +CREATE TABLE `auction_house` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `FactionID` int(10) unsigned NOT NULL DEFAULT '0', + `DepositRate` int(10) unsigned NOT NULL DEFAULT '0', + `ConsignmentRate` int(10) unsigned NOT NULL DEFAULT '0', + `Name` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `auction_house_locale` +-- + +DROP TABLE IF EXISTS `auction_house_locale`; +CREATE TABLE `auction_house_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `Name_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `barber_shop_style` +-- + +DROP TABLE IF EXISTS `barber_shop_style`; +CREATE TABLE `barber_shop_style` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Type` int(10) unsigned NOT NULL DEFAULT '0', + `DisplayName` text, + `Description` text, + `CostModifier` float NOT NULL DEFAULT '0', + `Race` int(10) unsigned NOT NULL DEFAULT '0', + `Sex` int(10) unsigned NOT NULL DEFAULT '0', + `Data` int(10) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `barber_shop_style_locale` +-- + +DROP TABLE IF EXISTS `barber_shop_style_locale`; +CREATE TABLE `barber_shop_style_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `DisplayName_lang` text, + `Description_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `char_start_outfit` +-- + +DROP TABLE IF EXISTS `char_start_outfit`; +CREATE TABLE `char_start_outfit` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `RaceID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `ClassID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `GenderID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `OutfitID` tinyint(3) unsigned NOT NULL DEFAULT '0', + `ItemID1` int(11) NOT NULL DEFAULT '0', + `ItemID2` int(11) NOT NULL DEFAULT '0', + `ItemID3` int(11) NOT NULL DEFAULT '0', + `ItemID4` int(11) NOT NULL DEFAULT '0', + `ItemID5` int(11) NOT NULL DEFAULT '0', + `ItemID6` int(11) NOT NULL DEFAULT '0', + `ItemID7` int(11) NOT NULL DEFAULT '0', + `ItemID8` int(11) NOT NULL DEFAULT '0', + `ItemID9` int(11) NOT NULL DEFAULT '0', + `ItemID10` int(11) NOT NULL DEFAULT '0', + `ItemID11` int(11) NOT NULL DEFAULT '0', + `ItemID12` int(11) NOT NULL DEFAULT '0', + `ItemID13` int(11) NOT NULL DEFAULT '0', + `ItemID14` int(11) NOT NULL DEFAULT '0', + `ItemID15` int(11) NOT NULL DEFAULT '0', + `ItemID16` int(11) NOT NULL DEFAULT '0', + `ItemID17` int(11) NOT NULL DEFAULT '0', + `ItemID18` int(11) NOT NULL DEFAULT '0', + `ItemID19` int(11) NOT NULL DEFAULT '0', + `ItemID20` int(11) NOT NULL DEFAULT '0', + `ItemID21` int(11) NOT NULL DEFAULT '0', + `ItemID22` int(11) NOT NULL DEFAULT '0', + `ItemID23` int(11) NOT NULL DEFAULT '0', + `ItemID24` int(11) NOT NULL DEFAULT '0', + `PetDisplayID` int(10) unsigned NOT NULL DEFAULT '0', + `PetFamilyID` int(10) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `chr_classes_x_power_types` +-- + +DROP TABLE IF EXISTS `chr_classes_x_power_types`; +CREATE TABLE `chr_classes_x_power_types` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `ClassID` int(10) unsigned NOT NULL DEFAULT '0', + `PowerType` int(10) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `cinematic_sequences` +-- + +DROP TABLE IF EXISTS `cinematic_sequences`; +CREATE TABLE `cinematic_sequences` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `SoundID` int(10) unsigned NOT NULL DEFAULT '0', + `Camera1` int(10) unsigned NOT NULL DEFAULT '0', + `Camera2` int(10) unsigned NOT NULL DEFAULT '0', + `Camera3` int(10) unsigned NOT NULL DEFAULT '0', + `Camera4` int(10) unsigned NOT NULL DEFAULT '0', + `Camera5` int(10) unsigned NOT NULL DEFAULT '0', + `Camera6` int(10) unsigned NOT NULL DEFAULT '0', + `Camera7` int(10) unsigned NOT NULL DEFAULT '0', + `Camera8` int(10) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `creature_display_info` +-- + +DROP TABLE IF EXISTS `creature_display_info`; +CREATE TABLE `creature_display_info` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `ModelID` int(10) unsigned NOT NULL DEFAULT '0', + `SoundID` int(10) unsigned NOT NULL DEFAULT '0', + `ExtendedDisplayInfoID` int(10) unsigned NOT NULL DEFAULT '0', + `CreatureModelScale` float NOT NULL DEFAULT '0', + `Unknown620` float NOT NULL DEFAULT '0', + `CreatureModelAlpha` int(10) unsigned NOT NULL DEFAULT '0', + `TextureVariation1` text, + `TextureVariation2` text, + `TextureVariation3` text, + `PortraitTextureName` text, + `PortraitCreatureDisplayInfoID` int(10) unsigned NOT NULL DEFAULT '0', + `SizeClass` int(10) unsigned NOT NULL DEFAULT '0', + `BloodID` int(10) unsigned NOT NULL DEFAULT '0', + `NPCSoundID` int(10) unsigned NOT NULL DEFAULT '0', + `ParticleColorID` int(10) unsigned NOT NULL DEFAULT '0', + `CreatureGeosetData` int(10) unsigned NOT NULL DEFAULT '0', + `ObjectEffectPackageID` int(10) unsigned NOT NULL DEFAULT '0', + `AnimReplacementSetID` int(10) unsigned NOT NULL DEFAULT '0', + `Flags` int(10) unsigned NOT NULL DEFAULT '0', + `Gender` int(11) NOT NULL DEFAULT '0', + `StateSpellVisualKitID` int(10) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `creature_display_info_locale` +-- + +DROP TABLE IF EXISTS `creature_display_info_locale`; +CREATE TABLE `creature_display_info_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `TextureVariation_lang1` text, + `TextureVariation_lang2` text, + `TextureVariation_lang3` text, + `PortraitTextureName_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `creature_type` +-- + +DROP TABLE IF EXISTS `creature_type`; +CREATE TABLE `creature_type` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Name` text, + `Flags` int(10) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `creature_type_locale` +-- + +DROP TABLE IF EXISTS `creature_type_locale`; +CREATE TABLE `creature_type_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `Name_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `destructible_model_data` +-- + +DROP TABLE IF EXISTS `destructible_model_data`; +CREATE TABLE `destructible_model_data` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `StateDamagedDisplayID` int(10) unsigned NOT NULL DEFAULT '0', + `StateDamagedImpactEffectDoodadSet` int(10) unsigned NOT NULL DEFAULT '0', + `StateDamagedAmbientDoodadSet` int(10) unsigned NOT NULL DEFAULT '0', + `StateDamagedNameSet` int(10) unsigned NOT NULL DEFAULT '0', + `StateDestroyedDisplayID` int(10) unsigned NOT NULL DEFAULT '0', + `StateDestroyedDestructionDoodadSet` int(10) unsigned NOT NULL DEFAULT '0', + `StateDestroyedImpactEffectDoodadSet` int(10) unsigned NOT NULL DEFAULT '0', + `StateDestroyedAmbientDoodadSet` int(10) unsigned NOT NULL DEFAULT '0', + `StateDestroyedNameSet` int(10) unsigned NOT NULL DEFAULT '0', + `StateRebuildingDisplayID` int(10) unsigned NOT NULL DEFAULT '0', + `StateRebuildingDestructionDoodadSet` int(10) unsigned NOT NULL DEFAULT '0', + `StateRebuildingImpactEffectDoodadSet` int(10) unsigned NOT NULL DEFAULT '0', + `StateRebuildingAmbientDoodadSet` int(10) unsigned NOT NULL DEFAULT '0', + `StateRebuildingNameSet` int(10) unsigned NOT NULL DEFAULT '0', + `StateSmokeDisplayID` int(10) unsigned NOT NULL DEFAULT '0', + `StateSmokeInitDoodadSet` int(10) unsigned NOT NULL DEFAULT '0', + `StateSmokeAmbientDoodadSet` int(10) unsigned NOT NULL DEFAULT '0', + `StateSmokeNameSet` int(10) unsigned NOT NULL DEFAULT '0', + `EjectDirection` int(10) unsigned NOT NULL DEFAULT '0', + `RepairGroundFx` int(10) unsigned NOT NULL DEFAULT '0', + `DoNotHighlight` int(10) unsigned NOT NULL DEFAULT '0', + `HealEffect` int(10) unsigned NOT NULL DEFAULT '0', + `HealEffectSpeed` int(10) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `durability_quality` +-- + +DROP TABLE IF EXISTS `durability_quality`; +CREATE TABLE `durability_quality` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `QualityMod` float NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `glyph_slot` +-- + +DROP TABLE IF EXISTS `glyph_slot`; +CREATE TABLE `glyph_slot` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Type` int(10) unsigned NOT NULL DEFAULT '0', + `Tooltip` int(10) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `guild_perk_spells` +-- + +DROP TABLE IF EXISTS `guild_perk_spells`; +CREATE TABLE `guild_perk_spells` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `GuildLevel` int(10) unsigned NOT NULL DEFAULT '0', + `SpellID` int(10) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `import_price_armor` +-- + +DROP TABLE IF EXISTS `import_price_armor`; +CREATE TABLE `import_price_armor` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `ClothFactor` float NOT NULL DEFAULT '0', + `LeatherFactor` float NOT NULL DEFAULT '0', + `MailFactor` float NOT NULL DEFAULT '0', + `PlateFactor` float NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `import_price_quality` +-- + +DROP TABLE IF EXISTS `import_price_quality`; +CREATE TABLE `import_price_quality` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Factor` float NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `import_price_shield` +-- + +DROP TABLE IF EXISTS `import_price_shield`; +CREATE TABLE `import_price_shield` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Factor` float NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `import_price_weapon` +-- + +DROP TABLE IF EXISTS `import_price_weapon`; +CREATE TABLE `import_price_weapon` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Factor` float NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `item_class` +-- + +DROP TABLE IF EXISTS `item_class`; +CREATE TABLE `item_class` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Flags` int(10) unsigned NOT NULL DEFAULT '0', + `PriceMod` float NOT NULL DEFAULT '0', + `Name` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `item_class_locale` +-- + +DROP TABLE IF EXISTS `item_class_locale`; +CREATE TABLE `item_class_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `Name_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `item_disenchant_loot` +-- + +DROP TABLE IF EXISTS `item_disenchant_loot`; +CREATE TABLE `item_disenchant_loot` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `ItemClass` int(10) unsigned NOT NULL DEFAULT '0', + `ItemSubClass` int(11) NOT NULL DEFAULT '0', + `ItemQuality` int(10) unsigned NOT NULL DEFAULT '0', + `MinItemLevel` int(10) unsigned NOT NULL DEFAULT '0', + `MaxItemLevel` int(10) unsigned NOT NULL DEFAULT '0', + `RequiredDisenchantSkill` int(10) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `item_limit_category` +-- + +DROP TABLE IF EXISTS `item_limit_category`; +CREATE TABLE `item_limit_category` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Name` text, + `Quantity` int(10) unsigned NOT NULL DEFAULT '0', + `Flags` int(10) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `item_limit_category_locale` +-- + +DROP TABLE IF EXISTS `item_limit_category_locale`; +CREATE TABLE `item_limit_category_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `Name_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `item_price_base` +-- + +DROP TABLE IF EXISTS `item_price_base`; +CREATE TABLE `item_price_base` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `ItemLevel` int(10) unsigned NOT NULL DEFAULT '0', + `ArmorFactor` float NOT NULL DEFAULT '0', + `WeaponFactor` float NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `item_random_properties` +-- + +DROP TABLE IF EXISTS `item_random_properties`; +CREATE TABLE `item_random_properties` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `InternalName` text, + `Enchantment1` int(10) unsigned NOT NULL DEFAULT '0', + `Enchantment2` int(10) unsigned NOT NULL DEFAULT '0', + `Enchantment3` int(10) unsigned NOT NULL DEFAULT '0', + `Enchantment4` int(10) unsigned NOT NULL DEFAULT '0', + `Enchantment5` int(10) unsigned NOT NULL DEFAULT '0', + `Name` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `item_random_properties_locale` +-- + +DROP TABLE IF EXISTS `item_random_properties_locale`; +CREATE TABLE `item_random_properties_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `InternalName_lang` text, + `Name_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `item_random_suffix` +-- + +DROP TABLE IF EXISTS `item_random_suffix`; +CREATE TABLE `item_random_suffix` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Name` text, + `InternalName` text, + `Enchantment1` int(10) unsigned NOT NULL DEFAULT '0', + `Enchantment2` int(10) unsigned NOT NULL DEFAULT '0', + `Enchantment3` int(10) unsigned NOT NULL DEFAULT '0', + `Enchantment4` int(10) unsigned NOT NULL DEFAULT '0', + `Enchantment5` int(10) unsigned NOT NULL DEFAULT '0', + `AllocationPct1` int(10) unsigned NOT NULL DEFAULT '0', + `AllocationPct2` int(10) unsigned NOT NULL DEFAULT '0', + `AllocationPct3` int(10) unsigned NOT NULL DEFAULT '0', + `AllocationPct4` int(10) unsigned NOT NULL DEFAULT '0', + `AllocationPct5` int(10) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `item_random_suffix_locale` +-- + +DROP TABLE IF EXISTS `item_random_suffix_locale`; +CREATE TABLE `item_random_suffix_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `Name_lang` text, + `InternalName_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `item_spec` +-- + +DROP TABLE IF EXISTS `item_spec`; +CREATE TABLE `item_spec` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `MinLevel` int(10) unsigned NOT NULL DEFAULT '0', + `MaxLevel` int(10) unsigned NOT NULL DEFAULT '0', + `ItemType` int(10) unsigned NOT NULL DEFAULT '0', + `PrimaryStat` int(10) unsigned NOT NULL DEFAULT '0', + `SecondaryStat` int(10) unsigned NOT NULL DEFAULT '0', + `SpecID` int(10) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `item_spec_override` +-- + +DROP TABLE IF EXISTS `item_spec_override`; +CREATE TABLE `item_spec_override` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `ItemID` int(10) unsigned NOT NULL DEFAULT '0', + `SpecID` int(10) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `mail_template` +-- + +DROP TABLE IF EXISTS `mail_template`; +CREATE TABLE `mail_template` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Body` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `mail_template_locale` +-- + +DROP TABLE IF EXISTS `mail_template_locale`; +CREATE TABLE `mail_template_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `Body_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `mount_capability` +-- + +DROP TABLE IF EXISTS `mount_capability`; +CREATE TABLE `mount_capability` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Flags` int(10) unsigned NOT NULL DEFAULT '0', + `RequiredRidingSkill` int(10) unsigned NOT NULL DEFAULT '0', + `RequiredArea` int(10) unsigned NOT NULL DEFAULT '0', + `RequiredAura` int(10) unsigned NOT NULL DEFAULT '0', + `RequiredSpell` int(10) unsigned NOT NULL DEFAULT '0', + `SpeedModSpell` int(10) unsigned NOT NULL DEFAULT '0', + `RequiredMap` int(11) NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `mount_type` +-- + +DROP TABLE IF EXISTS `mount_type_x_capability`; +CREATE TABLE `mount_type_x_capability` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `MountTypeID` int(10) unsigned NOT NULL DEFAULT '0', + `OrderIndex` int(10) unsigned NOT NULL DEFAULT '0', + `MountCapabilityID` int(10) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `name_gen` +-- + +DROP TABLE IF EXISTS `name_gen`; +CREATE TABLE `name_gen` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Name` text, + `Race` int(10) unsigned NOT NULL DEFAULT '0', + `Sex` int(10) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `name_gen_locale` +-- + +DROP TABLE IF EXISTS `name_gen_locale`; +CREATE TABLE `name_gen_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `Name_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `quest_money_reward` +-- + +DROP TABLE IF EXISTS `quest_money_reward`; +CREATE TABLE `quest_money_reward` ( + `Level` int(10) unsigned NOT NULL DEFAULT '0', + `Money1` int(10) unsigned NOT NULL DEFAULT '0', + `Money2` int(10) unsigned NOT NULL DEFAULT '0', + `Money3` int(10) unsigned NOT NULL DEFAULT '0', + `Money4` int(10) unsigned NOT NULL DEFAULT '0', + `Money5` int(10) unsigned NOT NULL DEFAULT '0', + `Money6` int(10) unsigned NOT NULL DEFAULT '0', + `Money7` int(10) unsigned NOT NULL DEFAULT '0', + `Money8` int(10) unsigned NOT NULL DEFAULT '0', + `Money9` int(10) unsigned NOT NULL DEFAULT '0', + `Money10` int(10) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`Level`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `quest_sort` +-- + +DROP TABLE IF EXISTS `quest_sort`; +CREATE TABLE `quest_sort` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `SortName` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `quest_sort_locale` +-- + +DROP TABLE IF EXISTS `quest_sort_locale`; +CREATE TABLE `quest_sort_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `SortName_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `quest_v2` +-- + +DROP TABLE IF EXISTS `quest_v2`; +CREATE TABLE `quest_v2` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `UniqueBitFlag` int(10) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Dumping data for table `quest_v2` +-- + +LOCK TABLES `quest_v2` WRITE; +/*!40000 ALTER TABLE `quest_v2` DISABLE KEYS */; +/*!40000 ALTER TABLE `quest_v2` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `quest_xp` +-- + +DROP TABLE IF EXISTS `quest_xp`; +CREATE TABLE `quest_xp` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Exp1` int(10) unsigned NOT NULL DEFAULT '0', + `Exp2` int(10) unsigned NOT NULL DEFAULT '0', + `Exp3` int(10) unsigned NOT NULL DEFAULT '0', + `Exp4` int(10) unsigned NOT NULL DEFAULT '0', + `Exp5` int(10) unsigned NOT NULL DEFAULT '0', + `Exp6` int(10) unsigned NOT NULL DEFAULT '0', + `Exp7` int(10) unsigned NOT NULL DEFAULT '0', + `Exp8` int(10) unsigned NOT NULL DEFAULT '0', + `Exp9` int(10) unsigned NOT NULL DEFAULT '0', + `Exp10` int(10) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `scaling_stat_distribution` +-- + +DROP TABLE IF EXISTS `scaling_stat_distribution`; +CREATE TABLE `scaling_stat_distribution` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `MinLevel` int(10) unsigned NOT NULL DEFAULT '0', + `MaxLevel` int(10) unsigned NOT NULL DEFAULT '0', + `ItemLevelCurveID` int(10) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `specialization_spells` +-- + +DROP TABLE IF EXISTS `specialization_spells`; +CREATE TABLE `specialization_spells` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `SpecID` int(10) unsigned NOT NULL DEFAULT '0', + `OrderIndex` int(10) unsigned NOT NULL DEFAULT '0', + `SpellID` int(10) unsigned NOT NULL DEFAULT '0', + `OverridesSpellID` int(10) unsigned NOT NULL DEFAULT '0', + `Description` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `specialization_spells_locale` +-- + +DROP TABLE IF EXISTS `specialization_spells_locale`; +CREATE TABLE `specialization_spells_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `Description_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `spell_cast_times` +-- + +DROP TABLE IF EXISTS `spell_cast_times`; +CREATE TABLE `spell_cast_times` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `CastTime` int(11) NOT NULL DEFAULT '0', + `CastTimePerLevel` int(11) NOT NULL DEFAULT '0', + `MinCastTime` int(11) NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `spell_duration` +-- + +DROP TABLE IF EXISTS `spell_duration`; +CREATE TABLE `spell_duration` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Duration1` int(11) NOT NULL DEFAULT '0', + `Duration2` int(11) NOT NULL DEFAULT '0', + `Duration3` int(11) NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `spell_item_enchantment_condition` +-- + +DROP TABLE IF EXISTS `spell_item_enchantment_condition`; +CREATE TABLE `spell_item_enchantment_condition` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `LTOperandType1` tinyint(3) unsigned NOT NULL DEFAULT '0', + `LTOperandType2` tinyint(3) unsigned NOT NULL DEFAULT '0', + `LTOperandType3` tinyint(3) unsigned NOT NULL DEFAULT '0', + `LTOperandType4` tinyint(3) unsigned NOT NULL DEFAULT '0', + `LTOperandType5` tinyint(3) unsigned NOT NULL DEFAULT '0', + `LTOperand1` int(10) unsigned NOT NULL DEFAULT '0', + `LTOperand2` int(10) unsigned NOT NULL DEFAULT '0', + `LTOperand3` int(10) unsigned NOT NULL DEFAULT '0', + `LTOperand4` int(10) unsigned NOT NULL DEFAULT '0', + `LTOperand5` int(10) unsigned NOT NULL DEFAULT '0', + `Operator1` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Operator2` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Operator3` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Operator4` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Operator5` tinyint(3) unsigned NOT NULL DEFAULT '0', + `RTOperandType1` tinyint(3) unsigned NOT NULL DEFAULT '0', + `RTOperandType2` tinyint(3) unsigned NOT NULL DEFAULT '0', + `RTOperandType3` tinyint(3) unsigned NOT NULL DEFAULT '0', + `RTOperandType4` tinyint(3) unsigned NOT NULL DEFAULT '0', + `RTOperandType5` tinyint(3) unsigned NOT NULL DEFAULT '0', + `RTOperand1` int(10) unsigned NOT NULL DEFAULT '0', + `RTOperand2` int(10) unsigned NOT NULL DEFAULT '0', + `RTOperand3` int(10) unsigned NOT NULL DEFAULT '0', + `RTOperand4` int(10) unsigned NOT NULL DEFAULT '0', + `RTOperand5` int(10) unsigned NOT NULL DEFAULT '0', + `Logic1` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Logic2` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Logic3` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Logic4` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Logic5` tinyint(3) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- +-- Table structure for table `spell_radius` +-- + +DROP TABLE IF EXISTS `spell_radius`; +CREATE TABLE `spell_radius` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Radius` float NOT NULL DEFAULT '0', + `RadiusPerLevel` float NOT NULL DEFAULT '0', + `RadiusMin` float NOT NULL DEFAULT '0', + `RadiusMax` float NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `spell_range` +-- + +DROP TABLE IF EXISTS `spell_range`; +CREATE TABLE `spell_range` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `MinRangeHostile` float NOT NULL DEFAULT '0', + `MinRangeFriend` float NOT NULL DEFAULT '0', + `MaxRangeHostile` float NOT NULL DEFAULT '0', + `MaxRangeFriend` float NOT NULL DEFAULT '0', + `Flags` int(10) unsigned NOT NULL DEFAULT '0', + `DisplayName` text, + `DisplayNameShort` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `spell_range_locale` +-- + +DROP TABLE IF EXISTS `spell_range_locale`; +CREATE TABLE `spell_range_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `DisplayName_lang` text, + `DisplayNameShort_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `spell_x_spell_visual` +-- + +DROP TABLE IF EXISTS `spell_x_spell_visual`; +CREATE TABLE `spell_x_spell_visual` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `SpellID` int(10) unsigned NOT NULL DEFAULT '0', + `DifficultyID` int(10) unsigned NOT NULL DEFAULT '0', + `SpellVisualID1` int(10) unsigned NOT NULL DEFAULT '0', + `SpellVisualID2` int(10) unsigned NOT NULL DEFAULT '0', + `Unk620` float NOT NULL DEFAULT '0', + `PlayerConditionID` int(10) unsigned NOT NULL DEFAULT '0', + `Flags` int(10) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `totem_category` +-- + +DROP TABLE IF EXISTS `totem_category`; +CREATE TABLE `totem_category` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `Name` text, + `CategoryType` int(10) unsigned NOT NULL DEFAULT '0', + `CategoryMask` int(10) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `totem_category_locale` +-- + +DROP TABLE IF EXISTS `totem_category_locale`; +CREATE TABLE `totem_category_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `Name_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `transport_animation` +-- + +DROP TABLE IF EXISTS `transport_animation`; +CREATE TABLE `transport_animation` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `TransportID` int(10) unsigned NOT NULL DEFAULT '0', + `TimeIndex` int(10) unsigned NOT NULL DEFAULT '0', + `PosX` float NOT NULL DEFAULT '0', + `PosY` float NOT NULL DEFAULT '0', + `PosZ` float NOT NULL DEFAULT '0', + `SequenceID` int(10) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `transport_rotation` +-- + +DROP TABLE IF EXISTS `transport_rotation`; +CREATE TABLE `transport_rotation` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `TransportID` int(10) unsigned NOT NULL DEFAULT '0', + `TimeIndex` int(10) unsigned NOT NULL DEFAULT '0', + `X` float NOT NULL DEFAULT '0', + `Y` float NOT NULL DEFAULT '0', + `Z` float NOT NULL DEFAULT '0', + `W` float NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `unit_power_bar` +-- + +DROP TABLE IF EXISTS `unit_power_bar`; +CREATE TABLE `unit_power_bar` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `MinPower` int(10) unsigned NOT NULL DEFAULT '0', + `MaxPower` int(10) unsigned NOT NULL DEFAULT '0', + `StartPower` int(10) unsigned NOT NULL DEFAULT '0', + `CenterPower` int(10) unsigned NOT NULL DEFAULT '0', + `RegenerationPeace` float NOT NULL DEFAULT '0', + `RegenerationCombat` float NOT NULL DEFAULT '0', + `BarType` int(10) unsigned NOT NULL DEFAULT '0', + `FileDataID1` int(10) unsigned NOT NULL DEFAULT '0', + `FileDataID2` int(10) unsigned NOT NULL DEFAULT '0', + `FileDataID3` int(10) unsigned NOT NULL DEFAULT '0', + `FileDataID4` int(10) unsigned NOT NULL DEFAULT '0', + `FileDataID5` int(10) unsigned NOT NULL DEFAULT '0', + `FileDataID6` int(10) unsigned NOT NULL DEFAULT '0', + `Color1` int(10) unsigned NOT NULL DEFAULT '0', + `Color2` int(10) unsigned NOT NULL DEFAULT '0', + `Color3` int(10) unsigned NOT NULL DEFAULT '0', + `Color4` int(10) unsigned NOT NULL DEFAULT '0', + `Color5` int(10) unsigned NOT NULL DEFAULT '0', + `Color6` int(10) unsigned NOT NULL DEFAULT '0', + `Flags` int(10) unsigned NOT NULL DEFAULT '0', + `Name` text, + `Cost` text, + `OutOfError` text, + `ToolTip` text, + `StartInset` float NOT NULL DEFAULT '0', + `EndInset` float NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `unit_power_bar_locale` +-- + +DROP TABLE IF EXISTS `unit_power_bar_locale`; +CREATE TABLE `unit_power_bar_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `Name_lang` text, + `Cost_lang` text, + `OutOfError_lang` text, + `ToolTip_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `world_map_overlay` +-- + +DROP TABLE IF EXISTS `world_map_overlay`; +CREATE TABLE `world_map_overlay` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `MapAreaID` int(10) unsigned NOT NULL DEFAULT '0', + `AreaID1` int(10) unsigned NOT NULL DEFAULT '0', + `AreaID2` int(10) unsigned NOT NULL DEFAULT '0', + `AreaID3` int(10) unsigned NOT NULL DEFAULT '0', + `AreaID4` int(10) unsigned NOT NULL DEFAULT '0', + `TextureName` text, + `TextureWidth` int(10) unsigned NOT NULL DEFAULT '0', + `TextureHeight` int(10) unsigned NOT NULL DEFAULT '0', + `OffsetX` int(10) unsigned NOT NULL DEFAULT '0', + `OffsetY` int(10) unsigned NOT NULL DEFAULT '0', + `HitRectTop` int(10) unsigned NOT NULL DEFAULT '0', + `HitRectLeft` int(10) unsigned NOT NULL DEFAULT '0', + `HitRectBottom` int(10) unsigned NOT NULL DEFAULT '0', + `HitRectRight` int(10) unsigned NOT NULL DEFAULT '0', + `PlayerConditionID` int(10) unsigned NOT NULL DEFAULT '0', + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `world_map_overlay_locale` +-- + +DROP TABLE IF EXISTS `world_map_overlay_locale`; +CREATE TABLE `world_map_overlay_locale` ( + `ID` int(10) unsigned NOT NULL DEFAULT '0', + `locale` varchar(4) NOT NULL, + `TextureName_lang` text, + `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`,`locale`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +ALTER TABLE `garr_ability` ADD `FollowerTypeID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `GarrAbilityCategoryID`; +ALTER TABLE `garr_follower` + ADD `FollowerTypeID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `ID`, + ADD `HordeListPortraitTextureKitID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `AlliancePortraitIconID`, + ADD `AllianceListPortraitTextureKitID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `HordeListPortraitTextureKitID`; +ALTER TABLE `item_effect` ADD `ChrSpecializationID` int(10) unsigned NOT NULL DEFAULT '0' AFTER `CategoryCooldown`; +ALTER TABLE `spell_misc` DROP `SpellVisualID1`. DROP `SpellVisualID2`; diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp index 06fa47cd09d..1a614ab8df5 100644 --- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp +++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp @@ -583,13 +583,13 @@ void AuctionHouseObject::BuildListAuctionItems(WorldPackets::AuctionHouse::Aucti { const ItemRandomSuffixEntry* itemRandSuffix = sItemRandomSuffixStore.LookupEntry(-propRefID); if (itemRandSuffix) - suffix = itemRandSuffix->Name_lang; + suffix = itemRandSuffix->Name->Str[player->GetSession()->GetSessionDbcLocale()]; } else { const ItemRandomPropertiesEntry* itemRandProp = sItemRandomPropertiesStore.LookupEntry(propRefID); if (itemRandProp) - suffix = itemRandProp->Name_lang; + suffix = itemRandProp->Name->Str[player->GetSession()->GetSessionDbcLocale()]; } // dbc local name diff --git a/src/server/game/Chat/ChatLink.cpp b/src/server/game/Chat/ChatLink.cpp index 89a7d64c432..9d5d518234a 100644 --- a/src/server/game/Chat/ChatLink.cpp +++ b/src/server/game/Chat/ChatLink.cpp @@ -167,13 +167,13 @@ bool ItemChatLink::Initialize(std::istringstream& iss) return true; } -inline std::string ItemChatLink::FormatName(uint8 index, char* suffixStrings) const +std::string ItemChatLink::FormatName(uint8 index, LocalizedString* suffixStrings) const { std::stringstream ss; ss << _item->GetName(LocaleConstant(index)); if (suffixStrings) - ss << ' ' << suffixStrings[index]; + ss << ' ' << suffixStrings->Str[index]; return ss.str(); } @@ -181,7 +181,7 @@ bool ItemChatLink::ValidateName(char* buffer, const char* context) { ChatLink::ValidateName(buffer, context); - char* suffixStrings = _suffix ? _suffix->Name_lang : (_property ? _property->Name_lang : NULL); + LocalizedString* suffixStrings = _suffix ? _suffix->Name : (_property ? _property->Name : NULL); bool res = (FormatName(LOCALE_enUS, suffixStrings) == buffer); if (!res) diff --git a/src/server/game/Chat/ChatLink.h b/src/server/game/Chat/ChatLink.h index 7288403280b..01855782a13 100644 --- a/src/server/game/Chat/ChatLink.h +++ b/src/server/game/Chat/ChatLink.h @@ -65,7 +65,7 @@ public: virtual bool ValidateName(char* buffer, const char* context) override; protected: - std::string FormatName(uint8 index, char* suffixStrings) const; + std::string FormatName(uint8 index, LocalizedString* suffixStrings) const; ItemTemplate const* _item; int32 _data[8]; diff --git a/src/server/game/DataStores/DB2Stores.cpp b/src/server/game/DataStores/DB2Stores.cpp index 73d5b84751e..56c0bed0396 100644 --- a/src/server/game/DataStores/DB2Stores.cpp +++ b/src/server/game/DataStores/DB2Stores.cpp @@ -16,69 +16,115 @@ */ #include "DB2Stores.h" +#include "Common.h" +#include "Containers.h" #include "DBCStores.h" #include "DB2fmt.h" -#include "Common.h" #include "Log.h" +#include "TransportMgr.h" #include "World.h" #include <functional> -DB2Storage<AreaGroupEntry> sAreaGroupStore("AreaGroup.db2", AreaGroupFormat, HOTFIX_SEL_AREA_GROUP); -DB2Storage<AreaGroupMemberEntry> sAreaGroupMemberStore("AreaGroupMember.db2", AreaGroupMemberFormat, HOTFIX_SEL_AREA_GROUP_MEMBER); -DB2Storage<BroadcastTextEntry> sBroadcastTextStore("BroadcastText.db2", BroadcastTextFormat, HOTFIX_SEL_BROADCAST_TEXT); -DB2Storage<CurrencyTypesEntry> sCurrencyTypesStore("CurrencyTypes.db2", CurrencyTypesFormat, HOTFIX_SEL_CURRENCY_TYPES); -DB2Storage<CurvePointEntry> sCurvePointStore("CurvePoint.db2", CurvePointFormat, HOTFIX_SEL_CURVE_POINT); -DB2Storage<GameObjectsEntry> sGameObjectsStore("GameObjects.db2", GameObjectsFormat, HOTFIX_SEL_GAMEOBJECTS); -DB2Storage<GameTablesEntry> sGameTablesStore("GameTables.db2", GameTablesFormat, HOTFIX_SEL_GAME_TABLES); -DB2Storage<GarrAbilityEntry> sGarrAbilityStore("GarrAbility.db2", GarrAbilityFormat, HOTFIX_SEL_GARR_ABILITY); -DB2Storage<GarrBuildingEntry> sGarrBuildingStore("GarrBuilding.db2", GarrBuildingFormat, HOTFIX_SEL_GARR_BUILDING); -DB2Storage<GarrBuildingPlotInstEntry> sGarrBuildingPlotInstStore("GarrBuildingPlotInst.db2", GarrBuildingPlotInstFormat, HOTFIX_SEL_GARR_BUILDING_PLOT_INST); -DB2Storage<GarrClassSpecEntry> sGarrClassSpecStore("GarrClassSpec.db2", GarrClassSpecFormat, HOTFIX_SEL_GARR_CLASS_SPEC); -DB2Storage<GarrFollowerEntry> sGarrFollowerStore("GarrFollower.db2", GarrFollowerFormat, HOTFIX_SEL_GARR_FOLLOWER); -DB2Storage<GarrFollowerXAbilityEntry> sGarrFollowerXAbilityStore("GarrFollowerXAbility.db2", GarrFollowerXAbilityFormat, HOTFIX_SEL_GARR_FOLLOWER_X_ABILITY); -DB2Storage<GarrPlotBuildingEntry> sGarrPlotBuildingStore("GarrPlotBuilding.db2", GarrPlotBuildingFormat, HOTFIX_SEL_GARR_PLOT_BUILDING); -DB2Storage<GarrPlotEntry> sGarrPlotStore("GarrPlot.db2", GarrPlotFormat, HOTFIX_SEL_GARR_PLOT); -DB2Storage<GarrPlotInstanceEntry> sGarrPlotInstanceStore("GarrPlotInstance.db2", GarrPlotInstanceFormat, HOTFIX_SEL_GARR_PLOT_INSTANCE); -DB2Storage<GarrSiteLevelEntry> sGarrSiteLevelStore("GarrSiteLevel.db2", GarrSiteLevelFormat, HOTFIX_SEL_GARR_SITE_LEVEL); -DB2Storage<GarrSiteLevelPlotInstEntry> sGarrSiteLevelPlotInstStore("GarrSiteLevelPlotInst.db2", GarrSiteLevelPlotInstFormat, HOTFIX_SEL_GARR_SITE_LEVEL_PLOT_INST); -DB2Storage<HolidaysEntry> sHolidaysStore("Holidays.db2", HolidaysEntryFormat, HOTFIX_SEL_HOLIDAYS); -DB2Storage<ItemAppearanceEntry> sItemAppearanceStore("ItemAppearance.db2", ItemAppearanceFormat, HOTFIX_SEL_ITEM_APPEARANCE); -DB2Storage<ItemBonusEntry> sItemBonusStore("ItemBonus.db2", ItemBonusFormat, HOTFIX_SEL_ITEM_BONUS); -DB2Storage<ItemBonusTreeNodeEntry> sItemBonusTreeNodeStore("ItemBonusTreeNode.db2", ItemBonusTreeNodeFormat, HOTFIX_SEL_ITEM_BONUS_TREE_NODE); -DB2Storage<ItemCurrencyCostEntry> sItemCurrencyCostStore("ItemCurrencyCost.db2", ItemCurrencyCostFormat, HOTFIX_SEL_ITEM_CURRENCY_COST); -DB2Storage<ItemEffectEntry> sItemEffectStore("ItemEffect.db2", ItemEffectFormat, HOTFIX_SEL_ITEM_EFFECT); -DB2Storage<ItemEntry> sItemStore("Item.db2", ItemFormat, HOTFIX_SEL_ITEM); -DB2Storage<ItemExtendedCostEntry> sItemExtendedCostStore("ItemExtendedCost.db2", ItemExtendedCostFormat, HOTFIX_SEL_ITEM_EXTENDED_COST); -DB2Storage<ItemModifiedAppearanceEntry> sItemModifiedAppearanceStore("ItemModifiedAppearance.db2", ItemModifiedAppearanceFormat, HOTFIX_SEL_ITEM_MODIFIED_APPEARANCE); -DB2Storage<ItemSparseEntry> sItemSparseStore("Item-sparse.db2", ItemSparseFormat, HOTFIX_SEL_ITEM_SPARSE); -DB2Storage<ItemXBonusTreeEntry> sItemXBonusTreeStore("ItemXBonusTree.db2", ItemXBonusTreeFormat, HOTFIX_SEL_ITEM_X_BONUS_TREE); -DB2Storage<KeyChainEntry> sKeyChainStore("KeyChain.db2", KeyChainFormat, HOTFIX_SEL_KEY_CHAIN); -DB2Storage<MountEntry> sMountStore("Mount.db2", MountFormat, HOTFIX_SEL_MOUNT); -DB2Storage<OverrideSpellDataEntry> sOverrideSpellDataStore("OverrideSpellData.db2", OverrideSpellDataFormat, HOTFIX_SEL_OVERRIDE_SPELL_DATA); -DB2Storage<PhaseXPhaseGroupEntry> sPhaseXPhaseGroupStore("PhaseXPhaseGroup.db2", PhaseXPhaseGroupFormat, HOTFIX_SEL_PHASE_GROUP); -DB2Storage<QuestPackageItemEntry> sQuestPackageItemStore("QuestPackageItem.db2", QuestPackageItemfmt, HOTFIX_SEL_QUEST_PACKAGE_ITEM); -DB2Storage<SoundEntriesEntry> sSoundEntriesStore("SoundEntries.db2", SoundEntriesFormat, HOTFIX_SEL_SOUND_ENTRIES); -DB2Storage<SpellAuraRestrictionsEntry> sSpellAuraRestrictionsStore("SpellAuraRestrictions.db2", SpellAuraRestrictionsFormat, HOTFIX_SEL_SPELL_AURA_RESTRICTIONS); -DB2Storage<SpellCastingRequirementsEntry> sSpellCastingRequirementsStore("SpellCastingRequirements.db2", SpellCastingRequirementsFormat, HOTFIX_SEL_SPELL_CASTING_REQUIREMENTS); -DB2Storage<SpellClassOptionsEntry> sSpellClassOptionsStore("SpellClassOptions.db2", SpellClassOptionsFormat, HOTFIX_SEL_SPELL_CLASS_OPTIONS); -DB2Storage<SpellLearnSpellEntry> sSpellLearnSpellStore("SpellLearnSpell.db2", SpellLearnSpellFormat, HOTFIX_SEL_SPELL_LEARN_SPELL); -DB2Storage<SpellMiscEntry> sSpellMiscStore("SpellMisc.db2", SpellMiscFormat, HOTFIX_SEL_SPELL_MISC); -DB2Storage<SpellPowerDifficultyEntry> sSpellPowerDifficultyStore("SpellPowerDifficulty.db2", SpellPowerDifficultyFormat, HOTFIX_SEL_SPELL_POWER_DIFFICULTY); -DB2Storage<SpellPowerEntry> sSpellPowerStore("SpellPower.db2", SpellPowerFormat, HOTFIX_SEL_SPELL_POWER); -DB2Storage<SpellReagentsEntry> sSpellReagentsStore("SpellReagents.db2", SpellReagentsFormat, HOTFIX_SEL_SPELL_REAGENTS); -DB2Storage<SpellRuneCostEntry> sSpellRuneCostStore("SpellRuneCost.db2", SpellRuneCostFormat, HOTFIX_SEL_SPELL_RUNE_COST); -DB2Storage<SpellTotemsEntry> sSpellTotemsStore("SpellTotems.db2", SpellTotemsFormat, HOTFIX_SEL_SPELL_TOTEMS); -DB2Storage<TaxiNodesEntry> sTaxiNodesStore("TaxiNodes.db2", TaxiNodesFormat, HOTFIX_SEL_TAXI_NODES); -DB2Storage<TaxiPathEntry> sTaxiPathStore("TaxiPath.db2", TaxiPathFormat, HOTFIX_SEL_TAXI_PATH); -DB2Storage<TaxiPathNodeEntry> sTaxiPathNodeStore("TaxiPathNode.db2", TaxiPathNodeFormat, HOTFIX_SEL_TAXI_PATH_NODE); - -TaxiMask sTaxiNodesMask; -TaxiMask sOldContinentsNodesMask; -TaxiMask sHordeTaxiNodesMask; -TaxiMask sAllianceTaxiNodesMask; -TaxiMask sDeathKnightTaxiNodesMask; -TaxiPathSetBySource sTaxiPathSetBySource; -TaxiPathNodesByPath sTaxiPathNodesByPath; +DB2Storage<AreaGroupEntry> sAreaGroupStore("AreaGroup.db2", AreaGroupFormat, HOTFIX_SEL_AREA_GROUP); +DB2Storage<AreaGroupMemberEntry> sAreaGroupMemberStore("AreaGroupMember.db2", AreaGroupMemberFormat, HOTFIX_SEL_AREA_GROUP_MEMBER); +DB2Storage<AuctionHouseEntry> sAuctionHouseStore("AuctionHouse.db2", AuctionHouseFormat, HOTFIX_SEL_AUCTION_HOUSE); +DB2Storage<BarberShopStyleEntry> sBarberShopStyleStore("BarberShopStyle.db2", BarberShopStyleFormat, HOTFIX_SEL_BARBER_SHOP_STYLE); +DB2Storage<BroadcastTextEntry> sBroadcastTextStore("BroadcastText.db2", BroadcastTextFormat, HOTFIX_SEL_BROADCAST_TEXT); +DB2Storage<CharStartOutfitEntry> sCharStartOutfitStore("CharStartOutfit.db2", CharStartOutfitFormat, HOTFIX_SEL_CHAR_START_OUTFIT); +DB2Storage<ChrClassesXPowerTypesEntry> sChrClassesXPowerTypesStore("ChrClassesXPowerTypes.db2", ChrClassesXPowerTypesFormat, HOTFIX_SEL_CHR_CLASSES_X_POWER_TYPES); +DB2Storage<CinematicSequencesEntry> sCinematicSequencesStore("CinematicSequences.db2", CinematicSequencesFormat, HOTFIX_SEL_CINEMATIC_SEQUENCES); +DB2Storage<CreatureDisplayInfoEntry> sCreatureDisplayInfoStore("CreatureDisplayInfo.db2", CreatureDisplayInfoFormat, HOTFIX_SEL_CREATURE_DISPLAY_INFO); +DB2Storage<CreatureTypeEntry> sCreatureTypeStore("CreatureType.db2", CreatureTypeFormat, HOTFIX_SEL_CREATURE_TYPE); +DB2Storage<CurrencyTypesEntry> sCurrencyTypesStore("CurrencyTypes.db2", CurrencyTypesFormat, HOTFIX_SEL_CURRENCY_TYPES); +DB2Storage<CurvePointEntry> sCurvePointStore("CurvePoint.db2", CurvePointFormat, HOTFIX_SEL_CURVE_POINT); +DB2Storage<DestructibleModelDataEntry> sDestructibleModelDataStore("DestructibleModelData.db2", DestructibleModelDataFormat, HOTFIX_SEL_DESTRUCTIBLE_MODEL_DATA); +DB2Storage<DurabilityQualityEntry> sDurabilityQualityStore("DurabilityQuality.db2", DurabilityQualityFormat, HOTFIX_SEL_DURABILITY_QUALITY); +DB2Storage<GameObjectsEntry> sGameObjectsStore("GameObjects.db2", GameObjectsFormat, HOTFIX_SEL_GAMEOBJECTS); +DB2Storage<GameTablesEntry> sGameTablesStore("GameTables.db2", GameTablesFormat, HOTFIX_SEL_GAME_TABLES); +DB2Storage<GarrAbilityEntry> sGarrAbilityStore("GarrAbility.db2", GarrAbilityFormat, HOTFIX_SEL_GARR_ABILITY); +DB2Storage<GarrBuildingEntry> sGarrBuildingStore("GarrBuilding.db2", GarrBuildingFormat, HOTFIX_SEL_GARR_BUILDING); +DB2Storage<GarrBuildingPlotInstEntry> sGarrBuildingPlotInstStore("GarrBuildingPlotInst.db2", GarrBuildingPlotInstFormat, HOTFIX_SEL_GARR_BUILDING_PLOT_INST); +DB2Storage<GarrClassSpecEntry> sGarrClassSpecStore("GarrClassSpec.db2", GarrClassSpecFormat, HOTFIX_SEL_GARR_CLASS_SPEC); +DB2Storage<GarrFollowerEntry> sGarrFollowerStore("GarrFollower.db2", GarrFollowerFormat, HOTFIX_SEL_GARR_FOLLOWER); +DB2Storage<GarrFollowerXAbilityEntry> sGarrFollowerXAbilityStore("GarrFollowerXAbility.db2", GarrFollowerXAbilityFormat, HOTFIX_SEL_GARR_FOLLOWER_X_ABILITY); +DB2Storage<GarrPlotBuildingEntry> sGarrPlotBuildingStore("GarrPlotBuilding.db2", GarrPlotBuildingFormat, HOTFIX_SEL_GARR_PLOT_BUILDING); +DB2Storage<GarrPlotEntry> sGarrPlotStore("GarrPlot.db2", GarrPlotFormat, HOTFIX_SEL_GARR_PLOT); +DB2Storage<GarrPlotInstanceEntry> sGarrPlotInstanceStore("GarrPlotInstance.db2", GarrPlotInstanceFormat, HOTFIX_SEL_GARR_PLOT_INSTANCE); +DB2Storage<GarrSiteLevelEntry> sGarrSiteLevelStore("GarrSiteLevel.db2", GarrSiteLevelFormat, HOTFIX_SEL_GARR_SITE_LEVEL); +DB2Storage<GarrSiteLevelPlotInstEntry> sGarrSiteLevelPlotInstStore("GarrSiteLevelPlotInst.db2", GarrSiteLevelPlotInstFormat, HOTFIX_SEL_GARR_SITE_LEVEL_PLOT_INST); +DB2Storage<GlyphSlotEntry> sGlyphSlotStore("GlyphSlot.db2", GlyphSlotFormat, HOTFIX_SEL_GLYPH_SLOT); +DB2Storage<GuildPerkSpellsEntry> sGuildPerkSpellsStore("GuildPerkSpells.db2", GuildPerkSpellsFormat, HOTFIX_SEL_GUILD_PERK_SPELLS); +DB2Storage<HolidaysEntry> sHolidaysStore("Holidays.db2", HolidaysEntryFormat, HOTFIX_SEL_HOLIDAYS); +DB2Storage<ImportPriceArmorEntry> sImportPriceArmorStore("ImportPriceArmor.db2", ImportPriceArmorFormat, HOTFIX_SEL_IMPORT_PRICE_ARMOR); +DB2Storage<ImportPriceQualityEntry> sImportPriceQualityStore("ImportPriceQuality.db2", ImportPriceQualityFormat, HOTFIX_SEL_IMPORT_PRICE_QUALITY); +DB2Storage<ImportPriceShieldEntry> sImportPriceShieldStore("ImportPriceShield.db2", ImportPriceShieldFormat, HOTFIX_SEL_IMPORT_PRICE_SHIELD); +DB2Storage<ImportPriceWeaponEntry> sImportPriceWeaponStore("ImportPriceWeapon.db2", ImportPriceWeaponFormat, HOTFIX_SEL_IMPORT_PRICE_WEAPON); +DB2Storage<ItemAppearanceEntry> sItemAppearanceStore("ItemAppearance.db2", ItemAppearanceFormat, HOTFIX_SEL_ITEM_APPEARANCE); +DB2Storage<ItemBonusEntry> sItemBonusStore("ItemBonus.db2", ItemBonusFormat, HOTFIX_SEL_ITEM_BONUS); +DB2Storage<ItemBonusTreeNodeEntry> sItemBonusTreeNodeStore("ItemBonusTreeNode.db2", ItemBonusTreeNodeFormat, HOTFIX_SEL_ITEM_BONUS_TREE_NODE); +DB2Storage<ItemClassEntry> sItemClassStore("ItemClass.db2", ItemClassFormat, HOTFIX_SEL_ITEM_CLASS); +DB2Storage<ItemCurrencyCostEntry> sItemCurrencyCostStore("ItemCurrencyCost.db2", ItemCurrencyCostFormat, HOTFIX_SEL_ITEM_CURRENCY_COST); +DB2Storage<ItemDisenchantLootEntry> sItemDisenchantLootStore("ItemDisenchantLoot.db2", ItemDisenchantLootFormat, HOTFIX_SEL_ITEM_DISENCHANT_LOOT); +DB2Storage<ItemEffectEntry> sItemEffectStore("ItemEffect.db2", ItemEffectFormat, HOTFIX_SEL_ITEM_EFFECT); +DB2Storage<ItemEntry> sItemStore("Item.db2", ItemFormat, HOTFIX_SEL_ITEM); +DB2Storage<ItemExtendedCostEntry> sItemExtendedCostStore("ItemExtendedCost.db2", ItemExtendedCostFormat, HOTFIX_SEL_ITEM_EXTENDED_COST); +DB2Storage<ItemLimitCategoryEntry> sItemLimitCategoryStore("ItemLimitCategory.db2", ItemLimitCategoryFormat, HOTFIX_SEL_ITEM_LIMIT_CATEGORY); +DB2Storage<ItemModifiedAppearanceEntry> sItemModifiedAppearanceStore("ItemModifiedAppearance.db2", ItemModifiedAppearanceFormat, HOTFIX_SEL_ITEM_MODIFIED_APPEARANCE); +DB2Storage<ItemPriceBaseEntry> sItemPriceBaseStore("ItemPriceBase.db2", ItemPriceBaseFormat, HOTFIX_SEL_ITEM_PRICE_BASE); +DB2Storage<ItemRandomPropertiesEntry> sItemRandomPropertiesStore("ItemRandomProperties.db2", ItemRandomPropertiesFormat, HOTFIX_SEL_ITEM_RANDOM_PROPERTIES); +DB2Storage<ItemRandomSuffixEntry> sItemRandomSuffixStore("ItemRandomSuffix.db2", ItemRandomSuffixFormat, HOTFIX_SEL_ITEM_RANDOM_SUFFIX); +DB2Storage<ItemSparseEntry> sItemSparseStore("Item-sparse.db2", ItemSparseFormat, HOTFIX_SEL_ITEM_SPARSE); +DB2Storage<ItemSpecEntry> sItemSpecStore("ItemSpec.db2", ItemSpecFormat, HOTFIX_SEL_ITEM_SPEC); +DB2Storage<ItemSpecOverrideEntry> sItemSpecOverrideStore("ItemSpecOverride.db2", ItemSpecOverrideFormat, HOTFIX_SEL_ITEM_SPEC_OVERRIDE); +DB2Storage<ItemXBonusTreeEntry> sItemXBonusTreeStore("ItemXBonusTree.db2", ItemXBonusTreeFormat, HOTFIX_SEL_ITEM_X_BONUS_TREE); +DB2Storage<KeyChainEntry> sKeyChainStore("KeyChain.db2", KeyChainFormat, HOTFIX_SEL_KEY_CHAIN); +DB2Storage<MailTemplateEntry> sMailTemplateStore("MailTemplate.db2", MailTemplateFormat, HOTFIX_SEL_MAIL_TEMPLATE); +DB2Storage<MountCapabilityEntry> sMountCapabilityStore("MountCapability.db2", MountCapabilityFormat, HOTFIX_SEL_MOUNT_CAPABILITY); +DB2Storage<MountEntry> sMountStore("Mount.db2", MountFormat, HOTFIX_SEL_MOUNT); +DB2Storage<MountTypeXCapabilityEntry> sMountTypeXCapabilityStore("MountTypeXCapability.db2", MountTypeXCapabilityFormat, HOTFIX_SEL_MOUNT_TYPE_X_CAPABILITY); +DB2Storage<NameGenEntry> sNameGenStore("NameGen.db2", NameGenFormat, HOTFIX_SEL_NAME_GEN); +DB2Storage<OverrideSpellDataEntry> sOverrideSpellDataStore("OverrideSpellData.db2", OverrideSpellDataFormat, HOTFIX_SEL_OVERRIDE_SPELL_DATA); +DB2Storage<PhaseXPhaseGroupEntry> sPhaseXPhaseGroupStore("PhaseXPhaseGroup.db2", PhaseXPhaseGroupFormat, HOTFIX_SEL_PHASE_X_PHASE_GROUP); +DB2Storage<QuestMoneyRewardEntry> sQuestMoneyRewardStore("QuestMoneyReward.db2", QuestMoneyRewardFormat, HOTFIX_SEL_QUEST_MONEY_REWARD); +DB2Storage<QuestPackageItemEntry> sQuestPackageItemStore("QuestPackageItem.db2", QuestPackageItemfmt, HOTFIX_SEL_QUEST_PACKAGE_ITEM); +DB2Storage<QuestSortEntry> sQuestSortStore("QuestSort.db2", QuestSortFormat, HOTFIX_SEL_QUEST_SORT); +DB2Storage<QuestV2Entry> sQuestV2Store("QuestV2.db2", QuestV2Format, HOTFIX_SEL_QUEST_V2); +DB2Storage<QuestXPEntry> sQuestXPStore("QuestXP.db2", QuestXPFormat, HOTFIX_SEL_QUEST_XP); +DB2Storage<ScalingStatDistributionEntry> sScalingStatDistributionStore("ScalingStatDistribution.db2", ScalingStatDistributionFormat, HOTFIX_SEL_SCALING_STAT_DISTRIBUTION); +DB2Storage<SoundEntriesEntry> sSoundEntriesStore("SoundEntries.db2", SoundEntriesFormat, HOTFIX_SEL_SOUND_ENTRIES); +DB2Storage<SpecializationSpellsEntry> sSpecializationSpellsStore("SpecializationSpells.db2", SpecializationSpellsFormat, HOTFIX_SEL_SPECIALIZATION_SPELLS); +DB2Storage<SpellAuraRestrictionsEntry> sSpellAuraRestrictionsStore("SpellAuraRestrictions.db2", SpellAuraRestrictionsFormat, HOTFIX_SEL_SPELL_AURA_RESTRICTIONS); +DB2Storage<SpellCastTimesEntry> sSpellCastTimesStore("SpellCastTimes.db2", SpellCastTimesFormat, HOTFIX_SEL_SPELL_CAST_TIMES); +DB2Storage<SpellCastingRequirementsEntry> sSpellCastingRequirementsStore("SpellCastingRequirements.db2", SpellCastingRequirementsFormat, HOTFIX_SEL_SPELL_CASTING_REQUIREMENTS); +DB2Storage<SpellClassOptionsEntry> sSpellClassOptionsStore("SpellClassOptions.db2", SpellClassOptionsFormat, HOTFIX_SEL_SPELL_CLASS_OPTIONS); +DB2Storage<SpellDurationEntry> sSpellDurationStore("SpellDuration.db2", SpellDurationFormat, HOTFIX_SEL_SPELL_DURATION); +DB2Storage<SpellItemEnchantmentConditionEntry> sSpellItemEnchantmentConditionStore("SpellItemEnchantmentCondition.db2", SpellItemEnchantmentConditionFormat, HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT_CONDITION); +DB2Storage<SpellLearnSpellEntry> sSpellLearnSpellStore("SpellLearnSpell.db2", SpellLearnSpellFormat, HOTFIX_SEL_SPELL_LEARN_SPELL); +DB2Storage<SpellMiscEntry> sSpellMiscStore("SpellMisc.db2", SpellMiscFormat, HOTFIX_SEL_SPELL_MISC); +DB2Storage<SpellPowerDifficultyEntry> sSpellPowerDifficultyStore("SpellPowerDifficulty.db2", SpellPowerDifficultyFormat, HOTFIX_SEL_SPELL_POWER_DIFFICULTY); +DB2Storage<SpellPowerEntry> sSpellPowerStore("SpellPower.db2", SpellPowerFormat, HOTFIX_SEL_SPELL_POWER); +DB2Storage<SpellRadiusEntry> sSpellRadiusStore("SpellRadius.db2", SpellRadiusFormat, HOTFIX_SEL_SPELL_RADIUS); +DB2Storage<SpellRangeEntry> sSpellRangeStore("SpellRange.db2", SpellRangeFormat, HOTFIX_SEL_SPELL_RANGE); +DB2Storage<SpellReagentsEntry> sSpellReagentsStore("SpellReagents.db2", SpellReagentsFormat, HOTFIX_SEL_SPELL_REAGENTS); +DB2Storage<SpellRuneCostEntry> sSpellRuneCostStore("SpellRuneCost.db2", SpellRuneCostFormat, HOTFIX_SEL_SPELL_RUNE_COST); +DB2Storage<SpellTotemsEntry> sSpellTotemsStore("SpellTotems.db2", SpellTotemsFormat, HOTFIX_SEL_SPELL_TOTEMS); +DB2Storage<SpellXSpellVisualEntry> sSpellXSpellVisualStore("SpellXSpellVisual.db2", SpellXSpellVisualFormat, HOTFIX_SEL_SPELL_X_SPELL_VISUAL); +DB2Storage<TaxiNodesEntry> sTaxiNodesStore("TaxiNodes.db2", TaxiNodesFormat, HOTFIX_SEL_TAXI_NODES); +DB2Storage<TaxiPathEntry> sTaxiPathStore("TaxiPath.db2", TaxiPathFormat, HOTFIX_SEL_TAXI_PATH); +DB2Storage<TaxiPathNodeEntry> sTaxiPathNodeStore("TaxiPathNode.db2", TaxiPathNodeFormat, HOTFIX_SEL_TAXI_PATH_NODE); +DB2Storage<TotemCategoryEntry> sTotemCategoryStore("TotemCategory.db2", TotemCategoryFormat, HOTFIX_SEL_TOTEM_CATEGORY); +DB2Storage<TransportAnimationEntry> sTransportAnimationStore("TransportAnimation.db2", TransportAnimationFormat, HOTFIX_SEL_TRANSPORT_ANIMATION); +DB2Storage<TransportRotationEntry> sTransportRotationStore("TransportRotation.db2", TransportRotationFormat, HOTFIX_SEL_TRANSPORT_ROTATION); +DB2Storage<UnitPowerBarEntry> sUnitPowerBarStore("UnitPowerBar.db2", UnitPowerBarFormat, HOTFIX_SEL_UNIT_POWER_BAR); +DB2Storage<WorldMapOverlayEntry> sWorldMapOverlayStore("WorldMapOverlay.db2", WorldMapOverlayFormat, HOTFIX_SEL_WORLD_MAP_OVERLAY); + +TaxiMask sTaxiNodesMask; +TaxiMask sOldContinentsNodesMask; +TaxiMask sHordeTaxiNodesMask; +TaxiMask sAllianceTaxiNodesMask; +TaxiMask sDeathKnightTaxiNodesMask; +TaxiPathSetBySource sTaxiPathSetBySource; +TaxiPathNodesByPath sTaxiPathNodesByPath; typedef std::list<std::string> DB2StoreProblemList; @@ -142,14 +188,23 @@ void DB2Manager::LoadStores(std::string const& dataPath) LOAD_DB2(sAreaGroupMemberStore); LOAD_DB2(sAreaGroupStore); + LOAD_DB2(sAuctionHouseStore); + LOAD_DB2(sBarberShopStyleStore); LOAD_DB2(sBroadcastTextStore); + LOAD_DB2(sCharStartOutfitStore); + LOAD_DB2(sChrClassesXPowerTypesStore); + LOAD_DB2(sCinematicSequencesStore); + LOAD_DB2(sCreatureDisplayInfoStore); + LOAD_DB2(sCreatureTypeStore); LOAD_DB2(sCurrencyTypesStore); LOAD_DB2(sCurvePointStore); + LOAD_DB2(sDestructibleModelDataStore); + LOAD_DB2(sDurabilityQualityStore); LOAD_DB2(sGameObjectsStore); LOAD_DB2(sGameTablesStore); LOAD_DB2(sGarrAbilityStore); - LOAD_DB2(sGarrBuildingStore); LOAD_DB2(sGarrBuildingPlotInstStore); + LOAD_DB2(sGarrBuildingStore); LOAD_DB2(sGarrClassSpecStore); LOAD_DB2(sGarrFollowerStore); LOAD_DB2(sGarrFollowerXAbilityStore); @@ -158,42 +213,97 @@ void DB2Manager::LoadStores(std::string const& dataPath) LOAD_DB2(sGarrPlotStore); LOAD_DB2(sGarrSiteLevelPlotInstStore); LOAD_DB2(sGarrSiteLevelStore); + LOAD_DB2(sGlyphSlotStore); + LOAD_DB2(sGuildPerkSpellsStore); LOAD_DB2(sHolidaysStore); + LOAD_DB2(sImportPriceArmorStore); + LOAD_DB2(sImportPriceQualityStore); + LOAD_DB2(sImportPriceShieldStore); + LOAD_DB2(sImportPriceWeaponStore); LOAD_DB2(sItemAppearanceStore); LOAD_DB2(sItemBonusStore); LOAD_DB2(sItemBonusTreeNodeStore); + LOAD_DB2(sItemClassStore); LOAD_DB2(sItemCurrencyCostStore); + LOAD_DB2(sItemDisenchantLootStore); LOAD_DB2(sItemEffectStore); LOAD_DB2(sItemExtendedCostStore); + LOAD_DB2(sItemLimitCategoryStore); LOAD_DB2(sItemModifiedAppearanceStore); + LOAD_DB2(sItemPriceBaseStore); + LOAD_DB2(sItemRandomPropertiesStore); + LOAD_DB2(sItemRandomSuffixStore); LOAD_DB2(sItemSparseStore); + LOAD_DB2(sItemSpecOverrideStore); + LOAD_DB2(sItemSpecStore); LOAD_DB2(sItemStore); LOAD_DB2(sItemXBonusTreeStore); LOAD_DB2(sKeyChainStore); + LOAD_DB2(sMailTemplateStore); + LOAD_DB2(sMountCapabilityStore); LOAD_DB2(sMountStore); + LOAD_DB2(sMountTypeXCapabilityStore); + LOAD_DB2(sNameGenStore); LOAD_DB2(sOverrideSpellDataStore); LOAD_DB2(sPhaseXPhaseGroupStore); + LOAD_DB2(sQuestMoneyRewardStore); LOAD_DB2(sQuestPackageItemStore); + LOAD_DB2(sQuestSortStore); + LOAD_DB2(sQuestV2Store); + LOAD_DB2(sQuestXPStore); + LOAD_DB2(sScalingStatDistributionStore); LOAD_DB2(sSoundEntriesStore); + LOAD_DB2(sSpecializationSpellsStore); LOAD_DB2(sSpellAuraRestrictionsStore); + LOAD_DB2(sSpellCastTimesStore); LOAD_DB2(sSpellCastingRequirementsStore); LOAD_DB2(sSpellClassOptionsStore); + LOAD_DB2(sSpellDurationStore); + LOAD_DB2(sSpellItemEnchantmentConditionStore); LOAD_DB2(sSpellLearnSpellStore); LOAD_DB2(sSpellMiscStore); LOAD_DB2(sSpellPowerDifficultyStore); LOAD_DB2(sSpellPowerStore); + LOAD_DB2(sSpellRadiusStore); + LOAD_DB2(sSpellRangeStore); LOAD_DB2(sSpellReagentsStore); LOAD_DB2(sSpellRuneCostStore); LOAD_DB2(sSpellTotemsStore); + LOAD_DB2(sSpellXSpellVisualStore); LOAD_DB2(sTaxiNodesStore); LOAD_DB2(sTaxiPathNodeStore); LOAD_DB2(sTaxiPathStore); + LOAD_DB2(sTotemCategoryStore); + LOAD_DB2(sTransportAnimationStore); + LOAD_DB2(sTransportRotationStore); + LOAD_DB2(sUnitPowerBarStore); + LOAD_DB2(sWorldMapOverlayStore); #undef LOAD_DB2 for (AreaGroupMemberEntry const* areaGroupMember : sAreaGroupMemberStore) _areaGroupMembers[areaGroupMember->AreaGroupID].push_back(areaGroupMember->AreaID); + for (CharStartOutfitEntry const* outfit : sCharStartOutfitStore) + _charStartOutfits[outfit->RaceID | (outfit->ClassID << 8) | (outfit->GenderID << 16)] = outfit; + + for (uint32 i = 0; i < MAX_CLASSES; ++i) + for (uint32 j = 0; j < MAX_POWERS; ++j) + _powersByClass[i][j] = MAX_POWERS; + + for (uint32 i = 0; i < sChrClassesXPowerTypesStore.GetNumRows(); ++i) + { + if (ChrClassesXPowerTypesEntry const* power = sChrClassesXPowerTypesStore.LookupEntry(i)) + { + uint32 index = 0; + for (uint32 j = 0; j < MAX_POWERS; ++j) + if (_powersByClass[power->ClassID][j] != MAX_POWERS) + ++index; + + _powersByClass[power->ClassID][power->PowerType] = index; + } + } + for (ItemBonusEntry const* bonus : sItemBonusStore) _itemBonusLists[bonus->BonusListID].push_back(bonus); @@ -211,6 +321,9 @@ void DB2Manager::LoadStores(std::string const& dataPath) if (ItemAppearanceEntry const* appearance = sItemAppearanceStore.LookupEntry(appearanceMod->AppearanceID)) _itemDisplayIDs[appearanceMod->ItemID | (appearanceMod->AppearanceModID << 24)] = appearance->DisplayID; + for (ItemSpecOverrideEntry const* entry : sItemSpecOverrideStore) + _itemSpecOverrides[entry->ItemID].push_back(entry); + for (ItemXBonusTreeEntry const* itemBonusTreeAssignment : sItemXBonusTreeStore) _itemToBonusTree.insert({ itemBonusTreeAssignment->ItemID, itemBonusTreeAssignment->BonusTreeID }); @@ -227,6 +340,12 @@ void DB2Manager::LoadStores(std::string const& dataPath) for (MountEntry const* mount : sMountStore) _mountsBySpellId[mount->SpellId] = mount; + for (MountTypeXCapabilityEntry const* mount : sMountTypeXCapabilityStore) + _mountCapabilitiesByType[mount->MountTypeID].insert(mount); + + for (NameGenEntry const* entry : sNameGenStore) + _nameGenData[entry->Race][entry->Sex].push_back(entry); + for (PhaseXPhaseGroupEntry const* group : sPhaseXPhaseGroupStore) if (PhaseEntry const* phase = sPhaseStore.LookupEntry(group->PhaseID)) _phasesByGroup[group->PhaseGroupID].insert(phase->ID); @@ -234,6 +353,9 @@ void DB2Manager::LoadStores(std::string const& dataPath) for (QuestPackageItemEntry const* questPackageItem : sQuestPackageItemStore) _questPackages[questPackageItem->QuestPackageID].push_back(questPackageItem); + for (SpecializationSpellsEntry const* specSpells : sSpecializationSpellsStore) + _specializationSpellsBySpec[specSpells->SpecID].push_back(specSpells); + for (SpellPowerEntry const* power : sSpellPowerStore) { if (SpellPowerDifficultyEntry const* powerDifficulty = sSpellPowerDifficultyStore.LookupEntry(power->ID)) @@ -337,6 +459,12 @@ void DB2Manager::LoadStores(std::string const& dataPath) } } + for (TransportAnimationEntry const* anim : sTransportAnimationStore) + sTransportMgr->AddPathNodeToTransport(anim->TransportID, anim->TimeIndex, anim); + + for (TransportRotationEntry const* rot : sTransportRotationStore) + sTransportMgr->AddPathRotationToTransport(rot->TransportID, rot->TimeIndex, rot); + // error checks if (bad_db2_files.size() >= DB2FilesCount) { @@ -448,6 +576,20 @@ char const* DB2Manager::GetBroadcastTextValue(BroadcastTextEntry const* broadcas return broadcastText->MaleText->Str[DEFAULT_LOCALE]; } +CharStartOutfitEntry const* DB2Manager::GetCharStartOutfitEntry(uint8 race, uint8 class_, uint8 gender) const +{ + auto itr = _charStartOutfits.find(race | (class_ << 8) | (gender << 16)); + if (itr == _charStartOutfits.end()) + return nullptr; + + return itr->second; +} + +uint32 DB2Manager::GetPowerIndexByClass(uint32 powerType, uint32 classId) const +{ + return _powersByClass[classId][powerType]; +} + uint32 DB2Manager::GetHeirloomItemLevel(uint32 curveId, uint32 level) const { // Assuming linear item level scaling for heirlooms @@ -514,6 +656,32 @@ uint32 DB2Manager::GetItemDisplayId(uint32 itemId, uint32 appearanceModId) const return 0; } +std::vector<ItemSpecOverrideEntry const*> const* DB2Manager::GetItemSpecOverrides(uint32 itemId) const +{ + auto itr = _itemSpecOverrides.find(itemId); + if (itr != _itemSpecOverrides.end()) + return &itr->second; + + return nullptr; +} + +std::string DB2Manager::GetNameGenEntry(uint8 race, uint8 gender, LocaleConstant locale) const +{ + ASSERT(gender < GENDER_NONE); + auto ritr = _nameGenData.find(race); + if (ritr == _nameGenData.end()) + return ""; + + if (ritr->second[gender].empty()) + return ""; + + LocalizedString* data = Trinity::Containers::SelectRandomContainerElement(ritr->second[gender])->Name; + if (*data->Str[locale] != '\0') + return data->Str[locale]; + + return data->Str[sWorld->GetDefaultDbcLocale()]; +} + MountEntry const* DB2Manager::GetMount(uint32 spellId) const { auto itr = _mountsBySpellId.find(spellId); @@ -528,6 +696,15 @@ MountEntry const* DB2Manager::GetMountById(uint32 id) const return sMountStore.LookupEntry(id); } +DB2Manager::MountTypeXCapabilitySet const* DB2Manager::GetMountCapabilities(uint32 mountType) const +{ + auto itr = _mountCapabilitiesByType.find(mountType); + if (itr != _mountCapabilitiesByType.end()) + return &itr->second; + + return nullptr; +} + std::vector<QuestPackageItemEntry const*> const* DB2Manager::GetQuestPackageItems(uint32 questPackageID) const { auto itr = _questPackages.find(questPackageID); @@ -537,6 +714,15 @@ std::vector<QuestPackageItemEntry const*> const* DB2Manager::GetQuestPackageItem return nullptr; } +uint32 DB2Manager::GetQuestUniqueBitFlag(uint32 questId) +{ + QuestV2Entry const* v2 = sQuestV2Store.LookupEntry(questId); + if (!v2) + return 0; + + return v2->UniqueBitFlag; +} + std::set<uint32> DB2Manager::GetPhasesForGroup(uint32 group) const { auto itr = _phasesByGroup.find(group); @@ -546,6 +732,15 @@ std::set<uint32> DB2Manager::GetPhasesForGroup(uint32 group) const return std::set<uint32>(); } +std::vector<SpecializationSpellsEntry const*> const* DB2Manager::GetSpecializationSpells(uint32 specId) const +{ + auto itr = _specializationSpellsBySpec.find(specId); + if (itr != _specializationSpellsBySpec.end()) + return &itr->second; + + return nullptr; +} + std::vector<SpellPowerEntry const*> DB2Manager::GetSpellPowers(uint32 spellId, Difficulty difficulty /*= DIFFICULTY_NONE*/, bool* hasDifficultyPowers /*= nullptr*/) const { std::vector<SpellPowerEntry const*> powers; diff --git a/src/server/game/DataStores/DB2Stores.h b/src/server/game/DataStores/DB2Stores.h index e0fc566f22b..50583d487f1 100644 --- a/src/server/game/DataStores/DB2Stores.h +++ b/src/server/game/DataStores/DB2Stores.h @@ -21,49 +21,87 @@ #include "DB2Store.h" #include "DB2Structure.h" #include "SharedDefines.h" +#include <array> -extern DB2Storage<BroadcastTextEntry> sBroadcastTextStore; -extern DB2Storage<CurrencyTypesEntry> sCurrencyTypesStore; -extern DB2Storage<GameObjectsEntry> sGameObjectsStore; -extern DB2Storage<GameTablesEntry> sGameTablesStore; -extern DB2Storage<GarrAbilityEntry> sGarrAbilityStore; -extern DB2Storage<GarrBuildingEntry> sGarrBuildingStore; -extern DB2Storage<GarrBuildingPlotInstEntry> sGarrBuildingPlotInstStore; -extern DB2Storage<GarrClassSpecEntry> sGarrClassSpecStore; -extern DB2Storage<GarrFollowerEntry> sGarrFollowerStore; -extern DB2Storage<GarrFollowerXAbilityEntry> sGarrFollowerXAbilityStore; -extern DB2Storage<GarrPlotBuildingEntry> sGarrPlotBuildingStore; -extern DB2Storage<GarrPlotEntry> sGarrPlotStore; -extern DB2Storage<GarrPlotInstanceEntry> sGarrPlotInstanceStore; -extern DB2Storage<GarrSiteLevelEntry> sGarrSiteLevelStore; -extern DB2Storage<GarrSiteLevelPlotInstEntry> sGarrSiteLevelPlotInstStore; -extern DB2Storage<HolidaysEntry> sHolidaysStore; -extern DB2Storage<ItemCurrencyCostEntry> sItemCurrencyCostStore; -extern DB2Storage<ItemEffectEntry> sItemEffectStore; -extern DB2Storage<ItemEntry> sItemStore; -extern DB2Storage<ItemExtendedCostEntry> sItemExtendedCostStore; -extern DB2Storage<ItemSparseEntry> sItemSparseStore; -extern DB2Storage<OverrideSpellDataEntry> sOverrideSpellDataStore; -extern DB2Storage<SoundEntriesEntry> sSoundEntriesStore; -extern DB2Storage<SpellAuraRestrictionsEntry> sSpellAuraRestrictionsStore; -extern DB2Storage<SpellCastingRequirementsEntry> sSpellCastingRequirementsStore; -extern DB2Storage<SpellClassOptionsEntry> sSpellClassOptionsStore; -extern DB2Storage<SpellLearnSpellEntry> sSpellLearnSpellStore; -extern DB2Storage<SpellMiscEntry> sSpellMiscStore; -extern DB2Storage<SpellPowerEntry> sSpellPowerStore; -extern DB2Storage<SpellReagentsEntry> sSpellReagentsStore; -extern DB2Storage<SpellRuneCostEntry> sSpellRuneCostStore; -extern DB2Storage<SpellTotemsEntry> sSpellTotemsStore; -extern DB2Storage<TaxiNodesEntry> sTaxiNodesStore; -extern DB2Storage<TaxiPathEntry> sTaxiPathStore; - -extern TaxiMask sTaxiNodesMask; -extern TaxiMask sOldContinentsNodesMask; -extern TaxiMask sHordeTaxiNodesMask; -extern TaxiMask sAllianceTaxiNodesMask; -extern TaxiMask sDeathKnightTaxiNodesMask; -extern TaxiPathSetBySource sTaxiPathSetBySource; -extern TaxiPathNodesByPath sTaxiPathNodesByPath; +extern DB2Storage<AuctionHouseEntry> sAuctionHouseStore; +extern DB2Storage<BarberShopStyleEntry> sBarberShopStyleStore; +extern DB2Storage<BroadcastTextEntry> sBroadcastTextStore; +extern DB2Storage<CharStartOutfitEntry> sCharStartOutfitStore; +extern DB2Storage<CinematicSequencesEntry> sCinematicSequencesStore; +extern DB2Storage<CreatureDisplayInfoEntry> sCreatureDisplayInfoStore; +extern DB2Storage<CreatureTypeEntry> sCreatureTypeStore; +extern DB2Storage<CurrencyTypesEntry> sCurrencyTypesStore; +extern DB2Storage<DestructibleModelDataEntry> sDestructibleModelDataStore; +extern DB2Storage<DurabilityQualityEntry> sDurabilityQualityStore; +extern DB2Storage<GameObjectsEntry> sGameObjectsStore; +extern DB2Storage<GameTablesEntry> sGameTablesStore; +extern DB2Storage<GarrAbilityEntry> sGarrAbilityStore; +extern DB2Storage<GarrBuildingEntry> sGarrBuildingStore; +extern DB2Storage<GarrBuildingPlotInstEntry> sGarrBuildingPlotInstStore; +extern DB2Storage<GarrClassSpecEntry> sGarrClassSpecStore; +extern DB2Storage<GarrFollowerEntry> sGarrFollowerStore; +extern DB2Storage<GarrFollowerXAbilityEntry> sGarrFollowerXAbilityStore; +extern DB2Storage<GarrPlotBuildingEntry> sGarrPlotBuildingStore; +extern DB2Storage<GarrPlotEntry> sGarrPlotStore; +extern DB2Storage<GarrPlotInstanceEntry> sGarrPlotInstanceStore; +extern DB2Storage<GarrSiteLevelEntry> sGarrSiteLevelStore; +extern DB2Storage<GarrSiteLevelPlotInstEntry> sGarrSiteLevelPlotInstStore; +extern DB2Storage<GlyphSlotEntry> sGlyphSlotStore; +extern DB2Storage<GuildPerkSpellsEntry> sGuildPerkSpellsStore; +extern DB2Storage<HolidaysEntry> sHolidaysStore; +extern DB2Storage<ImportPriceArmorEntry> sImportPriceArmorStore; +extern DB2Storage<ImportPriceQualityEntry> sImportPriceQualityStore; +extern DB2Storage<ImportPriceShieldEntry> sImportPriceShieldStore; +extern DB2Storage<ImportPriceWeaponEntry> sImportPriceWeaponStore; +extern DB2Storage<ItemClassEntry> sItemClassStore; +extern DB2Storage<ItemCurrencyCostEntry> sItemCurrencyCostStore; +extern DB2Storage<ItemDisenchantLootEntry> sItemDisenchantLootStore; +extern DB2Storage<ItemEffectEntry> sItemEffectStore; +extern DB2Storage<ItemEntry> sItemStore; +extern DB2Storage<ItemExtendedCostEntry> sItemExtendedCostStore; +extern DB2Storage<ItemLimitCategoryEntry> sItemLimitCategoryStore; +extern DB2Storage<ItemPriceBaseEntry> sItemPriceBaseStore; +extern DB2Storage<ItemRandomPropertiesEntry> sItemRandomPropertiesStore; +extern DB2Storage<ItemRandomSuffixEntry> sItemRandomSuffixStore; +extern DB2Storage<ItemSparseEntry> sItemSparseStore; +extern DB2Storage<ItemSpecEntry> sItemSpecStore; +extern DB2Storage<ItemSpecOverrideEntry> sItemSpecOverrideStore; +extern DB2Storage<MailTemplateEntry> sMailTemplateStore; +extern DB2Storage<MountCapabilityEntry> sMountCapabilityStore; +extern DB2Storage<OverrideSpellDataEntry> sOverrideSpellDataStore; +extern DB2Storage<QuestMoneyRewardEntry> sQuestMoneyRewardStore; +extern DB2Storage<QuestSortEntry> sQuestSortStore; +extern DB2Storage<QuestXPEntry> sQuestXPStore; +extern DB2Storage<ScalingStatDistributionEntry> sScalingStatDistributionStore; +extern DB2Storage<SoundEntriesEntry> sSoundEntriesStore; +extern DB2Storage<SpellAuraRestrictionsEntry> sSpellAuraRestrictionsStore; +extern DB2Storage<SpellCastTimesEntry> sSpellCastTimesStore; +extern DB2Storage<SpellCastingRequirementsEntry> sSpellCastingRequirementsStore; +extern DB2Storage<SpellClassOptionsEntry> sSpellClassOptionsStore; +extern DB2Storage<SpellDurationEntry> sSpellDurationStore; +extern DB2Storage<SpellItemEnchantmentConditionEntry> sSpellItemEnchantmentConditionStore; +extern DB2Storage<SpellLearnSpellEntry> sSpellLearnSpellStore; +extern DB2Storage<SpellMiscEntry> sSpellMiscStore; +extern DB2Storage<SpellPowerEntry> sSpellPowerStore; +extern DB2Storage<SpellRadiusEntry> sSpellRadiusStore; +extern DB2Storage<SpellRangeEntry> sSpellRangeStore; +extern DB2Storage<SpellReagentsEntry> sSpellReagentsStore; +extern DB2Storage<SpellRuneCostEntry> sSpellRuneCostStore; +extern DB2Storage<SpellTotemsEntry> sSpellTotemsStore; +extern DB2Storage<SpellXSpellVisualEntry> sSpellXSpellVisualStore; +extern DB2Storage<TaxiNodesEntry> sTaxiNodesStore; +extern DB2Storage<TaxiPathEntry> sTaxiPathStore; +extern DB2Storage<TotemCategoryEntry> sTotemCategoryStore; +extern DB2Storage<UnitPowerBarEntry> sUnitPowerBarStore; +extern DB2Storage<WorldMapOverlayEntry> sWorldMapOverlayStore; + +extern TaxiMask sTaxiNodesMask; +extern TaxiMask sOldContinentsNodesMask; +extern TaxiMask sHordeTaxiNodesMask; +extern TaxiMask sAllianceTaxiNodesMask; +extern TaxiMask sDeathKnightTaxiNodesMask; +extern TaxiPathSetBySource sTaxiPathSetBySource; +extern TaxiPathNodesByPath sTaxiPathNodesByPath; struct HotfixNotify { @@ -77,17 +115,33 @@ typedef std::vector<HotfixNotify> HotfixData; class DB2Manager { public: + struct MountTypeXCapabilityComparator : public std::binary_function<MountTypeXCapabilityEntry const*, MountTypeXCapabilityEntry const*, bool> + { + bool operator()(MountTypeXCapabilityEntry const* left, MountTypeXCapabilityEntry const* right) const + { + if (left->MountTypeID == right->MountTypeID) + return left->OrderIndex > right->OrderIndex; + return left->ID < right->ID; + } + }; + typedef std::map<uint32 /*hash*/, DB2StorageBase*> StorageMap; typedef std::unordered_map<uint32 /*areaGroupId*/, std::vector<uint32/*areaId*/>> AreaGroupMemberContainer; + typedef std::unordered_map<uint32, CharStartOutfitEntry const*> CharStartOutfitContainer; typedef std::map<uint32 /*curveID*/, std::map<uint32/*index*/, CurvePointEntry const*, std::greater<uint32>>> HeirloomCurvesContainer; typedef std::vector<ItemBonusEntry const*> ItemBonusList; typedef std::unordered_map<uint32 /*bonusListId*/, ItemBonusList> ItemBonusListContainer; typedef std::unordered_multimap<uint32 /*itemId*/, uint32 /*bonusTreeId*/> ItemToBonusTreeContainer; typedef std::unordered_map<uint32 /*itemId | appearanceMod << 24*/, uint32> ItemDisplayIdContainer; typedef std::unordered_map<uint32, std::set<ItemBonusTreeNodeEntry const*>> ItemBonusTreeContainer; + typedef std::unordered_map<uint32, std::vector<ItemSpecOverrideEntry const*>> ItemSpecOverridesContainer; typedef std::unordered_map<uint32, MountEntry const*> MountContainer; + typedef std::set<MountTypeXCapabilityEntry const*, MountTypeXCapabilityComparator> MountTypeXCapabilitySet; + typedef std::unordered_map<uint32, MountTypeXCapabilitySet> MountCapabilitiesByTypeContainer; + typedef std::unordered_map<uint32, std::array<std::vector<NameGenEntry const*>, 2>> NameGenContainer; typedef std::unordered_map<uint32, std::set<uint32>> PhaseGroupContainer; typedef std::unordered_map<uint32, std::vector<QuestPackageItemEntry const*>> QuestPackageItemContainer; + typedef std::unordered_map<uint32, std::vector<SpecializationSpellsEntry const*>> SpecializationSpellsContainer; typedef std::unordered_map<uint32, std::vector<SpellPowerEntry const*>> SpellPowerContainer; typedef std::unordered_map<uint32, std::unordered_map<uint32, std::vector<SpellPowerEntry const*>>> SpellPowerDifficultyContainer; @@ -106,14 +160,21 @@ public: std::vector<uint32> GetAreasForGroup(uint32 areaGroupId) const; static char const* GetBroadcastTextValue(BroadcastTextEntry const* broadcastText, LocaleConstant locale = DEFAULT_LOCALE, uint8 gender = GENDER_MALE, bool forceGender = false); + CharStartOutfitEntry const* GetCharStartOutfitEntry(uint8 race, uint8 class_, uint8 gender) const; + uint32 GetPowerIndexByClass(uint32 powerType, uint32 classId) const; uint32 GetHeirloomItemLevel(uint32 curveId, uint32 level) const; ItemBonusList GetItemBonusList(uint32 bonusListId) const; std::set<uint32> GetItemBonusTree(uint32 itemId, uint32 itemBonusTreeMod) const; uint32 GetItemDisplayId(uint32 itemId, uint32 appearanceModId) const; + std::vector<ItemSpecOverrideEntry const*> const* GetItemSpecOverrides(uint32 itemId) const; + std::string GetNameGenEntry(uint8 race, uint8 gender, LocaleConstant locale) const; MountEntry const* GetMount(uint32 spellId) const; MountEntry const* GetMountById(uint32 id) const; + MountTypeXCapabilitySet const* GetMountCapabilities(uint32 mountType) const; std::vector<QuestPackageItemEntry const*> const* GetQuestPackageItems(uint32 questPackageID) const; + uint32 GetQuestUniqueBitFlag(uint32 questId); std::set<uint32> GetPhasesForGroup(uint32 group) const; + std::vector<SpecializationSpellsEntry const*> const* GetSpecializationSpells(uint32 specId) const; std::vector<SpellPowerEntry const*> GetSpellPowers(uint32 spellId, Difficulty difficulty = DIFFICULTY_NONE, bool* hasDifficultyPowers = nullptr) const; private: @@ -121,14 +182,20 @@ private: HotfixData _hotfixData; AreaGroupMemberContainer _areaGroupMembers; + CharStartOutfitContainer _charStartOutfits; + uint32 _powersByClass[MAX_CLASSES][MAX_POWERS]; HeirloomCurvesContainer _heirloomCurvePoints; ItemBonusListContainer _itemBonusLists; ItemBonusTreeContainer _itemBonusTrees; ItemDisplayIdContainer _itemDisplayIDs; ItemToBonusTreeContainer _itemToBonusTree; + ItemSpecOverridesContainer _itemSpecOverrides; MountContainer _mountsBySpellId; + MountCapabilitiesByTypeContainer _mountCapabilitiesByType; + NameGenContainer _nameGenData; PhaseGroupContainer _phasesByGroup; QuestPackageItemContainer _questPackages; + SpecializationSpellsContainer _specializationSpellsBySpec; SpellPowerContainer _spellPowers; SpellPowerDifficultyContainer _spellPowerDifficulties; }; diff --git a/src/server/game/DataStores/DB2Structure.h b/src/server/game/DataStores/DB2Structure.h index 83dff71d095..c84996a524e 100644 --- a/src/server/game/DataStores/DB2Structure.h +++ b/src/server/game/DataStores/DB2Structure.h @@ -24,26 +24,41 @@ #pragma pack(push, 1) -#define MAX_BROADCAST_TEXT_EMOTES 3 -#define MAX_HOLIDAY_DURATIONS 10 -#define MAX_HOLIDAY_DATES 16 -#define MAX_HOLIDAY_FLAGS 10 -#define MAX_ITEM_PROTO_FLAGS 3 -#define MAX_ITEM_PROTO_SOCKETS 3 -#define MAX_ITEM_PROTO_STATS 10 - struct AreaGroupEntry { - uint32 ID; // 0 + uint32 ID; // 0 }; struct AreaGroupMemberEntry { - uint32 ID; // 0 - uint32 AreaGroupID; // 1 - uint32 AreaID; // 2 + uint32 ID; // 0 + uint32 AreaGroupID; // 1 + uint32 AreaID; // 2 +}; + +struct AuctionHouseEntry +{ + uint32 ID; // 0 + uint32 FactionID; // 1 id of faction.dbc for player factions associated with city + uint32 DepositRate; // 2 1/3 from real + uint32 ConsignmentRate; // 3 + LocalizedString* Name; // 4 +}; + +struct BarberShopStyleEntry +{ + uint32 ID; // 0 + uint32 Type; // 1 value 0 -> hair, value 2 -> facialhair + LocalizedString* DisplayName; // 2 + LocalizedString* Description; // 3 + float CostModifier; // 4 + uint32 Race; // 5 + uint32 Sex; // 6 + uint32 Data; // 7 (real ID to hair/facial hair) }; +#define MAX_BROADCAST_TEXT_EMOTES 3 + struct BroadcastTextEntry { uint32 ID; @@ -57,19 +72,78 @@ struct BroadcastTextEntry uint32 Type; }; +#define MAX_OUTFIT_ITEMS 24 + +struct CharStartOutfitEntry +{ + uint32 ID; // 0 + uint8 RaceID; // 1 + uint8 ClassID; // 2 + uint8 GenderID; // 3 + uint8 OutfitID; // 4 + int32 ItemID[MAX_OUTFIT_ITEMS]; // 5-28 + uint32 PetDisplayID; // 29 Pet Model ID for starting pet + uint32 PetFamilyID; // 30 Pet Family Entry for starting pet +}; + +struct ChrClassesXPowerTypesEntry +{ + uint32 ID; // 0 + uint32 ClassID; // 1 + uint32 PowerType; // 2 +}; + +struct CinematicSequencesEntry +{ + uint32 ID; // 0 + uint32 SoundID; // 1 + uint32 Camera[8]; // 2-9 +}; + +struct CreatureDisplayInfoEntry +{ + uint32 ID; // 0 + uint32 ModelID; // 1 + uint32 SoundID; // 2 + uint32 ExtendedDisplayInfoID; // 3 + float CreatureModelScale; // 4 + float Unknown620; // 5 + uint32 CreatureModelAlpha; // 6 + LocalizedString* TextureVariation[3]; // 7-9 + LocalizedString* PortraitTextureName; // 10 + uint32 PortraitCreatureDisplayInfoID; // 11 + uint32 SizeClass; // 12 + uint32 BloodID; // 13 + uint32 NPCSoundID; // 14 + uint32 ParticleColorID; // 15 + uint32 CreatureGeosetData; // 16 + uint32 ObjectEffectPackageID; // 17 + uint32 AnimReplacementSetID; // 18 + uint32 Flags; // 19 + int32 Gender; // 20 + uint32 StateSpellVisualKitID; // 21 +}; + +struct CreatureTypeEntry +{ + uint32 ID; // 0 + LocalizedString* Name; // 1 + uint32 Flags; // 2 no exp? critters, non-combat pets, gas cloud. +}; + struct CurrencyTypesEntry { - uint32 ID; // 0 - uint32 CategoryID; // 1 - LocalizedString* Name_lang; // 2 + uint32 ID; // 0 + uint32 CategoryID; // 1 + LocalizedString* Name; // 2 LocalizedString* InventoryIcon[2]; // 3-4 - uint32 SpellWeight; // 5 - uint32 SpellCategory; // 6 - uint32 MaxQty; // 7 - uint32 MaxEarnablePerWeek; // 8 - uint32 Flags; // 9 - uint32 Quality; // 10 - LocalizedString* Description_lang; // 11 + uint32 SpellWeight; // 5 + uint32 SpellCategory; // 6 + uint32 MaxQty; // 7 + uint32 MaxEarnablePerWeek; // 8 + uint32 Flags; // 9 + uint32 Quality; // 10 + LocalizedString* Description; // 11 }; struct CurvePointEntry @@ -81,6 +155,52 @@ struct CurvePointEntry float Y; // 4 }; +struct DestructibleModelDataEntry +{ + uint32 ID; // 0 + struct + { + uint32 DisplayID; // 1 + uint32 ImpactEffectDoodadSet; // 2 + uint32 AmbientDoodadSet; // 3 + uint32 NameSet; // 4 + } StateDamaged; + struct + { + uint32 DisplayID; // 5 + uint32 DestructionDoodadSet; // 6 + uint32 ImpactEffectDoodadSet; // 7 + uint32 AmbientDoodadSet; // 8 + uint32 NameSet; // 9 + } StateDestroyed; + struct + { + uint32 DisplayID; // 10 + uint32 DestructionDoodadSet; // 11 + uint32 ImpactEffectDoodadSet; // 12 + uint32 AmbientDoodadSet; // 13 + uint32 NameSet; // 14 + } StateRebuilding; + struct + { + uint32 DisplayID; // 15 + uint32 InitDoodadSet; // 16 + uint32 AmbientDoodadSet; // 17 + uint32 NameSet; // 18 + } StateSmoke; + uint32 EjectDirection; // 19 + uint32 RepairGroundFx; // 20 + uint32 DoNotHighlight; // 21 + uint32 HealEffect; // 22 + uint32 HealEffectSpeed; // 23 +}; + +struct DurabilityQualityEntry +{ + uint32 ID; // 0 + float QualityMod; // 1 +}; + struct GameObjectsEntry { uint32 ID; // 0 @@ -117,6 +237,7 @@ struct GarrAbilityEntry uint32 IconFileDataID; // 4 uint32 OtherFactionGarrAbilityID; // 5 uint32 GarrAbilityCategoryID; // 6 + uint32 FollowerTypeID; // 7 }; struct GarrBuildingEntry @@ -169,26 +290,29 @@ struct GarrClassSpecEntry struct GarrFollowerEntry { uint32 ID; // 0 - uint32 HordeCreatureID; // 1 - uint32 AllianceCreatureID; // 2 - uint32 HordeUiAnimRaceInfoID; // 3 - uint32 AllianceUiAnimRaceInfoID; // 4 - uint32 Quality; // 5 - uint32 HordeGarrClassSpecID; // 6 - uint32 AllianceGarrClassSpecID; // 7 - uint32 HordeGarrFollItemSetID; // 8 - uint32 AllianceGarrFollItemSetID; // 9 - uint32 Level; // 10 - uint32 ItemLevelWeapon; // 11 - uint32 ItemLevelArmor; // 12 - uint32 Unknown1; // 13 - uint32 Flags; // 14 - LocalizedString* HordeSourceText; // 15 - LocalizedString* AllianceSourceText; // 16 - int32 Unknown2; // 17 - int32 Unknown3; // 18 - uint32 HordePortraitIconID; // 19 - uint32 AlliancePortraitIconID; // 20 + uint32 FollowerTypeID; // 1 + uint32 HordeCreatureID; // 2 + uint32 AllianceCreatureID; // 3 + uint32 HordeUiAnimRaceInfoID; // 4 + uint32 AllianceUiAnimRaceInfoID; // 5 + uint32 Quality; // 6 + uint32 HordeGarrClassSpecID; // 7 + uint32 AllianceGarrClassSpecID; // 8 + uint32 HordeGarrFollItemSetID; // 9 + uint32 AllianceGarrFollItemSetID; // 10 + uint32 Level; // 11 + uint32 ItemLevelWeapon; // 12 + uint32 ItemLevelArmor; // 13 + uint32 Unknown1; // 14 + uint32 Flags; // 15 + LocalizedString* HordeSourceText; // 16 + LocalizedString* AllianceSourceText; // 17 + int32 Unknown2; // 18 + int32 Unknown3; // 19 + uint32 HordePortraitIconID; // 20 + uint32 AlliancePortraitIconID; // 21 + uint32 HordeListPortraitTextureKitID; // 22 + uint32 AllianceListPortraitTextureKitID; // 23 }; struct GarrFollowerXAbilityEntry @@ -249,77 +373,142 @@ struct GarrSiteLevelPlotInstEntry uint32 Unknown; // 5 }; +struct GlyphSlotEntry +{ + uint32 ID; // 0 + uint32 Type; // 1 + uint32 Tooltip; // 2 +}; + +struct GuildPerkSpellsEntry +{ + uint32 ID; // 0 + uint32 GuildLevel; // 1 + uint32 SpellID; // 2 +}; + +#define MAX_HOLIDAY_DURATIONS 10 +#define MAX_HOLIDAY_DATES 16 +#define MAX_HOLIDAY_FLAGS 10 + struct HolidaysEntry { - uint32 ID; // 0 - uint32 Duration[MAX_HOLIDAY_DURATIONS]; // 1-10 - uint32 Date[MAX_HOLIDAY_DATES]; // 11-26 (dates in unix time starting at January, 1, 2000) - uint32 Region; // 27 - uint32 Looping; // 28 - uint32 CalendarFlags[MAX_HOLIDAY_FLAGS]; // 29-38 - uint32 HolidayNameID; // 39 HolidayNames.dbc - uint32 HolidayDescriptionID; // 40 HolidayDescriptions.dbc + uint32 ID; // 0 + uint32 Duration[MAX_HOLIDAY_DURATIONS]; // 1-10 + uint32 Date[MAX_HOLIDAY_DATES]; // 11-26 (dates in unix time starting at January, 1, 2000) + uint32 Region; // 27 + uint32 Looping; // 28 + uint32 CalendarFlags[MAX_HOLIDAY_FLAGS]; // 29-38 + uint32 HolidayNameID; // 39 HolidayNames.dbc + uint32 HolidayDescriptionID; // 40 HolidayDescriptions.dbc LocalizedString* TextureFilename; // 41 - uint32 Priority; // 42 - uint32 CalendarFilterType; // 43 (-1 = Fishing Contest, 0 = Unk, 1 = Darkmoon Festival, 2 = Yearly holiday) - uint32 Flags; // 44 (0 = Darkmoon Faire, Fishing Contest and Wotlk Launch, rest is 1) + uint32 Priority; // 42 + uint32 CalendarFilterType; // 43 (-1 = Fishing Contest, 0 = Unk, 1 = Darkmoon Festival, 2 = Yearly holiday) + uint32 Flags; // 44 (0 = Darkmoon Faire, Fishing Contest and Wotlk Launch, rest is 1) +}; + +struct ImportPriceArmorEntry +{ + uint32 ID; // 0 + float ClothFactor; // 1 + float LeatherFactor; // 2 + float MailFactor; // 3 + float PlateFactor; // 4 +}; + +struct ImportPriceQualityEntry +{ + uint32 ID; // 0 + float Factor; // 1 +}; + +struct ImportPriceShieldEntry +{ + uint32 ID; // 0 + float Factor; // 1 +}; + +struct ImportPriceWeaponEntry +{ + uint32 ID; // 0 + float Factor; // 1 }; struct ItemAppearanceEntry { - uint32 ID; // 0 (reference to ItemModifiedAppearance.db2?) - uint32 DisplayID; // 1 - uint32 IconFileDataID; // 2 + uint32 ID; // 0 + uint32 DisplayID; // 1 + uint32 IconFileDataID; // 2 }; struct ItemBonusEntry { - uint32 ID; // 0 - uint32 BonusListID; // 1 - uint32 Type; // 2 - int32 Value[2]; // 3-4 - uint32 Index; // 5 + uint32 ID; // 0 + uint32 BonusListID; // 1 + uint32 Type; // 2 + int32 Value[2]; // 3-4 + uint32 Index; // 5 }; struct ItemBonusTreeNodeEntry { - uint32 ID; // 0 - uint32 BonusTreeID; // 1 - uint32 BonusTreeModID; // 2 - uint32 SubTreeID; // 3 - uint32 BonusListID; // 4 + uint32 ID; // 0 + uint32 BonusTreeID; // 1 + uint32 BonusTreeModID; // 2 + uint32 SubTreeID; // 3 + uint32 BonusListID; // 4 +}; + +struct ItemClassEntry +{ + uint32 ID; // 0 + uint32 Flags; // 1 + float PriceMod; // 2 + LocalizedString* Name; // 3 }; struct ItemCurrencyCostEntry { - uint32 ID; // 0 - uint32 ItemId; // 1 + uint32 ID; // 0 + uint32 ItemId; // 1 +}; + +struct ItemDisenchantLootEntry +{ + uint32 ID; // 0 + uint32 ItemClass; // 1 + int32 ItemSubClass; // 2 + uint32 ItemQuality; // 3 + uint32 MinItemLevel; // 4 + uint32 MaxItemLevel; // 5 + uint32 RequiredDisenchantSkill; // 6 }; struct ItemEffectEntry { - uint32 ID; // 0 - uint32 ItemID; // 1 - uint32 OrderIndex; // 2 - uint32 SpellID; // 3 - uint32 Trigger; // 4 - int32 Charges; // 5 - int32 Cooldown; // 6 - uint32 Category; // 7 - int32 CategoryCooldown; // 8 + uint32 ID; // 0 + uint32 ItemID; // 1 + uint32 OrderIndex; // 2 + uint32 SpellID; // 3 + uint32 Trigger; // 4 + int32 Charges; // 5 + int32 Cooldown; // 6 + uint32 Category; // 7 + int32 CategoryCooldown; // 8 + uint32 ChrSpecializationID; // 9 }; struct ItemEntry { - uint32 ID; // 0 - uint32 Class; // 1 - uint32 SubClass; // 2 - int32 SoundOverrideSubclass; // 3 - int32 Material; // 4 - uint32 InventoryType; // 5 - uint32 Sheath; // 6 - uint32 FileDataID; // 7 - uint32 GroupSoundsID; // 8 + uint32 ID; // 0 + uint32 Class; // 1 + uint32 SubClass; // 2 + int32 SoundOverrideSubclass; // 3 + int32 Material; // 4 + uint32 InventoryType; // 5 + uint32 Sheath; // 6 + uint32 FileDataID; // 7 + uint32 GroupSoundsID; // 8 }; #define MAX_ITEM_EXT_COST_ITEMS 5 @@ -327,110 +516,173 @@ struct ItemEntry struct ItemExtendedCostEntry { - uint32 ID; // 0 extended-cost entry id - uint32 RequiredArenaSlot; // 3 arena slot restrictions (min slot value) - uint32 RequiredItem[MAX_ITEM_EXT_COST_ITEMS]; // 3-6 required item id - uint32 RequiredItemCount[MAX_ITEM_EXT_COST_ITEMS]; // 7-11 required count of 1st item - uint32 RequiredPersonalArenaRating; // 12 required personal arena rating - uint32 ItemPurchaseGroup; // 13 - uint32 RequiredCurrency[MAX_ITEM_EXT_COST_CURRENCIES]; // 14-18 required curency id - uint32 RequiredCurrencyCount[MAX_ITEM_EXT_COST_CURRENCIES];// 19-23 required curency count - uint32 RequiredFactionId; // 24 - uint32 RequiredFactionStanding; // 25 - uint32 RequirementFlags; // 26 - uint32 RequiredAchievement; // 27 - uint32 RequiredMoney; // 28 + uint32 ID; // 0 extended-cost entry id + uint32 RequiredArenaSlot; // 3 arena slot restrictions (min slot value) + uint32 RequiredItem[MAX_ITEM_EXT_COST_ITEMS]; // 3-6 required item id + uint32 RequiredItemCount[MAX_ITEM_EXT_COST_ITEMS]; // 7-11 required count of 1st item + uint32 RequiredPersonalArenaRating; // 12 required personal arena rating + uint32 ItemPurchaseGroup; // 13 + uint32 RequiredCurrency[MAX_ITEM_EXT_COST_CURRENCIES]; // 14-18 required curency id + uint32 RequiredCurrencyCount[MAX_ITEM_EXT_COST_CURRENCIES]; // 19-23 required curency count + uint32 RequiredFactionId; // 24 + uint32 RequiredFactionStanding; // 25 + uint32 RequirementFlags; // 26 + uint32 RequiredAchievement; // 27 + uint32 RequiredMoney; // 28 +}; + +struct ItemLimitCategoryEntry +{ + uint32 ID; // 0 + LocalizedString* Name; // 1 + uint32 Quantity; // 2 + uint32 Flags; // 3 }; struct ItemModifiedAppearanceEntry { - uint32 ID; // 0 - uint32 ItemID; // 1 - uint32 AppearanceModID; // 2 - uint32 AppearanceID; // 3 - uint32 IconFileDataID; // 4 - uint32 Index; // 5 + uint32 ID; // 0 + uint32 ItemID; // 1 + uint32 AppearanceModID; // 2 + uint32 AppearanceID; // 3 + uint32 IconFileDataID; // 4 + uint32 Index; // 5 +}; + +struct ItemPriceBaseEntry +{ + uint32 ID; // 0 + uint32 ItemLevel; // 1 Item level (1 - 1000) + float ArmorFactor; // 2 Price factor for armor + float WeaponFactor; // 3 Price factor for weapons +}; + +#define MAX_ITEM_RANDOM_PROPERTIES 5 + +struct ItemRandomPropertiesEntry +{ + uint32 ID; // 0 + LocalizedString* InternalName; // 1 + uint32 Enchantment[MAX_ITEM_RANDOM_PROPERTIES]; // 2-6 + LocalizedString* Name; // 7 +}; + +struct ItemRandomSuffixEntry +{ + uint32 ID; // 0 + LocalizedString* Name; // 1 + LocalizedString* InternalName; // 2 + uint32 Enchantment[MAX_ITEM_RANDOM_PROPERTIES]; // 3-7 + uint32 AllocationPct[MAX_ITEM_RANDOM_PROPERTIES]; // 8-12 }; +#define MAX_ITEM_PROTO_FLAGS 3 +#define MAX_ITEM_PROTO_SOCKETS 3 +#define MAX_ITEM_PROTO_STATS 10 + struct ItemSparseEntry { - uint32 ID; // 0 - uint32 Quality; // 1 - uint32 Flags[MAX_ITEM_PROTO_FLAGS]; // 2-4 - float Unk1; // 5 - float Unk2; // 6 - uint32 BuyCount; // 7 - uint32 BuyPrice; // 8 - uint32 SellPrice; // 9 - uint32 InventoryType; // 10 - int32 AllowableClass; // 11 - int32 AllowableRace; // 12 - uint32 ItemLevel; // 13 - int32 RequiredLevel; // 14 - uint32 RequiredSkill; // 15 - uint32 RequiredSkillRank; // 16 - uint32 RequiredSpell; // 17 - uint32 RequiredHonorRank; // 18 - uint32 RequiredCityRank; // 19 - uint32 RequiredReputationFaction; // 20 - uint32 RequiredReputationRank; // 21 - uint32 MaxCount; // 22 - uint32 Stackable; // 23 - uint32 ContainerSlots; // 24 - int32 ItemStatType[MAX_ITEM_PROTO_STATS]; // 25 - 34 - int32 ItemStatValue[MAX_ITEM_PROTO_STATS]; // 35 - 44 - int32 ItemStatAllocation[MAX_ITEM_PROTO_STATS]; // 45 - 54 - float ItemStatSocketCostMultiplier[MAX_ITEM_PROTO_STATS]; // 55 - 64 - uint32 ScalingStatDistribution; // 65 - uint32 DamageType; // 66 - uint32 Delay; // 67 - float RangedModRange; // 68 - uint32 Bonding; // 69 + uint32 ID; // 0 + uint32 Quality; // 1 + uint32 Flags[MAX_ITEM_PROTO_FLAGS]; // 2-4 + float Unk1; // 5 + float Unk2; // 6 + uint32 BuyCount; // 7 + uint32 BuyPrice; // 8 + uint32 SellPrice; // 9 + uint32 InventoryType; // 10 + int32 AllowableClass; // 11 + int32 AllowableRace; // 12 + uint32 ItemLevel; // 13 + int32 RequiredLevel; // 14 + uint32 RequiredSkill; // 15 + uint32 RequiredSkillRank; // 16 + uint32 RequiredSpell; // 17 + uint32 RequiredHonorRank; // 18 + uint32 RequiredCityRank; // 19 + uint32 RequiredReputationFaction; // 20 + uint32 RequiredReputationRank; // 21 + uint32 MaxCount; // 22 + uint32 Stackable; // 23 + uint32 ContainerSlots; // 24 + int32 ItemStatType[MAX_ITEM_PROTO_STATS]; // 25 - 34 + int32 ItemStatValue[MAX_ITEM_PROTO_STATS]; // 35 - 44 + int32 ItemStatAllocation[MAX_ITEM_PROTO_STATS]; // 45 - 54 + float ItemStatSocketCostMultiplier[MAX_ITEM_PROTO_STATS]; // 55 - 64 + uint32 ScalingStatDistribution; // 65 + uint32 DamageType; // 66 + uint32 Delay; // 67 + float RangedModRange; // 68 + uint32 Bonding; // 69 LocalizedString* Name; // 70 LocalizedString* Name2; // 71 LocalizedString* Name3; // 72 LocalizedString* Name4; // 73 LocalizedString* Description; // 74 - uint32 PageText; // 75 - uint32 LanguageID; // 76 - uint32 PageMaterial; // 77 - uint32 StartQuest; // 78 - uint32 LockID; // 79 - int32 Material; // 80 - uint32 Sheath; // 81 - uint32 RandomProperty; // 82 - uint32 RandomSuffix; // 83 - uint32 ItemSet; // 84 - uint32 Area; // 85 - uint32 Map; // 86 - uint32 BagFamily; // 87 - uint32 TotemCategory; // 88 - uint32 SocketColor[MAX_ITEM_PROTO_SOCKETS]; // 89-91 - uint32 SocketBonus; // 92 - uint32 GemProperties; // 93 - float ArmorDamageModifier; // 94 - uint32 Duration; // 95 - uint32 ItemLimitCategory; // 96 - uint32 HolidayID; // 97 - float StatScalingFactor; // 98 - uint32 CurrencySubstitutionID; // 99 - uint32 CurrencySubstitutionCount; // 100 - uint32 ItemNameDescriptionID; // 101 + uint32 PageText; // 75 + uint32 LanguageID; // 76 + uint32 PageMaterial; // 77 + uint32 StartQuest; // 78 + uint32 LockID; // 79 + int32 Material; // 80 + uint32 Sheath; // 81 + uint32 RandomProperty; // 82 + uint32 RandomSuffix; // 83 + uint32 ItemSet; // 84 + uint32 Area; // 85 + uint32 Map; // 86 + uint32 BagFamily; // 87 + uint32 TotemCategory; // 88 + uint32 SocketColor[MAX_ITEM_PROTO_SOCKETS]; // 89-91 + uint32 SocketBonus; // 92 + uint32 GemProperties; // 93 + float ArmorDamageModifier; // 94 + uint32 Duration; // 95 + uint32 ItemLimitCategory; // 96 + uint32 HolidayID; // 97 + float StatScalingFactor; // 98 + uint32 CurrencySubstitutionID; // 99 + uint32 CurrencySubstitutionCount; // 100 + uint32 ItemNameDescriptionID; // 101 +}; + +struct ItemSpecEntry +{ + uint32 ID; // 0 + uint32 MinLevel; // 1 + uint32 MaxLevel; // 2 + uint32 ItemType; // 3 + uint32 PrimaryStat; // 4 + uint32 SecondaryStat; // 5 + uint32 SpecID; // 6 +}; + +struct ItemSpecOverrideEntry +{ + uint32 ID; // 0 + uint32 ItemID; // 1 + uint32 SpecID; // 2 }; struct ItemXBonusTreeEntry { - uint32 ID; // 0 - uint32 ItemID; // 1 - uint32 BonusTreeID; // 2 + uint32 ID; // 0 + uint32 ItemID; // 1 + uint32 BonusTreeID; // 2 }; #define KEYCHAIN_SIZE 32 struct KeyChainEntry { - uint32 Id; - uint8 Key[KEYCHAIN_SIZE]; + uint32 Id; + uint8 Key[KEYCHAIN_SIZE]; +}; + +struct MailTemplateEntry +{ + uint32 ID; // 0 + LocalizedString* Body; // 1 }; struct MountEntry @@ -447,164 +699,277 @@ struct MountEntry uint32 PlayerConditionId; }; +struct MountCapabilityEntry +{ + uint32 ID; // 0 + uint32 Flags; // 1 + uint32 RequiredRidingSkill; // 2 + uint32 RequiredArea; // 3 + uint32 RequiredAura; // 4 + uint32 RequiredSpell; // 5 + uint32 SpeedModSpell; // 6 + int32 RequiredMap; // 7 +}; + +struct MountTypeXCapabilityEntry +{ + uint32 ID; // 0 + uint32 MountTypeID; // 1 + uint32 OrderIndex; // 2 + uint32 MountCapabilityID; // 3 +}; + +struct NameGenEntry +{ + uint32 ID; // 0 + LocalizedString* Name; // 1 + uint32 Race; // 2 + uint32 Sex; // 3 +}; + #define MAX_OVERRIDE_SPELL 10 struct OverrideSpellDataEntry { - uint32 ID; // 0 - uint32 SpellID[MAX_OVERRIDE_SPELL]; // 1-10 - uint32 Flags; // 11 - uint32 PlayerActionbarFileDataID; // 12 + uint32 ID; // 0 + uint32 SpellID[MAX_OVERRIDE_SPELL]; // 1-10 + uint32 Flags; // 11 + uint32 PlayerActionbarFileDataID; // 12 }; struct PhaseXPhaseGroupEntry { - uint32 ID; - uint32 PhaseID; - uint32 PhaseGroupID; + uint32 ID; + uint32 PhaseID; + uint32 PhaseGroupID; +}; + +struct QuestMoneyRewardEntry +{ + uint32 Level; // 0 + uint32 Money[10]; // 1 }; struct QuestPackageItemEntry { - uint32 ID; // 0 - uint32 QuestPackageID; // 1 - uint32 ItemID; // 2 - uint32 ItemCount; // 3 - uint32 FilterType; // 4 + uint32 ID; // 0 + uint32 QuestPackageID; // 1 + uint32 ItemID; // 2 + uint32 ItemCount; // 3 + uint32 FilterType; // 4 +}; + +struct QuestSortEntry +{ + uint32 ID; // 0 + LocalizedString* SortName; // 1 +}; + +struct QuestV2Entry +{ + uint32 ID; // 0 + uint32 UniqueBitFlag; // 1 +}; + +struct QuestXPEntry +{ + uint32 ID; // 0 + uint32 Exp[10]; // 1 +}; + +struct ScalingStatDistributionEntry +{ + uint32 ID; // 0 + uint32 MinLevel; // 1 + uint32 MaxLevel; // 2 + uint32 ItemLevelCurveID; // 3 }; struct SoundEntriesEntry { - uint32 ID; // 0 - uint32 SoundType; // 1 + uint32 ID; // 0 + uint32 SoundType; // 1 LocalizedString* Name; // 2 - uint32 FileDataID[20]; // 3-22 - uint32 Freq[20]; // 23-42 - float VolumeFloat; // 43 - uint32 Flags; // 44 - float MinDistance; // 45 - float DistanceCutoff; // 46 - uint32 EAXDef; // 47 - uint32 SoundEntriesAdvancedID; // 48 - float VolumeVariationPlus; // 49 - float VolumeVariationMinus; // 50 - float PitchVariationPlus; // 51 - float PitchVariationMinus; // 52 - float PitchAdjust; // 53 - uint32 DialogType; // 54 - uint32 BusOverwriteID; // 55 + uint32 FileDataID[20]; // 3-22 + uint32 Freq[20]; // 23-42 + float VolumeFloat; // 43 + uint32 Flags; // 44 + float MinDistance; // 45 + float DistanceCutoff; // 46 + uint32 EAXDef; // 47 + uint32 SoundEntriesAdvancedID; // 48 + float VolumeVariationPlus; // 49 + float VolumeVariationMinus; // 50 + float PitchVariationPlus; // 51 + float PitchVariationMinus; // 52 + float PitchAdjust; // 53 + uint32 DialogType; // 54 + uint32 BusOverwriteID; // 55 +}; + +struct SpecializationSpellsEntry +{ + uint32 ID; // 0 + uint32 SpecID; // 1 + uint32 OrderIndex; // 2 + uint32 SpellID; // 3 + uint32 OverridesSpellID; // 4 + LocalizedString* Description; // 5 }; struct SpellAuraRestrictionsEntry { - uint32 ID; // 0 - uint32 CasterAuraState; // 1 - uint32 TargetAuraState; // 2 - uint32 ExcludeCasterAuraState; // 3 - uint32 ExcludeTargetAuraState; // 4 - uint32 CasterAuraSpell; // 5 - uint32 TargetAuraSpell; // 6 - uint32 ExcludeCasterAuraSpell; // 7 - uint32 ExcludeTargetAuraSpell; // 8 + uint32 ID; // 0 + uint32 CasterAuraState; // 1 + uint32 TargetAuraState; // 2 + uint32 ExcludeCasterAuraState; // 3 + uint32 ExcludeTargetAuraState; // 4 + uint32 CasterAuraSpell; // 5 + uint32 TargetAuraSpell; // 6 + uint32 ExcludeCasterAuraSpell; // 7 + uint32 ExcludeTargetAuraSpell; // 8 }; struct SpellCastingRequirementsEntry { - uint32 ID; // 0 - uint32 FacingCasterFlags; // 1 - uint32 MinFactionID; // 1 - uint32 MinReputation; // 3 - uint32 RequiredAreasID; // 4 - uint32 RequiredAuraVision; // 5 - uint32 RequiresSpellFocus; // 6 + uint32 ID; // 0 + uint32 FacingCasterFlags; // 1 + uint32 MinFactionID; // 1 + uint32 MinReputation; // 3 + uint32 RequiredAreasID; // 4 + uint32 RequiredAuraVision; // 5 + uint32 RequiresSpellFocus; // 6 +}; + +struct SpellCastTimesEntry +{ + uint32 ID; // 0 + int32 CastTime; // 1 + int32 CastTimePerLevel; // 2 + int32 MinCastTime; // 3 }; struct SpellClassOptionsEntry { - uint32 ID; // 0 - uint32 ModalNextSpell; // 1 - flag128 SpellClassMask; // 2 - uint32 SpellClassSet; // 3 + uint32 ID; // 0 + uint32 ModalNextSpell; // 1 + flag128 SpellClassMask; // 2-5 + uint32 SpellClassSet; // 6 +}; + +struct SpellDurationEntry +{ + uint32 ID; // 0 + int32 Duration[3]; // 1-3 +}; + +struct SpellItemEnchantmentConditionEntry +{ + uint32 ID; // 0 + uint8 LTOperandType[5]; // 1-2 + uint32 LTOperand[5]; // 2-6 + uint8 Operator[5]; // 7-8 + uint8 RTOperandType[5]; // 8-9 + uint32 RTOperand[5]; // 10-14 + uint8 Logic[5]; // 15-16 }; struct SpellLearnSpellEntry { - uint32 ID; // 0 - uint32 LearnSpellID; // 1 - uint32 SpellID; // 2 - uint32 OverridesSpellID; // 3 + uint32 ID; // 0 + uint32 LearnSpellID; // 1 + uint32 SpellID; // 2 + uint32 OverridesSpellID; // 3 }; struct SpellMiscEntry { - uint32 ID; // 0 - uint32 Attributes; // 1 - uint32 AttributesEx; // 2 - uint32 AttributesExB; // 3 - uint32 AttributesExC; // 4 - uint32 AttributesExD; // 5 - uint32 AttributesExE; // 6 - uint32 AttributesExF; // 7 - uint32 AttributesExG; // 8 - uint32 AttributesExH; // 9 - uint32 AttributesExI; // 10 - uint32 AttributesExJ; // 11 - uint32 AttributesExK; // 12 - uint32 AttributesExL; // 13 - uint32 AttributesExM; // 14 - uint32 CastingTimeIndex; // 15 - uint32 DurationIndex; // 16 - uint32 RangeIndex; // 17 - float Speed; // 18 - uint32 SpellVisualID[2]; // 19-20 - uint32 SpellIconID; // 21 - uint32 ActiveIconID; // 22 - uint32 SchoolMask; // 23 - float MultistrikeSpeedMod; // 24 + uint32 ID; // 0 + uint32 Attributes; // 1 + uint32 AttributesEx; // 2 + uint32 AttributesExB; // 3 + uint32 AttributesExC; // 4 + uint32 AttributesExD; // 5 + uint32 AttributesExE; // 6 + uint32 AttributesExF; // 7 + uint32 AttributesExG; // 8 + uint32 AttributesExH; // 9 + uint32 AttributesExI; // 10 + uint32 AttributesExJ; // 11 + uint32 AttributesExK; // 12 + uint32 AttributesExL; // 13 + uint32 AttributesExM; // 14 + uint32 CastingTimeIndex; // 15 + uint32 DurationIndex; // 16 + uint32 RangeIndex; // 17 + float Speed; // 18 + uint32 SpellIconID; // 21 + uint32 ActiveIconID; // 22 + uint32 SchoolMask; // 23 + float MultistrikeSpeedMod; // 24 }; struct SpellPowerEntry { - uint32 ID; // 0 - uint32 SpellID; // 1 - uint32 PowerIndex; // 2 - uint32 PowerType; // 3 - uint32 ManaCost; // 4 - uint32 ManaCostPerLevel; // 5 - uint32 ManaCostPerSecond; // 6 - uint32 ManaCostAdditional; // 7 Spell uses [ManaCost, ManaCost+ManaCostAdditional] power - affects tooltip parsing as multiplier on SpellEffectEntry::EffectPointsPerResource + uint32 ID; // 0 + uint32 SpellID; // 1 + uint32 PowerIndex; // 2 + uint32 PowerType; // 3 + uint32 ManaCost; // 4 + uint32 ManaCostPerLevel; // 5 + uint32 ManaCostPerSecond; // 6 + uint32 ManaCostAdditional; // 7 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 - uint32 PowerDisplayID; // 8 - uint32 UnitPowerBarID; // 9 - float ManaCostPercentage; // 10 - float ManaCostPercentagePerSecond; // 11 - uint32 RequiredAura; // 12 - float HealthCostPercentage; // 13 + uint32 PowerDisplayID; // 8 + uint32 UnitPowerBarID; // 9 + float ManaCostPercentage; // 10 + float ManaCostPercentagePerSecond; // 11 + uint32 RequiredAura; // 12 + float HealthCostPercentage; // 13 }; struct SpellPowerDifficultyEntry { - uint32 SpellPowerID; // 0 - uint32 DifficultyID; // 1 - uint32 PowerIndex; // 2 + uint32 SpellPowerID; // 0 + uint32 DifficultyID; // 1 + uint32 PowerIndex; // 2 +}; + +struct SpellRadiusEntry +{ + uint32 ID; // 0 + float Radius; // 1 + float RadiusPerLevel; // 2 + float RadiusMin; // 3 + float RadiusMax; // 4 +}; + +struct SpellRangeEntry +{ + uint32 ID; // 0 + float MinRangeHostile; // 1 + float MinRangeFriend; // 2 + float MaxRangeHostile; // 3 + float MaxRangeFriend; // 4 + uint32 Flags; // 5 + LocalizedString* DisplayName; // 6 + LocalizedString* DisplayNameShort; // 7 }; #define MAX_SPELL_REAGENTS 8 struct SpellReagentsEntry { - uint32 ID; // 0 - int32 Reagent[MAX_SPELL_REAGENTS]; // 1-8 - uint32 ReagentCount[MAX_SPELL_REAGENTS]; // 9-16 - uint32 CurrencyID; // 17 - uint32 CurrencyCount; // 18 + uint32 ID; // 0 + int32 Reagent[MAX_SPELL_REAGENTS]; // 1-8 + uint32 ReagentCount[MAX_SPELL_REAGENTS]; // 9-16 }; struct SpellRuneCostEntry { - uint32 ID; // 0 - uint32 RuneCost[4]; // 1-4 (0=blood, 1=unholy, 2=frost, 3=death) - uint32 RunicPower; // 5 + uint32 ID; // 0 + uint32 RuneCost[4]; // 1-4 (0=blood, 1=unholy, 2=frost, 3=death) + uint32 RunicPower; // 5 bool NoRuneCost() const { return RuneCost[0] == 0 && RuneCost[1] == 0 && RuneCost[2] == 0 && RuneCost[3] == 0; } bool NoRunicPowerGain() const { return RunicPower == 0; } @@ -614,43 +979,122 @@ struct SpellRuneCostEntry struct SpellTotemsEntry { - uint32 ID; // 0 - uint32 RequiredTotemCategoryID[MAX_SPELL_TOTEMS]; // 1 - uint32 Totem[MAX_SPELL_TOTEMS]; // 2 + uint32 ID; // 0 + uint32 RequiredTotemCategoryID[MAX_SPELL_TOTEMS]; // 1 + uint32 Totem[MAX_SPELL_TOTEMS]; // 2 +}; + +struct SpellXSpellVisualEntry +{ + uint32 ID; // 0 + uint32 SpellID; // 1 + uint32 DifficultyID; // 2 + uint32 SpellVisualID[2]; // 3-4 + float Unk620; // 5 + uint32 PlayerConditionID; // 6 + uint32 Flags; // 7 }; struct TaxiNodesEntry { - uint32 ID; // 0 - uint32 MapID; // 1 - DBCPosition3D Pos; // 2-4 - LocalizedString* Name_lang; // 5 - uint32 MountCreatureID[2]; // 6-7 - uint32 ConditionID; // 8 - uint32 LearnableIndex; // 9 - some kind of index only for learnable nodes - uint32 Flags; // 10 - DBCPosition2D MapOffset; // 11-12 + uint32 ID; // 0 + uint32 MapID; // 1 + DBCPosition3D Pos; // 2-4 + LocalizedString* Name; // 5 + uint32 MountCreatureID[2]; // 6-7 + uint32 ConditionID; // 8 + uint32 LearnableIndex; // 9 - some kind of index only for learnable nodes + uint32 Flags; // 10 + DBCPosition2D MapOffset; // 11-12 }; struct TaxiPathEntry { - uint32 ID; // 0 - uint32 From; // 1 - uint32 To; // 2 - uint32 Cost; // 3 + uint32 ID; // 0 + uint32 From; // 1 + uint32 To; // 2 + uint32 Cost; // 3 }; struct TaxiPathNodeEntry { - uint32 ID; // 0 - uint32 PathID; // 1 - uint32 NodeIndex; // 2 - uint32 MapID; // 3 - DBCPosition3D Loc; // 4-6 - uint32 Flags; // 7 - uint32 Delay; // 8 - uint32 ArrivalEventID; // 9 - uint32 DepartureEventID; // 10 + uint32 ID; // 0 + uint32 PathID; // 1 + uint32 NodeIndex; // 2 + uint32 MapID; // 3 + DBCPosition3D Loc; // 4-6 + uint32 Flags; // 7 + uint32 Delay; // 8 + uint32 ArrivalEventID; // 9 + uint32 DepartureEventID; // 10 +}; + +struct TotemCategoryEntry +{ + uint32 ID; // 0 + LocalizedString* Name; // 1 + uint32 CategoryType; // 2 + uint32 CategoryMask; // 3 +}; + +struct TransportAnimationEntry +{ + uint32 ID; // 0 + uint32 TransportID; // 1 + uint32 TimeIndex; // 2 + DBCPosition3D Pos; // 3-5 + uint32 SequenceID; // 6 +}; + +struct TransportRotationEntry +{ + uint32 ID; // 0 + uint32 TransportID; // 1 + uint32 TimeIndex; // 2 + float X; // 3 + float Y; // 4 + float Z; // 5 + float W; // 6 +}; + +struct UnitPowerBarEntry +{ + uint32 ID; // 0 + uint32 MinPower; // 1 + uint32 MaxPower; // 2 + uint32 StartPower; // 3 + uint32 CenterPower; // 4 + float RegenerationPeace; // 5 + float RegenerationCombat; // 6 + uint32 BarType; // 7 + uint32 FileDataID[6]; // 8-13 + uint32 Color[6]; // 14-19 + uint32 Flags; // 20 + LocalizedString* Name; // 21 + LocalizedString* Cost; // 22 + LocalizedString* OutOfError; // 23 + LocalizedString* ToolTip; // 24 + float StartInset; // 25 + float EndInset; // 26 +}; + +#define MAX_WORLD_MAP_OVERLAY_AREA_IDX 4 + +struct WorldMapOverlayEntry +{ + uint32 ID; // 0 + uint32 MapAreaID; // 1 idx in WorldMapArea.dbc + uint32 AreaID[MAX_WORLD_MAP_OVERLAY_AREA_IDX]; // 2-5 + LocalizedString* TextureName; // 6 + uint32 TextureWidth; // 7 + uint32 TextureHeight; // 8 + uint32 OffsetX; // 9 + uint32 OffsetY; // 10 + uint32 HitRectTop; // 11 + uint32 HitRectLeft; // 12 + uint32 HitRectBottom; // 13 + uint32 HitRectRight; // 14 + uint32 PlayerConditionID; // 15 }; #pragma pack(pop) @@ -660,9 +1104,10 @@ struct TaxiPathBySourceAndDestination TaxiPathBySourceAndDestination() : ID(0), price(0) { } TaxiPathBySourceAndDestination(uint32 _id, uint32 _price) : ID(_id), price(_price) { } - uint32 ID; - uint32 price; + uint32 ID; + uint32 price; }; + typedef std::map<uint32, TaxiPathBySourceAndDestination> TaxiPathSetForSource; typedef std::map<uint32, TaxiPathSetForSource> TaxiPathSetBySource; diff --git a/src/server/game/DataStores/DB2fmt.h b/src/server/game/DataStores/DB2fmt.h index 43ec6e980ae..a7b1e3e7952 100644 --- a/src/server/game/DataStores/DB2fmt.h +++ b/src/server/game/DataStores/DB2fmt.h @@ -20,51 +20,95 @@ char const AreaGroupFormat[] = "n"; char const AreaGroupMemberFormat[] = "nii"; +char const AuctionHouseFormat[] = "niiis"; +char const BarberShopStyleFormat[] = "nissfiii"; char const BroadcastTextFormat[] = "nissiiiiiiiii"; +char const CharStartOutfitFormat[] = "nbbbbiiiiiiiiiiiiiiiiiiiiiiiiii"; +char const ChrClassesXPowerTypesFormat[] = "nii"; +char const CinematicSequencesFormat[] = "niiiiiiiii"; +char const CreatureDisplayInfoFormat[] = "niiiffissssiiiiiiiiiii"; +char const CreatureTypeFormat[] = "nsi"; char const CurrencyTypesFormat[] = "nisssiiiiiis"; char const CurvePointFormat[] = "niiff"; +char const DestructibleModelDataFormat[] = "niiiiiiiiiiiiiiiiiiiiiii"; +char const DurabilityQualityFormat[] = "nf"; char const GameObjectsFormat[] = "niiffffffffiiiiiiiiiiiis"; char const GameTablesFormat[] = "nsii"; -char const GarrAbilityFormat[] = "nissiii"; +char const GarrAbilityFormat[] = "nissiiii"; char const GarrBuildingFormat[] = "niiiiissssiiiiiiiiiiiiii"; char const GarrBuildingPlotInstFormat[] = "niiiff"; char const GarrClassSpecFormat[] = "nsssii"; -char const GarrFollowerFormat[] = "niiiiiiiiiiiiiissiiii"; +char const GarrFollowerFormat[] = "niiiiiiiiiiiiiiissiiiiii"; char const GarrFollowerXAbilityFormat[] = "niii"; char const GarrPlotBuildingFormat[] = "nii"; char const GarrPlotFormat[] = "niiisiiii"; char const GarrPlotInstanceFormat[] = "nis"; char const GarrSiteLevelFormat[] = "niiiiffiiii"; char const GarrSiteLevelPlotInstFormat[] = "niiffi"; +char const GlyphSlotFormat[] = "nii"; +char const GuildPerkSpellsFormat[] = "nii"; char const HolidaysEntryFormat[] = "niiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiisiii"; -char const ItemFormat[] = "niiiiiiii"; +char const ImportPriceArmorFormat[] = "nffff"; +char const ImportPriceQualityFormat[] = "nf"; +char const ImportPriceShieldFormat[] = "nf"; +char const ImportPriceWeaponFormat[] = "nf"; char const ItemAppearanceFormat[] = "nii"; char const ItemBonusFormat[] = "niiiii"; char const ItemBonusTreeNodeFormat[] = "niiii"; +char const ItemClassFormat[] = "nifs"; char const ItemCurrencyCostFormat[] = "in"; +char const ItemDisenchantLootFormat[] = "niiiiii"; +char const ItemEffectFormat[] = "niiiiiiiii"; char const ItemExtendedCostFormat[] = "niiiiiiiiiiiiiiiiiiiiiiiiiiii"; -char const ItemEffectFormat[] = "niiiiiiii"; +char const ItemFormat[] = "niiiiiiii"; +char const ItemLimitCategoryFormat[] = "nsii"; char const ItemModifiedAppearanceFormat[] = "niiiii"; +char const ItemPriceBaseFormat[] = "niff"; +char const ItemRandomPropertiesFormat[] = "nsiiiiis"; +char const ItemRandomSuffixFormat[] = "nssiiiiiiiiii"; char const ItemSparseFormat[] = "niiiiffiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiffffffffffiiifisssssiiiiiiiiiiiiiiiiiiifiiifiii"; +char const ItemSpecFormat[] = "niiiiii"; +char const ItemSpecOverrideFormat[] = "nii"; char const ItemXBonusTreeFormat[] = "nii"; char const KeyChainFormat[] = "nbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"; +char const MailTemplateFormat[] = "ns"; +char const MountCapabilityFormat[] = "niiiiiii"; char const MountFormat[] = "niiisssiii"; +char const MountTypeXCapabilityFormat[] = "niii"; +char const NameGenFormat[] = "nsii"; char const OverrideSpellDataFormat[] = "niiiiiiiiiiii"; char const PhaseXPhaseGroupFormat[] = "nii"; +char const QuestMoneyRewardFormat[] = "niiiiiiiiii"; char const QuestPackageItemfmt[] = "niiii"; +char const QuestSortFormat[] = "ns"; +char const QuestV2Format[] = "ni"; +char const QuestXPFormat[] = "niiiiiiiiii"; +char const ScalingStatDistributionFormat[] = "niii"; char const SoundEntriesFormat[] = "nisiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiififfiifffffii"; +char const SpecializationSpellsFormat[] = "niiiis"; char const SpellAuraRestrictionsFormat[] = "niiiiiiii"; +char const SpellCastTimesFormat[] = "niii"; char const SpellCastingRequirementsFormat[] = "niiiiii"; char const SpellClassOptionsFormat[] = "niiiiii"; +char const SpellDurationFormat[] = "niii"; +char const SpellItemEnchantmentConditionFormat[] = "nbbbbbiiiiibbbbbbbbbbiiiiibbbbb"; char const SpellLearnSpellFormat[] = "niii"; -char const SpellMiscFormat[] = "niiiiiiiiiiiiiiiiifiiiiif"; -char const SpellPowerFormat[] = "niiiiiiiiiffif"; +char const SpellMiscFormat[] = "niiiiiiiiiiiiiiiiifiiif"; char const SpellPowerDifficultyFormat[] = "nii"; -char const SpellReagentsFormat[] = "niiiiiiiiiiiiiiiiii"; +char const SpellPowerFormat[] = "niiiiiiiiiffif"; +char const SpellRadiusFormat[] = "nffff"; +char const SpellRangeFormat[] = "nffffiss"; +char const SpellReagentsFormat[] = "niiiiiiiiiiiiiiii"; char const SpellRuneCostFormat[] = "niiiii"; char const SpellTotemsFormat[] = "niiii"; +char const SpellXSpellVisualFormat[] = "niiiifii"; char const TaxiNodesFormat[] = "nifffsiiiiiff"; char const TaxiPathFormat[] = "niii"; char const TaxiPathNodeFormat[] = "niiifffiiii"; +char const TotemCategoryFormat[] = "nsii"; +char const TransportAnimationFormat[] = "niifffi"; +char const TransportRotationFormat[] = "niiffff"; +char const UnitPowerBarFormat[] = "niiiiffiiiiiiiiiiiiiissssff"; +char const WorldMapOverlayFormat[] = "niiiiisiiiiiiiii"; #endif diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp index ec29c66d4a4..9f58410fd3d 100644 --- a/src/server/game/DataStores/DBCStores.cpp +++ b/src/server/game/DataStores/DBCStores.cpp @@ -22,7 +22,6 @@ #include "SharedDefines.h" #include "SpellInfo.h" #include "SpellMgr.h" -#include "TransportMgr.h" #include "DBCfmt.h" #include "ItemTemplate.h" #include "Timer.h" @@ -63,36 +62,25 @@ DBCStorage <AchievementEntry> sAchievementStore(Achievementfmt); DBCStorage <AnimKitEntry> sAnimKitStore(AnimKitfmt); DBCStorage <AreaTriggerEntry> sAreaTriggerStore(AreaTriggerEntryfmt); DBCStorage <ArmorLocationEntry> sArmorLocationStore(ArmorLocationfmt); -DBCStorage <AuctionHouseEntry> sAuctionHouseStore(AuctionHouseEntryfmt); DBCStorage <BankBagSlotPricesEntry> sBankBagSlotPricesStore(BankBagSlotPricesEntryfmt); DBCStorage <BannedAddOnsEntry> sBannedAddOnsStore(BannedAddOnsfmt); DBCStorage <BattlemasterListEntry> sBattlemasterListStore(BattlemasterListEntryfmt); -DBCStorage <BarberShopStyleEntry> sBarberShopStyleStore(BarberShopStyleEntryfmt); -DBCStorage <CharStartOutfitEntry> sCharStartOutfitStore(CharStartOutfitEntryfmt); -std::map<uint32, CharStartOutfitEntry const*> sCharStartOutfitMap; DBCStorage <CharSectionsEntry> sCharSectionsStore(CharSectionsEntryfmt); CharSectionsMap sCharSectionMap; DBCStorage <CharTitlesEntry> sCharTitlesStore(CharTitlesEntryfmt); DBCStorage <ChatChannelsEntry> sChatChannelsStore(ChatChannelsEntryfmt); DBCStorage <ChrClassesEntry> sChrClassesStore(ChrClassesEntryfmt); DBCStorage <ChrRacesEntry> sChrRacesStore(ChrRacesEntryfmt); -DBCStorage <ChrPowerTypesEntry> sChrPowerTypesStore(ChrClassesXPowerTypesfmt); DBCStorage <ChrSpecializationEntry> sChrSpecializationStore(ChrSpecializationEntryfmt); ChrSpecializationByIndexArray sChrSpecializationByIndexStore; -DBCStorage <CinematicSequencesEntry> sCinematicSequencesStore(CinematicSequencesEntryfmt); -DBCStorage <CreatureDisplayInfoEntry> sCreatureDisplayInfoStore(CreatureDisplayInfofmt); DBCStorage <CreatureDisplayInfoExtraEntry> sCreatureDisplayInfoExtraStore(CreatureDisplayInfoExtrafmt); DBCStorage <CreatureFamilyEntry> sCreatureFamilyStore(CreatureFamilyfmt); DBCStorage <CreatureModelDataEntry> sCreatureModelDataStore(CreatureModelDatafmt); -DBCStorage <CreatureTypeEntry> sCreatureTypeStore(CreatureTypefmt); DBCStorage <CriteriaEntry> sCriteriaStore(Criteriafmt); DBCStorage <CriteriaTreeEntry> sCriteriaTreeStore(CriteriaTreefmt); -uint32 PowersByClass[MAX_CLASSES][MAX_POWERS]; -DBCStorage <DestructibleModelDataEntry> sDestructibleModelDataStore(DestructibleModelDatafmt); DBCStorage <DifficultyEntry> sDifficultyStore(DifficultyFmt); DBCStorage <DungeonEncounterEntry> sDungeonEncounterStore(DungeonEncounterfmt); -DBCStorage <DurabilityQualityEntry> sDurabilityQualityStore(DurabilityQualityfmt); DBCStorage <DurabilityCostsEntry> sDurabilityCostsStore(DurabilityCostsfmt); DBCStorage <EmotesEntry> sEmotesStore(EmotesEntryfmt); @@ -106,7 +94,6 @@ DBCStorage <FactionTemplateEntry> sFactionTemplateStore(FactionTemplateEntryfmt) DBCStorage <GameObjectDisplayInfoEntry> sGameObjectDisplayInfoStore(GameObjectDisplayInfofmt); DBCStorage <GemPropertiesEntry> sGemPropertiesStore(GemPropertiesEntryfmt); DBCStorage <GlyphPropertiesEntry> sGlyphPropertiesStore(GlyphPropertiesfmt); -DBCStorage <GlyphSlotEntry> sGlyphSlotStore(GlyphSlotfmt); GameTable <GtBarberShopCostBaseEntry> sGtBarberShopCostBaseStore(GtBarberShopCostBasefmt); GameTable <GtCombatRatingsEntry> sGtCombatRatingsStore(GtCombatRatingsfmt); @@ -129,20 +116,13 @@ GameTable <GtRegenMPPerSptEntry> sGtRegenMPPerSptStore(GtRegenMPPerSptfm GameTable <GtSpellScalingEntry> sGtSpellScalingStore(GtSpellScalingfmt); GameTable <GtOCTBaseHPByClassEntry> sGtOCTBaseHPByClassStore(GtOCTBaseHPByClassfmt); GameTable <GtOCTBaseMPByClassEntry> sGtOCTBaseMPByClassStore(GtOCTBaseMPByClassfmt); -DBCStorage <GuildPerkSpellsEntry> sGuildPerkSpellsStore(GuildPerkSpellsfmt); DBCStorage <GuildColorBackgroundEntry> sGuildColorBackgroundStore(GuildColorBackgroundfmt); DBCStorage <GuildColorBorderEntry> sGuildColorBorderStore(GuildColorBorderfmt); DBCStorage <GuildColorEmblemEntry> sGuildColorEmblemStore(GuildColorEmblemfmt); -DBCStorage <ImportPriceArmorEntry> sImportPriceArmorStore(ImportPriceArmorfmt); -DBCStorage <ImportPriceQualityEntry> sImportPriceQualityStore(ImportPriceQualityfmt); -DBCStorage <ImportPriceShieldEntry> sImportPriceShieldStore(ImportPriceShieldfmt); -DBCStorage <ImportPriceWeaponEntry> sImportPriceWeaponStore(ImportPriceWeaponfmt); -DBCStorage <ItemPriceBaseEntry> sItemPriceBaseStore(ItemPriceBasefmt); DBCStorage <ItemArmorQualityEntry> sItemArmorQualityStore(ItemArmorQualityfmt); DBCStorage <ItemArmorShieldEntry> sItemArmorShieldStore(ItemArmorShieldfmt); DBCStorage <ItemArmorTotalEntry> sItemArmorTotalStore(ItemArmorTotalfmt); -DBCStorage <ItemClassEntry> sItemClassStore(ItemClassfmt); DBCStorage <ItemBagFamilyEntry> sItemBagFamilyStore(ItemBagFamilyfmt); DBCStorage <ItemDamageEntry> sItemDamageAmmoStore(ItemDamagefmt); DBCStorage <ItemDamageEntry> sItemDamageOneHandStore(ItemDamagefmt); @@ -152,24 +132,15 @@ DBCStorage <ItemDamageEntry> sItemDamageThrownStore(ItemDamagefmt); DBCStorage <ItemDamageEntry> sItemDamageTwoHandStore(ItemDamagefmt); DBCStorage <ItemDamageEntry> sItemDamageTwoHandCasterStore(ItemDamagefmt); DBCStorage <ItemDamageEntry> sItemDamageWandStore(ItemDamagefmt); -DBCStorage <ItemDisenchantLootEntry> sItemDisenchantLootStore(ItemDisenchantLootfmt); -//DBCStorage <ItemDisplayInfoEntry> sItemDisplayInfoStore(ItemDisplayTemplateEntryfmt); -- not used currently -DBCStorage <ItemLimitCategoryEntry> sItemLimitCategoryStore(ItemLimitCategoryEntryfmt); -DBCStorage <ItemRandomPropertiesEntry> sItemRandomPropertiesStore(ItemRandomPropertiesfmt); -DBCStorage <ItemRandomSuffixEntry> sItemRandomSuffixStore(ItemRandomSuffixfmt); DBCStorage <ItemSetEntry> sItemSetStore(ItemSetEntryfmt); DBCStorage <ItemSetSpellEntry> sItemSetSpellStore(ItemSetSpellEntryfmt); ItemSetSpellsStore sItemSetSpellsStore; -DBCStorage <ItemSpecOverrideEntry> sItemSpecOverrideStore(ItemSpecOverrideEntryfmt); -std::unordered_map<uint32, std::vector<ItemSpecOverrideEntry const*>> sItemSpecOverridesStore; -DBCStorage <ItemSpecEntry> sItemSpecStore(ItemSpecEntryfmt); DBCStorage <LFGDungeonEntry> sLFGDungeonStore(LFGDungeonEntryfmt); DBCStorage <LightEntry> sLightStore(LightEntryfmt); DBCStorage <LiquidTypeEntry> sLiquidTypeStore(LiquidTypefmt); DBCStorage <LockEntry> sLockStore(LockEntryfmt); -DBCStorage <MailTemplateEntry> sMailTemplateStore(MailTemplateEntryfmt); DBCStorage <MapEntry> sMapStore(MapEntryfmt); // DBC used only for initialization sMapDifficultyMap at startup. @@ -178,32 +149,19 @@ MapDifficultyMap sMapDifficultyMap; DBCStorage <ModifierTreeEntry> sModifierTreeStore(ModifierTreefmt); DBCStorage <MovieEntry> sMovieStore(MovieEntryfmt); -DBCStorage <MountCapabilityEntry> sMountCapabilityStore(MountCapabilityfmt); -DBCStorage <MountTypeEntry> sMountTypeStore(MountTypefmt); - -DBCStorage <NameGenEntry> sNameGenStore(NameGenfmt); -NameGenContainer sGenerateNamesMap; DBCStorage <PowerDisplayEntry> sPowerDisplayStore(PowerDisplayfmt); DBCStorage <PvPDifficultyEntry> sPvPDifficultyStore(PvPDifficultyfmt); -DBCStorage <QuestMoneyRewardEntry> sQuestMoneyRewardStore(QuestMoneyRewardfmt); -DBCStorage <QuestSortEntry> sQuestSortStore(QuestSortEntryfmt); -DBCStorage <QuestV2Entry> sQuestV2Store(QuestV2fmt); -DBCStorage <QuestXPEntry> sQuestXPStore(QuestXPfmt); DBCStorage <QuestFactionRewEntry> sQuestFactionRewardStore(QuestFactionRewardfmt); DBCStorage <RandomPropertiesPointsEntry> sRandomPropertiesPointsStore(RandomPropertiesPointsfmt); -DBCStorage <ScalingStatDistributionEntry> sScalingStatDistributionStore(ScalingStatDistributionfmt); DBCStorage <SkillLineEntry> sSkillLineStore(SkillLinefmt); DBCStorage <SkillLineAbilityEntry> sSkillLineAbilityStore(SkillLineAbilityfmt); DBCStorage <SkillRaceClassInfoEntry> sSkillRaceClassInfoStore(SkillRaceClassInfofmt); SkillRaceClassInfoMap SkillRaceClassInfoBySkill; -DBCStorage <SpecializationSpellsEntry> sSpecializationSpellsStore(SpecializationSpellsEntryfmt); -std::unordered_map<uint32, std::vector<SpecializationSpellsEntry const*>> sSpecializationSpellsBySpecStore; DBCStorage <SpellItemEnchantmentEntry> sSpellItemEnchantmentStore(SpellItemEnchantmentfmt); -DBCStorage <SpellItemEnchantmentConditionEntry> sSpellItemEnchantmentConditionStore(SpellItemEnchantmentConditionfmt); DBCStorage <SpellEntry> sSpellStore(SpellEntryfmt); DBCStorage <SpellEffectScalingEntry> sSpellEffectScalingStore(SpellEffectScalingfmt); @@ -219,14 +177,10 @@ DBCStorage <SpellInterruptsEntry> sSpellInterruptsStore(SpellInterruptsEntryfmt) DBCStorage <SpellEquippedItemsEntry> sSpellEquippedItemsStore(SpellEquippedItemsEntryfmt); DBCStorage <SpellCooldownsEntry> sSpellCooldownsStore(SpellCooldownsEntryfmt); DBCStorage <SpellAuraOptionsEntry> sSpellAuraOptionsStore(SpellAuraOptionsEntryfmt); -DBCStorage <SpellCastTimesEntry> sSpellCastTimesStore(SpellCastTimefmt); DBCStorage <SpellCategoriesEntry> sSpellCategoriesStore(SpellCategoriesEntryfmt); DBCStorage <SpellCategoryEntry> sSpellCategoryStore(SpellCategoryfmt); DBCStorage <SpellEffectEntry> sSpellEffectStore(SpellEffectEntryfmt); -DBCStorage <SpellDurationEntry> sSpellDurationStore(SpellDurationfmt); DBCStorage <SpellFocusObjectEntry> sSpellFocusObjectStore(SpellFocusObjectfmt); -DBCStorage <SpellRadiusEntry> sSpellRadiusStore(SpellRadiusfmt); -DBCStorage <SpellRangeEntry> sSpellRangeStore(SpellRangefmt); DBCStorage <SpellShapeshiftEntry> sSpellShapeshiftStore(SpellShapeshiftEntryfmt); DBCStorage <SpellShapeshiftFormEntry> sSpellShapeshiftFormStore(SpellShapeshiftFormfmt); DBCStorage <StableSlotPricesEntry> sStableSlotPricesStore(StableSlotPricesfmt); @@ -234,15 +188,10 @@ DBCStorage <SummonPropertiesEntry> sSummonPropertiesStore(SummonPropertiesfmt); DBCStorage <TalentEntry> sTalentStore(TalentEntryfmt); TalentsByPosition sTalentByPos; -DBCStorage <TotemCategoryEntry> sTotemCategoryStore(TotemCategoryEntryfmt); -DBCStorage <TransportAnimationEntry> sTransportAnimationStore(TransportAnimationfmt); -DBCStorage <TransportRotationEntry> sTransportRotationStore(TransportRotationfmt); -DBCStorage <UnitPowerBarEntry> sUnitPowerBarStore(UnitPowerBarfmt); DBCStorage <VehicleEntry> sVehicleStore(VehicleEntryfmt); DBCStorage <VehicleSeatEntry> sVehicleSeatStore(VehicleSeatEntryfmt); DBCStorage <WMOAreaTableEntry> sWMOAreaTableStore(WMOAreaTableEntryfmt); DBCStorage <WorldMapAreaEntry> sWorldMapAreaStore(WorldMapAreaEntryfmt); -DBCStorage <WorldMapOverlayEntry> sWorldMapOverlayStore(WorldMapOverlayEntryfmt); DBCStorage <WorldSafeLocsEntry> sWorldSafeLocsStore(WorldSafeLocsEntryfmt); DBCStorage <PhaseEntry> sPhaseStore(PhaseEntryfmt); @@ -363,137 +312,91 @@ void LoadDBCStores(const std::string& dataPath) #define LOAD_DBC(store, file) LoadDBC(availableDbcLocales, bad_dbc_files, store, dbcPath, file) - LOAD_DBC(sAreaStore, "AreaTable.dbc"); - LOAD_DBC(sAchievementStore, "Achievement.dbc"/*, &CustomAchievementfmt, &CustomAchievementIndex*/);//19116 - LOAD_DBC(sAnimKitStore, "AnimKit.dbc");//19865 - LOAD_DBC(sAreaTriggerStore, "AreaTrigger.dbc");//19116 - LOAD_DBC(sAuctionHouseStore, "AuctionHouse.dbc");//19116 - LOAD_DBC(sArmorLocationStore, "ArmorLocation.dbc");//19116 - LOAD_DBC(sBankBagSlotPricesStore, "BankBagSlotPrices.dbc");//19116 - LOAD_DBC(sBannedAddOnsStore, "BannedAddOns.dbc");//19116 - LOAD_DBC(sBattlemasterListStore, "BattlemasterList.dbc");//19116 - LOAD_DBC(sBarberShopStyleStore, "BarberShopStyle.dbc");//19116 - LOAD_DBC(sCharStartOutfitStore, "CharStartOutfit.dbc");//19116 - LOAD_DBC(sCharSectionsStore, "CharSections.dbc"); - LOAD_DBC(sCharTitlesStore, "CharTitles.dbc");//19116 - LOAD_DBC(sChatChannelsStore, "ChatChannels.dbc");//19116 - LOAD_DBC(sChrClassesStore, "ChrClasses.dbc");//19116 - LOAD_DBC(sChrRacesStore, "ChrRaces.dbc");//19116 - LOAD_DBC(sChrPowerTypesStore, "ChrClassesXPowerTypes.dbc");//19116 - LOAD_DBC(sChrSpecializationStore, "ChrSpecialization.dbc"); - LOAD_DBC(sCinematicSequencesStore, "CinematicSequences.dbc");//19116 - LOAD_DBC(sCreatureDisplayInfoStore, "CreatureDisplayInfo.dbc");//19116 - LOAD_DBC(sCreatureDisplayInfoExtraStore, "CreatureDisplayInfoExtra.dbc");//19116 - LOAD_DBC(sCreatureFamilyStore, "CreatureFamily.dbc");//19116 - LOAD_DBC(sCreatureModelDataStore, "CreatureModelData.dbc");//19116 - LOAD_DBC(sCreatureTypeStore, "CreatureType.dbc");//19116 - LOAD_DBC(sCriteriaStore, "Criteria.dbc");//19342 - LOAD_DBC(sCriteriaTreeStore, "CriteriaTree.dbc");//19342 - LOAD_DBC(sDestructibleModelDataStore, "DestructibleModelData.dbc");//19116 - LOAD_DBC(sDifficultyStore, "Difficulty.dbc");//19342 - LOAD_DBC(sDungeonEncounterStore, "DungeonEncounter.dbc");//19116 - LOAD_DBC(sDurabilityCostsStore, "DurabilityCosts.dbc");//19116 - LOAD_DBC(sDurabilityQualityStore, "DurabilityQuality.dbc");//19116 - LOAD_DBC(sEmotesStore, "Emotes.dbc");//19116 - LOAD_DBC(sEmotesTextStore, "EmotesText.dbc");//19116 - LOAD_DBC(sFactionStore, "Faction.dbc");//19116 - LOAD_DBC(sFactionTemplateStore, "FactionTemplate.dbc");//19116 - LOAD_DBC(sGameObjectDisplayInfoStore, "GameObjectDisplayInfo.dbc");//19116 - LOAD_DBC(sGemPropertiesStore, "GemProperties.dbc");//19116 - LOAD_DBC(sGlyphPropertiesStore, "GlyphProperties.dbc");//19116 - LOAD_DBC(sGlyphSlotStore, "GlyphSlot.dbc");//19116 - LOAD_DBC(sGuildPerkSpellsStore, "GuildPerkSpells.dbc");//19116 - LOAD_DBC(sGuildColorBackgroundStore, "GuildColorBackground.dbc");//19865 - LOAD_DBC(sGuildColorBorderStore, "GuildColorBorder.dbc"); //19865 - LOAD_DBC(sGuildColorEmblemStore, "GuildColorEmblem.dbc");//19865 - LOAD_DBC(sImportPriceArmorStore, "ImportPriceArmor.dbc"); // 19116 - LOAD_DBC(sImportPriceQualityStore, "ImportPriceQuality.dbc"); // 19116 - LOAD_DBC(sImportPriceShieldStore, "ImportPriceShield.dbc"); // 19116 - LOAD_DBC(sImportPriceWeaponStore, "ImportPriceWeapon.dbc"); // 19116 - LOAD_DBC(sItemPriceBaseStore, "ItemPriceBase.dbc"); // 15595 - LOAD_DBC(sItemBagFamilyStore, "ItemBagFamily.dbc");//19116 - LOAD_DBC(sItemClassStore, "ItemClass.dbc"); // 19116 - //LOAD_DBC(sItemDisplayInfoStore, "ItemDisplayInfo.dbc"); -- not used currently - LOAD_DBC(sItemLimitCategoryStore, "ItemLimitCategory.dbc");//19116 - LOAD_DBC(sItemRandomPropertiesStore, "ItemRandomProperties.dbc");//19116 - LOAD_DBC(sItemRandomSuffixStore, "ItemRandomSuffix.dbc");//19116 - LOAD_DBC(sItemSetStore, "ItemSet.dbc");//19116 - LOAD_DBC(sItemSetSpellStore, "ItemSetSpell.dbc");//19116 - LOAD_DBC(sItemSpecStore, "ItemSpec.dbc");//19116 - LOAD_DBC(sItemSpecOverrideStore, "ItemSpecOverride.dbc");//19116 - LOAD_DBC(sItemArmorQualityStore, "ItemArmorQuality.dbc");//19116 - LOAD_DBC(sItemArmorShieldStore, "ItemArmorShield.dbc");//19116 - LOAD_DBC(sItemArmorTotalStore, "ItemArmorTotal.dbc");//19116 - LOAD_DBC(sItemDamageAmmoStore, "ItemDamageAmmo.dbc");//19116 - LOAD_DBC(sItemDamageOneHandStore, "ItemDamageOneHand.dbc");//19116 - LOAD_DBC(sItemDamageOneHandCasterStore, "ItemDamageOneHandCaster.dbc");//19116 - LOAD_DBC(sItemDamageRangedStore, "ItemDamageRanged.dbc");//19116 - LOAD_DBC(sItemDamageThrownStore, "ItemDamageThrown.dbc");//19116 - LOAD_DBC(sItemDamageTwoHandStore, "ItemDamageTwoHand.dbc");//19116 - LOAD_DBC(sItemDamageTwoHandCasterStore, "ItemDamageTwoHandCaster.dbc");//19116 - LOAD_DBC(sItemDamageWandStore, "ItemDamageWand.dbc");//19116 - LOAD_DBC(sItemDisenchantLootStore, "ItemDisenchantLoot.dbc");//19116 - LOAD_DBC(sLFGDungeonStore, "LfgDungeons.dbc");//19116 - LOAD_DBC(sLightStore, "Light.dbc"); //19116 - LOAD_DBC(sLiquidTypeStore, "LiquidType.dbc");//19116 - LOAD_DBC(sLockStore, "Lock.dbc");//19116 - LOAD_DBC(sMailTemplateStore, "MailTemplate.dbc");//19116 - LOAD_DBC(sMapStore, "Map.dbc");//19116 - LOAD_DBC(sMapDifficultyStore, "MapDifficulty.dbc");//19116 - LOAD_DBC(sModifierTreeStore, "ModifierTree.dbc");//19342 - LOAD_DBC(sMountCapabilityStore, "MountCapability.dbc");//19116 - LOAD_DBC(sMountTypeStore, "MountType.dbc");//19116 - LOAD_DBC(sNameGenStore, "NameGen.dbc"); // 19116 - LOAD_DBC(sMovieStore, "Movie.dbc");//19116 - LOAD_DBC(sPhaseStore, "Phase.dbc"); // 19116 - LOAD_DBC(sPowerDisplayStore, "PowerDisplay.dbc");//19116 - LOAD_DBC(sPvPDifficultyStore, "PvpDifficulty.dbc");//19116 - LOAD_DBC(sQuestMoneyRewardStore, "QuestMoneyReward.dbc"); // 19865 - LOAD_DBC(sQuestV2Store, "QuestV2.dbc");//19342 - LOAD_DBC(sQuestXPStore, "QuestXP.dbc");//19116 - LOAD_DBC(sQuestFactionRewardStore, "QuestFactionReward.dbc");//19116 - LOAD_DBC(sQuestSortStore, "QuestSort.dbc");//19116 - LOAD_DBC(sRandomPropertiesPointsStore, "RandPropPoints.dbc");//19116 - LOAD_DBC(sScalingStatDistributionStore, "ScalingStatDistribution.dbc"); - LOAD_DBC(sSkillLineStore, "SkillLine.dbc");//19116 - LOAD_DBC(sSkillLineAbilityStore, "SkillLineAbility.dbc");//19116 - LOAD_DBC(sSkillRaceClassInfoStore, "SkillRaceClassInfo.dbc");//19116 - LOAD_DBC(sSpecializationSpellsStore, "SpecializationSpells.dbc"); - LOAD_DBC(sSpellStore, "Spell.dbc"/*, &CustomSpellEntryfmt, &CustomSpellEntryIndex*/); - LOAD_DBC(sSpellCategoriesStore, "SpellCategories.dbc");//15595 - LOAD_DBC(sSpellCategoryStore, "SpellCategory.dbc"); - LOAD_DBC(sSpellScalingStore, "SpellScaling.dbc");//19116 - LOAD_DBC(sSpellTargetRestrictionsStore, "SpellTargetRestrictions.dbc");//19116 - LOAD_DBC(sSpellLevelsStore, "SpellLevels.dbc");//19116 - LOAD_DBC(sSpellInterruptsStore, "SpellInterrupts.dbc");//19116 - LOAD_DBC(sSpellEquippedItemsStore, "SpellEquippedItems.dbc");//19116 - LOAD_DBC(sSpellCooldownsStore, "SpellCooldowns.dbc");//19116 - LOAD_DBC(sSpellAuraOptionsStore, "SpellAuraOptions.dbc");//15595 - LOAD_DBC(sSpellEffectStore, "SpellEffect.dbc"/*, &CustomSpellEffectEntryfmt, &CustomSpellEffectEntryIndex*/);//15595 - LOAD_DBC(sSpellCastTimesStore, "SpellCastTimes.dbc");//15595 - LOAD_DBC(sSpellDurationStore, "SpellDuration.dbc");//19116 - LOAD_DBC(sSpellFocusObjectStore, "SpellFocusObject.dbc");//19116 - LOAD_DBC(sSpellEffectScalingStore, "SpellEffectScaling.dbc");//19116 - LOAD_DBC(sSpellItemEnchantmentStore, "SpellItemEnchantment.dbc");//19116 - LOAD_DBC(sSpellItemEnchantmentConditionStore, "SpellItemEnchantmentCondition.dbc");//19116 - LOAD_DBC(sSpellRadiusStore, "SpellRadius.dbc");//19116 - LOAD_DBC(sSpellRangeStore, "SpellRange.dbc");//19116 - LOAD_DBC(sSpellShapeshiftStore, "SpellShapeshift.dbc");//19116 - LOAD_DBC(sSpellShapeshiftFormStore, "SpellShapeshiftForm.dbc");//19116 - //LOAD_DBC(sStableSlotPricesStore, "StableSlotPrices.dbc"); - LOAD_DBC(sSummonPropertiesStore, "SummonProperties.dbc");//15595 - LOAD_DBC(sTalentStore, "Talent.dbc");//19342 - //LOAD_DBC(sTeamContributionPointsStore, "TeamContributionPoints.dbc"); - LOAD_DBC(sTotemCategoryStore, "TotemCategory.dbc");//15595 - LOAD_DBC(sTransportAnimationStore, "TransportAnimation.dbc"); - LOAD_DBC(sTransportRotationStore, "TransportRotation.dbc"); - LOAD_DBC(sUnitPowerBarStore, "UnitPowerBar.dbc");//15595 - LOAD_DBC(sVehicleStore, "Vehicle.dbc");//15595 - LOAD_DBC(sVehicleSeatStore, "VehicleSeat.dbc");//15595 - LOAD_DBC(sWMOAreaTableStore, "WMOAreaTable.dbc");//15595 - LOAD_DBC(sWorldMapAreaStore, "WorldMapArea.dbc");//15595 - LOAD_DBC(sWorldMapOverlayStore, "WorldMapOverlay.dbc");//15595 - LOAD_DBC(sWorldSafeLocsStore, "WorldSafeLocs.dbc"); // 19116 + LOAD_DBC(sAchievementStore, "Achievement.dbc"/*, &CustomAchievementfmt, &CustomAchievementIndex*/);//20201 + LOAD_DBC(sAnimKitStore, "AnimKit.dbc");//20201 + LOAD_DBC(sAreaStore, "AreaTable.dbc");//20201 + LOAD_DBC(sAreaTriggerStore, "AreaTrigger.dbc");//20201 + LOAD_DBC(sArmorLocationStore, "ArmorLocation.dbc");//20201 + LOAD_DBC(sBankBagSlotPricesStore, "BankBagSlotPrices.dbc");//20201 + LOAD_DBC(sBannedAddOnsStore, "BannedAddOns.dbc");//20201 + LOAD_DBC(sBattlemasterListStore, "BattlemasterList.dbc");//20201 + LOAD_DBC(sCharSectionsStore, "CharSections.dbc");//20201 + LOAD_DBC(sCharTitlesStore, "CharTitles.dbc");//20201 + LOAD_DBC(sChatChannelsStore, "ChatChannels.dbc");//20201 + LOAD_DBC(sChrClassesStore, "ChrClasses.dbc");//20201 + LOAD_DBC(sChrRacesStore, "ChrRaces.dbc");//20201 + LOAD_DBC(sChrSpecializationStore, "ChrSpecialization.dbc");//20201 + LOAD_DBC(sCreatureDisplayInfoExtraStore, "CreatureDisplayInfoExtra.dbc");//20201 + LOAD_DBC(sCreatureFamilyStore, "CreatureFamily.dbc");//20201 + LOAD_DBC(sCreatureModelDataStore, "CreatureModelData.dbc");//20201 + LOAD_DBC(sCriteriaStore, "Criteria.dbc");//20201 + LOAD_DBC(sCriteriaTreeStore, "CriteriaTree.dbc");//20201 + LOAD_DBC(sDifficultyStore, "Difficulty.dbc");//20201 + LOAD_DBC(sDungeonEncounterStore, "DungeonEncounter.dbc");//20201 + LOAD_DBC(sDurabilityCostsStore, "DurabilityCosts.dbc");//20201 + LOAD_DBC(sEmotesStore, "Emotes.dbc");//20201 + LOAD_DBC(sEmotesTextStore, "EmotesText.dbc");//20201 + LOAD_DBC(sFactionStore, "Faction.dbc");//20201 + LOAD_DBC(sFactionTemplateStore, "FactionTemplate.dbc");//20201 + LOAD_DBC(sGameObjectDisplayInfoStore, "GameObjectDisplayInfo.dbc");//20201 + LOAD_DBC(sGemPropertiesStore, "GemProperties.dbc");//20201 + LOAD_DBC(sGlyphPropertiesStore, "GlyphProperties.dbc");//20201 + LOAD_DBC(sGuildColorBackgroundStore, "GuildColorBackground.dbc");//20201 + LOAD_DBC(sGuildColorBorderStore, "GuildColorBorder.dbc"); //20201 + LOAD_DBC(sGuildColorEmblemStore, "GuildColorEmblem.dbc");//20201 + LOAD_DBC(sItemArmorQualityStore, "ItemArmorQuality.dbc");//20201 + LOAD_DBC(sItemArmorShieldStore, "ItemArmorShield.dbc");//20201 + LOAD_DBC(sItemArmorTotalStore, "ItemArmorTotal.dbc");//20201 + LOAD_DBC(sItemBagFamilyStore, "ItemBagFamily.dbc");//20201 + LOAD_DBC(sItemDamageAmmoStore, "ItemDamageAmmo.dbc");//20201 + LOAD_DBC(sItemDamageOneHandCasterStore, "ItemDamageOneHandCaster.dbc");//20201 + LOAD_DBC(sItemDamageOneHandStore, "ItemDamageOneHand.dbc");//20201 + LOAD_DBC(sItemDamageRangedStore, "ItemDamageRanged.dbc");//20201 + LOAD_DBC(sItemDamageThrownStore, "ItemDamageThrown.dbc");//20201 + LOAD_DBC(sItemDamageTwoHandCasterStore, "ItemDamageTwoHandCaster.dbc");//20201 + LOAD_DBC(sItemDamageTwoHandStore, "ItemDamageTwoHand.dbc");//20201 + LOAD_DBC(sItemDamageWandStore, "ItemDamageWand.dbc");//20201 + LOAD_DBC(sItemSetSpellStore, "ItemSetSpell.dbc");//20201 + LOAD_DBC(sItemSetStore, "ItemSet.dbc");//20201 + LOAD_DBC(sLFGDungeonStore, "LfgDungeons.dbc");//20201 + LOAD_DBC(sLightStore, "Light.dbc"); //20201 + LOAD_DBC(sLiquidTypeStore, "LiquidType.dbc");//20201 + LOAD_DBC(sLockStore, "Lock.dbc");//20201 + LOAD_DBC(sMapDifficultyStore, "MapDifficulty.dbc");//20201 + LOAD_DBC(sMapStore, "Map.dbc");//20201 + LOAD_DBC(sModifierTreeStore, "ModifierTree.dbc");//20201 + LOAD_DBC(sMovieStore, "Movie.dbc");//20201 + LOAD_DBC(sPhaseStore, "Phase.dbc"); // 20201 + LOAD_DBC(sPowerDisplayStore, "PowerDisplay.dbc");//20201 + LOAD_DBC(sPvPDifficultyStore, "PvpDifficulty.dbc");//20201 + LOAD_DBC(sQuestFactionRewardStore, "QuestFactionReward.dbc");//20201 + LOAD_DBC(sRandomPropertiesPointsStore, "RandPropPoints.dbc");//20201 + LOAD_DBC(sSkillLineAbilityStore, "SkillLineAbility.dbc");//20201 + LOAD_DBC(sSkillLineStore, "SkillLine.dbc");//20201 + LOAD_DBC(sSkillRaceClassInfoStore, "SkillRaceClassInfo.dbc");//20201 + LOAD_DBC(sSpellAuraOptionsStore, "SpellAuraOptions.dbc");//20201 + LOAD_DBC(sSpellCategoriesStore, "SpellCategories.dbc");//20201 + LOAD_DBC(sSpellCategoryStore, "SpellCategory.dbc");//20201 + LOAD_DBC(sSpellCooldownsStore, "SpellCooldowns.dbc");//20201 + LOAD_DBC(sSpellEffectScalingStore, "SpellEffectScaling.dbc");//20201 + LOAD_DBC(sSpellEffectStore, "SpellEffect.dbc"/*, &CustomSpellEffectEntryfmt, &CustomSpellEffectEntryIndex*/);//20201 + LOAD_DBC(sSpellEquippedItemsStore, "SpellEquippedItems.dbc");//20201 + LOAD_DBC(sSpellFocusObjectStore, "SpellFocusObject.dbc");//20201 + LOAD_DBC(sSpellInterruptsStore, "SpellInterrupts.dbc");//20201 + LOAD_DBC(sSpellItemEnchantmentStore, "SpellItemEnchantment.dbc");//20201 + LOAD_DBC(sSpellLevelsStore, "SpellLevels.dbc");//20201 + LOAD_DBC(sSpellScalingStore, "SpellScaling.dbc");//20201 + LOAD_DBC(sSpellShapeshiftFormStore, "SpellShapeshiftForm.dbc");//20201 + LOAD_DBC(sSpellShapeshiftStore, "SpellShapeshift.dbc");//20201 + LOAD_DBC(sSpellStore, "Spell.dbc"/*, &CustomSpellEntryfmt, &CustomSpellEntryIndex*/);//20201 + LOAD_DBC(sSpellTargetRestrictionsStore, "SpellTargetRestrictions.dbc");//20201 + LOAD_DBC(sSummonPropertiesStore, "SummonProperties.dbc");//20201 + LOAD_DBC(sTalentStore, "Talent.dbc");//20201 + LOAD_DBC(sVehicleSeatStore, "VehicleSeat.dbc");//20201 + LOAD_DBC(sVehicleStore, "Vehicle.dbc");//20201 + LOAD_DBC(sWMOAreaTableStore, "WMOAreaTable.dbc");//20201 + LOAD_DBC(sWorldMapAreaStore, "WorldMapArea.dbc");//20201 + LOAD_DBC(sWorldSafeLocsStore, "WorldSafeLocs.dbc"); // 20201 #undef LOAD_DBC @@ -511,32 +414,11 @@ void LoadDBCStores(const std::string& dataPath) } } - for (uint32 i = 0; i < sCharStartOutfitStore.GetNumRows(); ++i) - if (CharStartOutfitEntry const* outfit = sCharStartOutfitStore.LookupEntry(i)) - sCharStartOutfitMap[outfit->RaceID | (outfit->ClassID << 8) | (outfit->GenderID << 16)] = outfit; - for (uint32 i = 0; i < sCharSectionsStore.GetNumRows(); ++i) if (CharSectionsEntry const* entry = sCharSectionsStore.LookupEntry(i)) if (entry->Race && ((1 << (entry->Race - 1)) & RACEMASK_ALL_PLAYABLE) != 0) //ignore Nonplayable races sCharSectionMap.insert({ entry->GenType | (entry->Gender << 8) | (entry->Race << 16), entry }); - for (uint32 i = 0; i < MAX_CLASSES; ++i) - for (uint32 j = 0; j < MAX_POWERS; ++j) - PowersByClass[i][j] = MAX_POWERS; - - for (uint32 i = 0; i < sChrPowerTypesStore.GetNumRows(); ++i) - { - if (ChrPowerTypesEntry const* power = sChrPowerTypesStore.LookupEntry(i)) - { - uint32 index = 0; - for (uint32 j = 0; j < MAX_POWERS; ++j) - if (PowersByClass[power->ClassID][j] != MAX_POWERS) - ++index; - - PowersByClass[power->ClassID][power->PowerType] = index; - } - } - memset(sChrSpecializationByIndexStore, 0, sizeof(sChrSpecializationByIndexStore)); for (uint32 i = 0; i < sChrSpecializationStore.GetNumRows(); ++i) if (ChrSpecializationEntry const* chrSpec = sChrSpecializationStore.LookupEntry(i)) @@ -568,20 +450,12 @@ void LoadDBCStores(const std::string& dataPath) for (ItemSetSpellEntry const* entry : sItemSetSpellStore) sItemSetSpellsStore[entry->ItemSetID].push_back(entry); - for (ItemSpecOverrideEntry const* entry : sItemSpecOverrideStore) - sItemSpecOverridesStore[entry->ItemID].push_back(entry); - // fill data for (uint32 i = 0; i < sMapDifficultyStore.GetNumRows(); ++i) if (MapDifficultyEntry const* entry = sMapDifficultyStore.LookupEntry(i)) sMapDifficultyMap[entry->MapID][entry->DifficultyID] = entry; sMapDifficultyMap[0][0] = sMapDifficultyMap[1][0]; //map 0 is missing from MapDifficulty.dbc use this till its ported to sql - for (uint32 i = 0; i < sNameGenStore.GetNumRows(); ++i) - if (NameGenEntry const* entry = sNameGenStore.LookupEntry(i)) - sGenerateNamesMap[entry->Race].Contents[entry->Sex].emplace_back(entry->Name); - sNameGenStore.Clear(); - for (uint32 i = 0; i < sPvPDifficultyStore.GetNumRows(); ++i) if (PvPDifficultyEntry const* entry = sPvPDifficultyStore.LookupEntry(i)) if (entry->BracketID > MAX_BATTLEGROUND_BRACKETS) @@ -592,15 +466,6 @@ void LoadDBCStores(const std::string& dataPath) if (sSkillLineStore.LookupEntry(entry->SkillID)) SkillRaceClassInfoBySkill.emplace(entry->SkillID, entry); - for (uint32 i = 0; i < sSpecializationSpellsStore.GetNumRows(); ++i) - { - SpecializationSpellsEntry const* specSpells = sSpecializationSpellsStore.LookupEntry(i); - if (!specSpells) - continue; - - sSpecializationSpellsBySpecStore[specSpells->SpecID].push_back(specSpells); - } - for (uint32 i = 1; i < sSpellStore.GetNumRows(); ++i) { SpellEntry const* spell = sSpellStore.LookupEntry(i); @@ -632,24 +497,6 @@ void LoadDBCStores(const std::string& dataPath) } } - for (uint32 i = 0; i < sTransportAnimationStore.GetNumRows(); ++i) - { - TransportAnimationEntry const* anim = sTransportAnimationStore.LookupEntry(i); - if (!anim) - continue; - - sTransportMgr->AddPathNodeToTransport(anim->TransportID, anim->TimeIndex, anim); - } - - for (uint32 i = 0; i < sTransportRotationStore.GetNumRows(); ++i) - { - TransportRotationEntry const* rot = sTransportRotationStore.LookupEntry(i); - if (!rot) - continue; - - sTransportMgr->AddPathRotationToTransport(rot->TransportID, rot->TimeIndex, rot); - } - for (uint32 i = 0; i < sWMOAreaTableStore.GetNumRows(); ++i) if (WMOAreaTableEntry const* entry = sWMOAreaTableStore.LookupEntry(i)) sWMOAreaInfoByTripple.insert(WMOAreaInfoByTripple::value_type(WMOAreaTableTripple(entry->WMOID, entry->NameSet, entry->WMOGroupID), entry)); @@ -736,12 +583,6 @@ void LoadGameTables(const std::string& dataPath) TC_LOG_INFO("server.loading", ">> Initialized %d DBC GameTables data stores in %u ms", GameTableCount, GetMSTimeDiffToNow(oldMSTime)); } -std::string const& GetRandomCharacterName(uint8 race, uint8 gender) -{ - ASSERT(gender < GENDER_NONE); - return Trinity::Containers::SelectRandomContainerElement(sGenerateNamesMap[race].Contents[gender]); -} - SimpleFactionsList const* GetFactionTeamList(uint32 faction) { FactionTeamMap::const_iterator itr = sFactionTeamMap.find(faction); @@ -1022,20 +863,6 @@ uint32 GetLiquidFlags(uint32 liquidType) return 0; } -CharStartOutfitEntry const* GetCharStartOutfitEntry(uint8 race, uint8 class_, uint8 gender) -{ - std::map<uint32, CharStartOutfitEntry const*>::const_iterator itr = sCharStartOutfitMap.find(race | (class_ << 8) | (gender << 16)); - if (itr == sCharStartOutfitMap.end()) - return NULL; - - return itr->second; -} - -uint32 GetPowerIndexByClass(uint32 powerType, uint32 classId) -{ - return PowersByClass[classId][powerType]; -} - CharSectionsEntry const* GetCharSectionEntry(uint8 race, CharSectionType genType, uint8 gender, uint8 type, uint8 color) { std::pair<CharSectionsMap::const_iterator, CharSectionsMap::const_iterator> eqr = sCharSectionMap.equal_range(uint32(genType) | uint32(gender << 8) | uint32(race << 16)); @@ -1094,30 +921,3 @@ SkillRaceClassInfoEntry const* GetSkillRaceClassInfo(uint32 skill, uint8 race, u return NULL; } - -uint32 GetQuestUniqueBitFlag(uint32 questId) -{ - QuestV2Entry const* v2 = sQuestV2Store.LookupEntry(questId); - if (!v2) - return 0; - - return v2->UniqueBitFlag; -} - -std::vector<SpecializationSpellsEntry const*> const* GetSpecializationSpells(uint32 specId) -{ - auto itr = sSpecializationSpellsBySpecStore.find(specId); - if (itr != sSpecializationSpellsBySpecStore.end()) - return &itr->second; - - return nullptr; -} - -std::vector<ItemSpecOverrideEntry const*> const* GetItemSpecOverrides(uint32 itemId) -{ - auto itr = sItemSpecOverridesStore.find(itemId); - if (itr != sItemSpecOverridesStore.end()) - return &itr->second; - - return nullptr; -} diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h index 28e3ae5d98e..0ec7df693ee 100644 --- a/src/server/game/DataStores/DBCStores.h +++ b/src/server/game/DataStores/DBCStores.h @@ -41,10 +41,6 @@ WMOAreaTableEntry const* GetWMOAreaTableEntryByTripple(int32 rootid, int32 adtid uint32 GetVirtualMapForMapAndZone(uint32 mapid, uint32 zoneId); -std::string const& GetRandomCharacterName(uint8 race, uint8 gender); - -std::vector<ItemSpecOverrideEntry const*> const* GetItemSpecOverrides(uint32 itemId); - enum ContentLevels { CONTENT_1_60 = 0, @@ -76,22 +72,17 @@ uint32 GetLiquidFlags(uint32 liquidType); PvPDifficultyEntry const* GetBattlegroundBracketByLevel(uint32 mapid, uint32 level); PvPDifficultyEntry const* GetBattlegroundBracketById(uint32 mapid, BattlegroundBracketId id); -CharStartOutfitEntry const* GetCharStartOutfitEntry(uint8 race, uint8 class_, uint8 gender); CharSectionsEntry const* GetCharSectionEntry(uint8 race, CharSectionType genType, uint8 gender, uint8 type, uint8 color); -uint32 GetPowerIndexByClass(uint32 powerType, uint32 classId); LFGDungeonEntry const* GetLFGDungeon(uint32 mapId, Difficulty difficulty); uint32 GetDefaultMapLight(uint32 mapId); -uint32 GetQuestUniqueBitFlag(uint32 questId); - typedef std::unordered_multimap<uint32, SkillRaceClassInfoEntry const*> SkillRaceClassInfoMap; typedef std::pair<SkillRaceClassInfoMap::iterator, SkillRaceClassInfoMap::iterator> SkillRaceClassInfoBounds; SkillRaceClassInfoEntry const* GetSkillRaceClassInfo(uint32 skill, uint8 race, uint8 class_); typedef ChrSpecializationEntry const* ChrSpecializationByIndexArray[MAX_CLASSES][MAX_SPECIALIZATIONS]; -std::vector<SpecializationSpellsEntry const*> const* GetSpecializationSpells(uint32 specId); typedef std::vector<TalentEntry const*> TalentsByPosition[MAX_CLASSES][MAX_TALENT_TIERS][MAX_TALENT_COLUMNS]; extern TalentsByPosition sTalentByPos; @@ -128,33 +119,24 @@ extern DBCStorage <AnimKitEntry> sAnimKitStore; extern DBCStorage <AreaTableEntry> sAreaStore;// recommend access using functions extern DBCStorage <AreaTriggerEntry> sAreaTriggerStore; extern DBCStorage <ArmorLocationEntry> sArmorLocationStore; -extern DBCStorage <AuctionHouseEntry> sAuctionHouseStore; extern DBCStorage <BankBagSlotPricesEntry> sBankBagSlotPricesStore; extern DBCStorage <BannedAddOnsEntry> sBannedAddOnsStore; -extern DBCStorage <BarberShopStyleEntry> sBarberShopStyleStore; extern DBCStorage <BattlemasterListEntry> sBattlemasterListStore; extern DBCStorage <ChatChannelsEntry> sChatChannelsStore; -extern DBCStorage <CharStartOutfitEntry> sCharStartOutfitStore; extern DBCStorage <CharSectionsEntry> sCharSectionsStore; extern DBCStorage <CharTitlesEntry> sCharTitlesStore; extern DBCStorage <ChrClassesEntry> sChrClassesStore; extern DBCStorage <ChrRacesEntry> sChrRacesStore; -extern DBCStorage <ChrPowerTypesEntry> sChrPowerTypesStore; extern DBCStorage <ChrSpecializationEntry> sChrSpecializationStore; extern ChrSpecializationByIndexArray sChrSpecializationByIndexStore; -extern DBCStorage <CinematicSequencesEntry> sCinematicSequencesStore; -extern DBCStorage <CreatureDisplayInfoEntry> sCreatureDisplayInfoStore; extern DBCStorage <CreatureDisplayInfoExtraEntry> sCreatureDisplayInfoExtraStore; extern DBCStorage <CreatureFamilyEntry> sCreatureFamilyStore; extern DBCStorage <CreatureModelDataEntry> sCreatureModelDataStore; -extern DBCStorage <CreatureTypeEntry> sCreatureTypeStore; extern DBCStorage <CriteriaEntry> sCriteriaStore; extern DBCStorage <CriteriaTreeEntry> sCriteriaTreeStore; -extern DBCStorage <DestructibleModelDataEntry> sDestructibleModelDataStore; extern DBCStorage <DifficultyEntry> sDifficultyStore; extern DBCStorage <DungeonEncounterEntry> sDungeonEncounterStore; extern DBCStorage <DurabilityCostsEntry> sDurabilityCostsStore; -extern DBCStorage <DurabilityQualityEntry> sDurabilityQualityStore; extern DBCStorage <EmotesEntry> sEmotesStore; extern DBCStorage <EmotesTextEntry> sEmotesTextStore; extern DBCStorage <FactionEntry> sFactionStore; @@ -162,7 +144,6 @@ extern DBCStorage <FactionTemplateEntry> sFactionTemplateStore; extern DBCStorage <GameObjectDisplayInfoEntry> sGameObjectDisplayInfoStore; extern DBCStorage <GemPropertiesEntry> sGemPropertiesStore; extern DBCStorage <GlyphPropertiesEntry> sGlyphPropertiesStore; -extern DBCStorage <GlyphSlotEntry> sGlyphSlotStore; extern GameTable <GtBarberShopCostBaseEntry> sGtBarberShopCostBaseStore; extern GameTable <GtCombatRatingsEntry> sGtCombatRatingsStore; @@ -184,19 +165,12 @@ extern GameTable <GtRegenMPPerSptEntry> sGtRegenMPPerSptStore; extern GameTable <GtSpellScalingEntry> sGtSpellScalingStore; extern GameTable <GtOCTBaseHPByClassEntry> sGtOCTBaseHPByClassStore; extern GameTable <GtOCTBaseMPByClassEntry> sGtOCTBaseMPByClassStore; -extern DBCStorage <GuildPerkSpellsEntry> sGuildPerkSpellsStore; extern DBCStorage <GuildColorBackgroundEntry> sGuildColorBackgroundStore; extern DBCStorage <GuildColorBorderEntry> sGuildColorBorderStore; extern DBCStorage <GuildColorEmblemEntry> sGuildColorEmblemStore; -extern DBCStorage <ImportPriceArmorEntry> sImportPriceArmorStore; -extern DBCStorage <ImportPriceQualityEntry> sImportPriceQualityStore; -extern DBCStorage <ImportPriceShieldEntry> sImportPriceShieldStore; -extern DBCStorage <ImportPriceWeaponEntry> sImportPriceWeaponStore; -extern DBCStorage <ItemPriceBaseEntry> sItemPriceBaseStore; extern DBCStorage <ItemArmorQualityEntry> sItemArmorQualityStore; extern DBCStorage <ItemArmorShieldEntry> sItemArmorShieldStore; extern DBCStorage <ItemArmorTotalEntry> sItemArmorTotalStore; -extern DBCStorage <ItemClassEntry> sItemClassStore; extern DBCStorage <ItemBagFamilyEntry> sItemBagFamilyStore; extern DBCStorage <ItemDamageEntry> sItemDamageAmmoStore; extern DBCStorage <ItemDamageEntry> sItemDamageOneHandStore; @@ -206,51 +180,30 @@ extern DBCStorage <ItemDamageEntry> sItemDamageThrownStore; extern DBCStorage <ItemDamageEntry> sItemDamageTwoHandStore; extern DBCStorage <ItemDamageEntry> sItemDamageTwoHandCasterStore; extern DBCStorage <ItemDamageEntry> sItemDamageWandStore; -//extern DBCStorage <ItemDisplayInfoEntry> sItemDisplayInfoStore; -- not used currently -extern DBCStorage <ItemDisenchantLootEntry> sItemDisenchantLootStore; -extern DBCStorage <ItemLimitCategoryEntry> sItemLimitCategoryStore; -extern DBCStorage <ItemRandomPropertiesEntry> sItemRandomPropertiesStore; -extern DBCStorage <ItemRandomSuffixEntry> sItemRandomSuffixStore; extern DBCStorage <ItemSetEntry> sItemSetStore; extern DBCStorage <ItemSetSpellEntry> sItemSetSpellStore; extern ItemSetSpellsStore sItemSetSpellsStore; -extern DBCStorage <ItemSpecOverrideEntry> sItemSpecOverrideStore; -extern DBCStorage <ItemSpecEntry> sItemSpecStore; extern DBCStorage <LFGDungeonEntry> sLFGDungeonStore; extern DBCStorage <LiquidTypeEntry> sLiquidTypeStore; extern DBCStorage <LockEntry> sLockStore; -extern DBCStorage <MailTemplateEntry> sMailTemplateStore; extern DBCStorage <MapEntry> sMapStore; extern DBCStorage <MinorTalentEntry> sMinorTalentStore; extern DBCStorage <ModifierTreeEntry> sModifierTreeStore; -extern DBCStorage <MountCapabilityEntry> sMountCapabilityStore; -extern DBCStorage <MountTypeEntry> sMountTypeStore; -extern DBCStorage <NameGenEntry> sNameGenStore; extern DBCStorage <PhaseEntry> sPhaseStore; -//extern DBCStorage <MapDifficultyEntry> sMapDifficultyStore; -- use GetMapDifficultyData insteed extern MapDifficultyMap sMapDifficultyMap; extern DBCStorage <MovieEntry> sMovieStore; extern DBCStorage <PowerDisplayEntry> sPowerDisplayStore; -extern DBCStorage <QuestSortEntry> sQuestSortStore; -extern DBCStorage <QuestMoneyRewardEntry> sQuestMoneyRewardStore; -extern DBCStorage <QuestXPEntry> sQuestXPStore; extern DBCStorage <QuestFactionRewEntry> sQuestFactionRewardStore; extern DBCStorage <RandomPropertiesPointsEntry> sRandomPropertiesPointsStore; -extern DBCStorage <ScalingStatDistributionEntry> sScalingStatDistributionStore; extern DBCStorage <SkillLineEntry> sSkillLineStore; extern DBCStorage <SkillLineAbilityEntry> sSkillLineAbilityStore; extern DBCStorage <SkillRaceClassInfoEntry> sSkillRaceClassInfoStore; extern SpellEffectScallingByEffectId sSpellEffectScallingByEffectId; -extern DBCStorage <SpellCastTimesEntry> sSpellCastTimesStore; extern DBCStorage <SpellCategoryEntry> sSpellCategoryStore; -extern DBCStorage <SpellDurationEntry> sSpellDurationStore; extern DBCStorage <SpellFocusObjectEntry> sSpellFocusObjectStore; extern DBCStorage <SpellItemEnchantmentEntry> sSpellItemEnchantmentStore; -extern DBCStorage <SpellItemEnchantmentConditionEntry> sSpellItemEnchantmentConditionStore; extern SpellCategoryStore sSpellsByCategoryStore; extern PetFamilySpellsStore sPetFamilySpellsStore; -extern DBCStorage <SpellRadiusEntry> sSpellRadiusStore; -extern DBCStorage <SpellRangeEntry> sSpellRangeStore; extern DBCStorage <SpellShapeshiftEntry> sSpellShapeshiftStore; extern DBCStorage <SpellShapeshiftFormEntry> sSpellShapeshiftFormStore; extern DBCStorage <SpellEntry> sSpellStore; @@ -267,13 +220,10 @@ extern DBCStorage <SpellTargetRestrictionsEntry> sSpellTargetRestrictionsStore; //extern DBCStorage <StableSlotPricesEntry> sStableSlotPricesStore; extern DBCStorage <SummonPropertiesEntry> sSummonPropertiesStore; extern DBCStorage <TalentEntry> sTalentStore; -extern DBCStorage <TotemCategoryEntry> sTotemCategoryStore; -extern DBCStorage <UnitPowerBarEntry> sUnitPowerBarStore; extern DBCStorage <VehicleEntry> sVehicleStore; extern DBCStorage <VehicleSeatEntry> sVehicleSeatStore; extern DBCStorage <WMOAreaTableEntry> sWMOAreaTableStore; //extern DBCStorage <WorldMapAreaEntry> sWorldMapAreaStore; -- use Zone2MapCoordinates and Map2ZoneCoordinates -extern DBCStorage <WorldMapOverlayEntry> sWorldMapOverlayStore; extern DBCStorage <WorldSafeLocsEntry> sWorldSafeLocsStore; void LoadDBCStores(const std::string& dataPath); diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index f10e52ca754..774e20bb16d 100644 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -123,15 +123,6 @@ struct ArmorLocationEntry float Modifier[5]; // 1-5 multiplier for armor types (cloth...plate, no armor?) }; -struct AuctionHouseEntry -{ - uint32 ID; // 0 - uint32 FactionID; // 1 id of faction.dbc for player factions associated with city - uint32 DepositRate; // 2 1/3 from real - uint32 ConsignmentRate; // 3 - //char* Name_lang; // 4 -}; - struct BankBagSlotPricesEntry { uint32 ID; // 0 @@ -147,18 +138,6 @@ struct BannedAddOnsEntry //uint32 Flags; // 4 }; -struct BarberShopStyleEntry -{ - uint32 ID; // 0 - uint32 Type; // 1 value 0 -> hair, value 2 -> facialhair - //char* DisplayName_lang; // 2 - //char* Description_lang // 3 - float CostModifier; // 4 - uint32 Race; // 5 - uint32 Sex; // 6 - uint32 Data; // 7 (real ID to hair/facial hair) -}; - struct BattlemasterListEntry { uint32 ID; // 0 @@ -179,20 +158,6 @@ struct BattlemasterListEntry //uint32 Unk1; // 30 }; -#define MAX_OUTFIT_ITEMS 24 - -struct CharStartOutfitEntry -{ - //uint32 ID; // 0 - uint8 RaceID; // 1 - uint8 ClassID; // 2 - uint8 GenderID; // 3 - //uint8 OutfitID; // 4 - int32 ItemID[MAX_OUTFIT_ITEMS]; // 5-28 - uint32 PetDisplayID; // 29 Pet Model ID for starting pet - uint32 PetFamilyID; // 30 Pet Family Entry for starting pet -}; - enum CharSectionFlags { SECTION_FLAG_PLAYER = 0x01, @@ -302,13 +267,6 @@ struct ChrRacesEntry //uint32 Unk; // 39 }; -struct ChrPowerTypesEntry -{ - uint32 ID; // 0 - uint32 ClassID; // 1 - uint32 PowerType; // 2 -}; - #define MAX_MASTERY_SPELLS 2 struct ChrSpecializationEntry @@ -329,36 +287,6 @@ struct ChrSpecializationEntry uint32 PrimaryStatOrder[2]; // 13-14 }; -struct CinematicSequencesEntry -{ - uint32 ID; // 0 - //uint32 SoundID; // 1 - //uint32 Camera[8]; // 2-9 -}; - -struct CreatureDisplayInfoEntry -{ - uint32 ID; // 0 - uint32 ModelID; // 1 - //uint32 SoundID; // 2 - uint32 ExtendedDisplayInfoID; // 3 - float CreatureModelScale; // 4 - //uint32 CreatureModelAlpha; // 5 - //char* TextureVariation[3]; // 6-8 - //char* PortraitTextureName; // 9 - //uint32 PortraitCreatureDisplayInfoID; // 10 - //uint32 SizeClass; // 11 - //uint32 BloodID; // 12 - //uint32 NPCSoundID; // 13 - //uint32 ParticleColorID; // 14 - //uint32 CreatureGeosetData; // 15 - //uint32 ObjectEffectPackageID; // 16 - //uint32 AnimReplacementSetID; // 17 - //uint32 Flags; // 18 - int32 Gender; // 19 - //uint32 StateSpellVisualKitID; // 20 -}; - struct CreatureDisplayInfoExtraEntry { //uint32 ID; // 0 @@ -424,13 +352,6 @@ struct CreatureModelDataEntry //float HoverHeight; // 33 }; -struct CreatureTypeEntry -{ - uint32 ID; // 0 - //char* Name_lang; // 1 - //uint32 Flags; // 2 no exp? critters, non-combat pets, gas cloud. -}; - struct CriteriaEntry { uint32 ID; // 0 @@ -587,46 +508,6 @@ struct CurrencyCategoryEntry }; */ -struct DestructibleModelDataEntry -{ - uint32 ID; // 0 - struct - { - uint32 DisplayID; // 1 - //uint32 ImpactEffectDoodadSet; // 2 - //uint32 AmbientDoodadSet; // 3 - //uint32 NameSet; // 4 - } StateDamaged; - struct - { - uint32 DisplayID; // 5 - //uint32 DestructionDoodadSet; // 6 - //uint32 ImpactEffectDoodadSet; // 7 - //uint32 AmbientDoodadSet; // 8 - //uint32 NameSet; // 9 - } StateDestroyed; - struct - { - uint32 DisplayID; // 10 - //uint32 DestructionDoodadSet; // 11 - //uint32 ImpactEffectDoodadSet; // 12 - //uint32 AmbientDoodadSet; // 13 - //uint32 NameSet; // 14 - } StateRebuilding; - struct - { - uint32 DisplayID; // 15 - //uint32 InitDoodadSet; // 16 - //uint32 AmbientDoodadSet; // 17 - //uint32 NameSet; // 18 - } StateSmoke; - //uint32 EjectDirection; // 19 - //uint32 RepairGroundFx; // 20 - //uint32 DoNotHighlight; // 21 - //uint32 HealEffect; // 22 - //uint32 HealEffectSpeed; // 23 -}; - struct DifficultyEntry { uint32 ID; // 0 @@ -642,6 +523,7 @@ struct DifficultyEntry //uint32 GroupSizeSpellPointsCurveID; // 10 //char const* NameLang; // 11 uint32 ItemBonusTreeModID; // 12 + //uint32 OrderIndex; // 13 }; struct DungeonEncounterEntry @@ -664,12 +546,6 @@ struct DurabilityCostsEntry uint32 ArmorSubClassCost[8]; // 23-30 }; -struct DurabilityQualityEntry -{ - uint32 ID; // 0 - float QualityMod; // 1 -}; - struct EmotesEntry { uint32 ID; // 0 @@ -803,13 +679,6 @@ struct GlyphPropertiesEntry //uint32 GlyphExclusiveCategoryID; // 4 }; -struct GlyphSlotEntry -{ - uint32 ID; // 0 - uint32 Type; // 1 - //uint32 Tooltip; // 2 -}; - struct GtBarberShopCostBaseEntry { //uint32 level; @@ -929,13 +798,6 @@ struct GtOCTBaseMPByClassEntry float ratio; }; -struct GuildPerkSpellsEntry -{ - //uint32 ID; // 0 - uint32 GuildLevel; // 1 - uint32 SpellID; // 2 -}; - // GuildColorBackground.dbc struct GuildColorBackgroundEntry { @@ -963,45 +825,6 @@ struct GuildColorEmblemEntry //uint8 Blue; }; -// ImportPriceArmor.dbc -struct ImportPriceArmorEntry -{ - uint32 ID; // 1 Id/InventoryType - float ClothFactor; // 2 Price factor cloth - float LeatherFactor; // 3 Price factor leather - float MailFactor; // 4 Price factor mail - float PlateFactor; // 5 Price factor plate -}; - -// ImportPriceQuality.dbc -struct ImportPriceQualityEntry -{ - uint32 ID; // 1 Quality Id (+1?) - float Factor; // 2 Price factor -}; - -// ImportPriceShield.dbc -struct ImportPriceShieldEntry -{ - uint32 ID; // 1 Unk id (only 1 and 2) - float Factor; // 2 Price factor -}; - -// ImportPriceWeapon.dbc -struct ImportPriceWeaponEntry -{ - uint32 ID; // 1 Unk id (mainhand - 0, offhand - 1, weapon - 2, 2hweapon - 3, ranged/rangedright/relic - 4) - float Factor; // 2 Price factor -}; - -// ItemPriceBase.dbc -struct ItemPriceBaseEntry -{ - uint32 ItemLevel; // 2 Item level (1 - 1000) - float ArmorFactor; // 3 Price factor for armor - float WeaponFactor; // 4 Price factor for weapons -}; - // common struct for: // ItemDamageAmmo.dbc // ItemDamageOneHand.dbc @@ -1039,15 +862,6 @@ struct ItemArmorTotalEntry float Value[4]; // 2-5 multiplier for armor types (cloth...plate) }; -// ItemClass.dbc -struct ItemClassEntry -{ - uint32 ID; // 0 item class id - //uint32 Flags; // 1 Weapon - 1, others - 0 - float PriceMod; // 2 used to calculate certain prices - //char* Name_lang; // 3 class name -}; - struct ItemBagFamilyEntry { uint32 ID; // 0 @@ -1068,44 +882,6 @@ struct ItemDisplayInfoEntry //uint32 ParticleColorID; // 22 }; -struct ItemDisenchantLootEntry -{ - uint32 ID; // 0 - uint32 ItemClass; // 1 - int32 ItemSubClass; // 2 - uint32 ItemQuality; // 3 - uint32 MinItemLevel; // 4 - uint32 MaxItemLevel; // 5 - uint32 RequiredDisenchantSkill; // 6 -}; - -struct ItemLimitCategoryEntry -{ - uint32 ID; // 0 Id - //char* Name_lang; // 1 m_name_lang - uint32 Quantity; // 2, m_quantity max allowed equipped as item or in gem slot - uint32 Flags; // 3, m_flags 0 = have, 1 = equip (enum ItemLimitCategoryMode) -}; - -#define MAX_ITEM_RANDOM_PROPERTIES 5 - -struct ItemRandomPropertiesEntry -{ - uint32 ID; // 0 - //char* Name; // 1 - uint32 Enchantment[MAX_ITEM_RANDOM_PROPERTIES]; // 2-6 - char* Name_lang; // 7 -}; - -struct ItemRandomSuffixEntry -{ - uint32 ID; // 0 - char* Name_lang; // 1 - //char* InternalName; // 2 - uint32 Enchantment[MAX_ITEM_RANDOM_PROPERTIES]; // 3-7 - uint32 AllocationPct[MAX_ITEM_RANDOM_PROPERTIES];// 8-12 -}; - #define MAX_ITEM_SET_ITEMS 17 #define MAX_ITEM_SET_SPELLS 8 @@ -1130,24 +906,6 @@ struct ItemSetSpellEntry typedef std::vector<ItemSetSpellEntry const*> ItemSetSpells; typedef std::unordered_map<uint32, ItemSetSpells> ItemSetSpellsStore; -struct ItemSpecEntry -{ - uint32 ID; // 0 - uint32 MinLevel; // 1 - uint32 MaxLevel; // 2 - uint32 ItemType; // 3 - uint32 PrimaryStat; // 4 - uint32 SecondaryStat; // 5 - uint32 SpecID; // 6 -}; - -struct ItemSpecOverrideEntry -{ - uint32 ID; // 0 - uint32 ItemID; // 1 - uint32 SpecID; // 2 -}; - struct LFGDungeonEntry { uint32 ID; // 0 @@ -1171,14 +929,15 @@ struct LFGDungeonEntry //uint32 CountTank; // 18 //uint32 CountHealer; // 19 //uint32 CountDamage; // 20 - //uint32 ScenarioID; // 21 - //uint32 SubType; // 22 - //uint32 BonusReputationAmount; // 23 - //uint32 MentorCharLevel; // 24 - //uint32 MentorItemLevel; // 25 - //uint32 Unk1; // 26 (300 for random dungeons, others 0) - //uint32 Unk2; // 27 - //uint32 Unk3; // 28 + //uint32 MinCountTank; // 21 + //uint32 MinCountHealer; // 22 + //uint32 MinCountDamage; // 23 + //uint32 ScenarioID; // 24 + //uint32 SubType; // 25 + //uint32 LastBossJournalEncounterID; // 26 + //uint32 BonusReputationAmount; // 27 + //uint32 MentorCharLevel; // 28 + //uint32 MentorItemLevel; // 29 // Helpers uint32 Entry() const { return ID + (Type << 24); } @@ -1213,8 +972,8 @@ struct LiquidTypeEntry //uint32 MaterialID; // 14 //char* Texture[6]; // 15-20 //uint32 Color[2]; // 21-23 - //float Unk1[18]; // 24-41 - //uint32 Unk2[4]; // 42-45 + //float Float[18]; // 24-41 + //uint32 Int[4]; // 42-45 //uint32 Unk3[5]; // 46-50 }; @@ -1235,13 +994,6 @@ struct PhaseEntry uint32 Flags; // 1 }; -struct MailTemplateEntry -{ - uint32 ID; // 0 - //char* Subject_lang; // 1 - char* Body_lang; // 2 -}; - struct MapEntry { uint32 ID; // 0 @@ -1329,26 +1081,6 @@ struct ModifierTreeEntry uint32 Parent; // 6 }; -struct MountCapabilityEntry -{ - uint32 ID; // 0 - uint32 Flags; // 1 - uint32 RequiredRidingSkill; // 2 - uint32 RequiredArea; // 3 - uint32 RequiredAura; // 4 - uint32 RequiredSpell; // 5 - uint32 SpeedModSpell; // 6 - int32 RequiredMap; // 7 -}; - -#define MAX_MOUNT_CAPABILITIES 24 - -struct MountTypeEntry -{ - uint32 ID; // 0 - uint32 MountCapability[MAX_MOUNT_CAPABILITIES]; // 1-24 -}; - struct MovieEntry { uint32 ID; // 0 index @@ -1358,14 +1090,6 @@ struct MovieEntry //uint32 SubtitleFileDataID; // 4 }; -struct NameGenEntry -{ - //uint32 ID; // 0 - char* Name; // 1 - uint32 Race; // 2 - uint32 Sex; // 3 -}; - struct PowerDisplayEntry { uint32 ID; // 0 @@ -1388,30 +1112,6 @@ struct PvPDifficultyEntry BattlegroundBracketId GetBracketId() const { return BattlegroundBracketId(BracketID); } }; -struct QuestMoneyRewardEntry -{ - uint32 Level; // 0 - uint32 Money[10]; // 1 -}; - -struct QuestSortEntry -{ - uint32 ID; // 0 - //char* SortName_lang; // 1 -}; - -struct QuestV2Entry -{ - uint32 ID; // 0 - uint32 UniqueBitFlag; // 1 -}; - -struct QuestXPEntry -{ - uint32 ID; // 0 - uint32 Exp[10]; // 1 -}; - struct QuestFactionRewEntry { uint32 ID; // 0 @@ -1426,21 +1126,6 @@ struct RandomPropertiesPointsEntry uint32 UncommonPropertiesPoints[5]; // 11-15 }; -struct ScalingStatDistributionEntry -{ - uint32 ID; // 0 - uint32 MinLevel; // 1 - uint32 MaxLevel; // 2 m_maxlevel - uint32 ItemLevelCurveID; // 3 -}; - -//struct SkillLineCategoryEntry{ -// uint32 id; // 0 m_ID -// char* name[16]; // 1-17 m_name_lang -// // 18 string flag -// uint32 displayOrder; // 19 m_sortIndex -//}; - struct SkillLineEntry { uint32 ID; // 0 m_ID @@ -1483,16 +1168,6 @@ struct SkillRaceClassInfoEntry uint32 SkillTierID; // 7 }; -// SpecializationSpells.dbc -struct SpecializationSpellsEntry -{ - uint32 ID; // 0 - uint32 SpecID; // 1 - uint32 SpellID; // 2 - uint32 OverridesSpellID; // 3 - //char* Description_lang; // 4 -}; - // SpellEffect.dbc struct SpellEffectEntry { @@ -1602,14 +1277,6 @@ typedef std::set<uint32> PetFamilySpellsSet; typedef std::map<uint32, PetFamilySpellsSet > PetFamilySpellsStore; typedef std::unordered_map<uint32, uint32> SpellEffectScallingByEffectId; -struct SpellCastTimesEntry -{ - uint32 ID; // 0 - int32 CastTime; // 1 - //float CastTimePerLevel; // 2 unsure / per skill? - //int32 MinCastTime; // 3 unsure -}; - struct SpellCategoryEntry { uint32 ID; // 0 @@ -1627,27 +1294,6 @@ struct SpellFocusObjectEntry //char* Name_lang; // 1 }; -struct SpellRadiusEntry -{ - uint32 ID; // 0 - //float Radius; // 1 - float RadiusPerLevel; // 2 - float RadiusMin; // 3 - float RadiusMax; // 4 -}; - -struct SpellRangeEntry -{ - uint32 ID; // 0 - float MinRangeHostile; // 1 - float MinRangeFriend; // 2 - float MaxRangeHostile; // 3 - float MaxRangeFriend; // 4 friend means unattackable unit here - uint32 Flags; // 5 - //char* DisplayName_lang; // 6 - //char* DisplayNameShort_lang; // 7 -}; - // SpellEquippedItems.dbc struct SpellEquippedItemsEntry { @@ -1746,12 +1392,6 @@ struct SpellScalingEntry uint32 ScalesFromItemLevel; // 8 }; -struct SpellDurationEntry -{ - uint32 ID; - int32 Duration[3]; -}; - #define MAX_ITEM_ENCHANTMENT_EFFECTS 3 struct SpellItemEnchantmentEntry @@ -1776,17 +1416,6 @@ struct SpellItemEnchantmentEntry float EffectScalingPoints[MAX_ITEM_ENCHANTMENT_EFFECTS];//23-25 }; -struct SpellItemEnchantmentConditionEntry -{ - uint32 ID; // 0 - uint8 LTOperandType[5]; // 1-2 - uint32 LTOperand[5]; // 2-6 - uint8 Operator[5]; // 7-8 - uint8 RTOperandType[5]; // 8-9 - uint32 RTOperand[5]; // 10-14 - uint8 Logic[5]; // 15-16 -}; - struct StableSlotPricesEntry { uint32 Slot; @@ -1820,55 +1449,6 @@ struct TalentEntry //char* Description_lang }; -struct TotemCategoryEntry -{ - uint32 ID; // 0 - //char* Name_lang; // 1 m_name_lang - uint32 CategoryType; // 2 m_totemCategoryType (one for specialization) - uint32 CategoryMask; // 3 m_totemCategoryMask (compatibility mask for same type: different for totems, compatible from high to low for rods) -}; - -struct UnitPowerBarEntry -{ - uint32 ID; // 0 - uint32 MinPower; // 1 - uint32 MaxPower; // 2 - //uint32 StartPower; // 3 - //uint32 CenterPower; // 4 - //float RegenerationPeace; // 5 - //float RegenerationCombat; // 6 - //uint32 BarType; // 7 - //uint32 FileDataID[6]; // 8-13 - //uint32 Color[6]; // 14-19 - //uint32 Flags; // 20 - //char* Name_lang; // 21 - //char* Cost_lang; // 22 - //char* OutOfError_lang; // 23 - //char* ToolTip_lang; // 24 - //float StartInset; // 25 - //float EndInset; // 26 -}; - -struct TransportAnimationEntry -{ - //uint32 ID; // 0 - uint32 TransportID; // 1 - uint32 TimeIndex; // 2 - DBCPosition3D Pos; // 3-5 - //uint32 SequenceID; // 6 -}; - -struct TransportRotationEntry -{ - //uint32 ID; // 0 - uint32 TransportID; // 1 - uint32 TimeIndex; // 2 - float X; // 3 - float Y; // 4 - float Z; // 5 - float W; // 6 -}; - #define MAX_VEHICLE_SEATS 8 struct VehicleEntry @@ -2015,25 +1595,6 @@ struct WorldMapAreaEntry //uint32 LevelRangeMax; // 13 Maximum recommended level displayed on world map }; -#define MAX_WORLD_MAP_OVERLAY_AREA_IDX 4 - -struct WorldMapOverlayEntry -{ - uint32 ID; // 0 - //uint32 MapAreaID; // 1 idx in WorldMapArea.dbc - uint32 AreaID[MAX_WORLD_MAP_OVERLAY_AREA_IDX]; // 2-5 - //char* TextureName; // 6 - //uint32 TextureWidth; // 7 - //uint32 TextureHeight; // 8 - //uint32 OffsetX; // 9 - //uint32 OffsetY; // 10 - //uint32 HitRectTop; // 11 - //uint32 HitRectLeft; // 12 - //uint32 HitRectBottom; // 13 - //uint32 HitRectRight; // 14 - //uint32 PlayerConditionID; // 15 -}; - struct WorldSafeLocsEntry { uint32 ID; // 0 @@ -2081,12 +1642,5 @@ struct WorldStateUI #pragma pack(pop) -struct VectorArray -{ - std::vector<std::string> Contents[2]; -}; - -typedef std::map<uint32, VectorArray> NameGenContainer; - typedef std::map<uint32, uint32> TalentSpellPosMap; #endif diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h index fa1c5fa7d3a..7ba4c3c293b 100644 --- a/src/server/game/DataStores/DBCfmt.h +++ b/src/server/game/DataStores/DBCfmt.h @@ -29,32 +29,23 @@ char const AnimKitfmt[] = "nxxx"; char const AreaTableEntryfmt[] = "iiiniixxxxxxisiiiiixxxxxxxxxx"; char const AreaTriggerEntryfmt[] = "nifffxxxfffffxxxx"; char const ArmorLocationfmt[] = "nfffff"; -char const AuctionHouseEntryfmt[] = "niiix"; char const BankBagSlotPricesEntryfmt[] = "ni"; char const BannedAddOnsfmt[] = "nxxxxxxxxxx"; -char const BarberShopStyleEntryfmt[] = "nixxfiii"; char const BattlemasterListEntryfmt[] = "niiiiiiiiiiiiiiiiixsiiiixxxxxxx"; -char const CharStartOutfitEntryfmt[] = "dbbbXiiiiiiiiiiiiiiiiiiiiiiiiii"; char const CharSectionsEntryfmt[] = "diiixxxiii"; char const CharTitlesEntryfmt[] = "nxssix"; char const ChatChannelsEntryfmt[] = "nixsx"; char const ChrClassesEntryfmt[] = "nixsxxxixiiiiixxxxx"; char const ChrRacesEntryfmt[] = "niixiixxxxxxiisxxxxxxxxxxxxxxxxxxxxxxxxx"; -char const ChrClassesXPowerTypesfmt[] = "nii"; char const ChrSpecializationEntryfmt[] = "nxiiiiiiiiixxxii"; -char const CinematicSequencesEntryfmt[] = "nxxxxxxxxx"; -char const CreatureDisplayInfofmt[] = "nixifxxxxxxxxxxxxxxix"; char const CreatureDisplayInfoExtrafmt[] = "dixxxxxxxxxxxxxxxxxxxx"; char const CreatureFamilyfmt[] = "nfifiiiiixsx"; char const CreatureModelDatafmt[] = "nixxxxxxxxxxxxxffxxxxxxxxxxxxxxxxx"; -char const CreatureTypefmt[] = "nxx"; char const Criteriafmt[] = "niiiiiiiixii"; char const CriteriaTreefmt[] = "niliixxx"; -char const DestructibleModelDatafmt[] = "nixxxixxxxixxxxixxxxxxxx"; -char const DifficultyFmt[] = "niiiixiixxxxi"; +char const DifficultyFmt[] = "niiiixiixxxxix"; char const DungeonEncounterfmt[] = "niiixsxxx"; char const DurabilityCostsfmt[] = "niiiiiiiiiiiiiiiiiiiiiiiiiiiii"; -char const DurabilityQualityfmt[] = "nf"; char const EmotesEntryfmt[] = "nxxiiixx"; char const EmotesTextEntryfmt[] = "nxixxxxxxxxxxxxxxxx"; char const FactionEntryfmt[] = "niiiiiiiiiiiiiiiiiiffixsxixx"; @@ -62,7 +53,6 @@ char const FactionTemplateEntryfmt[] = "niiiiiiiiiiiii"; char const GameObjectDisplayInfofmt[] = "nixxxxxxxxxxffffffxxx"; char const GemPropertiesEntryfmt[] = "nixxii"; char const GlyphPropertiesfmt[] = "niiix"; -char const GlyphSlotfmt[] = "nix"; char const GtBarberShopCostBasefmt[] = "xf"; char const GtCombatRatingsfmt[] = "xf"; char const GtOCTHpPerStaminafmt[] = "df"; @@ -85,62 +75,36 @@ char const GtRegenMPPerSptfmt[] = "xf"; char const GtSpellScalingfmt[] = "df"; char const GtOCTBaseHPByClassfmt[] = "df"; char const GtOCTBaseMPByClassfmt[] = "df"; -char const GuildPerkSpellsfmt[] = "dii"; char const GuildColorBackgroundfmt[] = "nXXX"; char const GuildColorBorderfmt[] = "nXXX"; char const GuildColorEmblemfmt[] = "nXXX"; -char const ImportPriceArmorfmt[] = "nffff"; -char const ImportPriceQualityfmt[] = "nf"; -char const ImportPriceShieldfmt[] = "nf"; -char const ImportPriceWeaponfmt[] = "nf"; -char const ItemPriceBasefmt[] = "diff"; char const ItemBagFamilyfmt[] = "nx"; char const ItemArmorQualityfmt[] = "nfffffffi"; char const ItemArmorShieldfmt[] = "nifffffff"; char const ItemArmorTotalfmt[] = "niffff"; -char const ItemClassfmt[] = "nxfx"; char const ItemDamagefmt[] = "nfffffffi"; -char const ItemDisenchantLootfmt[] = "niiiiii"; -//char const ItemDisplayTemplateEntryfmt[] = "nxxxxxxxxxxixxxxxxxxxxx"; -char const ItemLimitCategoryEntryfmt[] = "nxii"; -char const ItemRandomPropertiesfmt[] = "nxiiiiis"; -char const ItemRandomSuffixfmt[] = "nsxiiiiiiiiii"; char const ItemSetEntryfmt[] = "nsiiiiiiiiiiiiiiiiiii"; char const ItemSetSpellEntryfmt[] = "niiii"; -char const ItemSpecEntryfmt[] = "niiiiii"; -char const ItemSpecOverrideEntryfmt[] = "nii"; -char const LFGDungeonEntryfmt[] = "nsiiixxiiiixxixixxxxxxxxxxxxx"; +char const LFGDungeonEntryfmt[] = "nsiiixxiiiixxixixxxxxxxxxxxxxx"; char const LightEntryfmt[] = "nifffxxxxxxxxxx"; char const LiquidTypefmt[] = "nxxixixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; char const LockEntryfmt[] = "niiiiiiiiiiiiiiiiiiiiiiiixxxxxxxx"; -char const PhaseEntryfmt[] = "ni"; -char const MailTemplateEntryfmt[] = "nxs"; char const MapEntryfmt[] = "nxiixxsixxixiffxiiiiix"; char const MapDifficultyEntryfmt[] = "diisiiii"; char const MinorTalentEntryfmt[] = "niii"; char const MovieEntryfmt[] = "nxxxx"; char const ModifierTreefmt[] = "niiiiii"; -char const MountCapabilityfmt[] = "niiiiiii"; -char const MountTypefmt[] = "niiiiiiiiiiiiiiiiiiiiiiii"; -char const NameGenfmt[] = "dsii"; char const NumTalentsAtLevelfmt[] = "df"; +char const PhaseEntryfmt[] = "ni"; char const QuestFactionRewardfmt[] = "niiiiiiiiii"; -char const QuestMoneyRewardfmt[] = "niiiiiiiiii"; -char const QuestSortEntryfmt[] = "nx"; -char const QuestV2fmt[] = "ni"; -char const QuestXPfmt[] = "niiiiiiiiii"; char const PowerDisplayfmt[] = "nixXXX"; char const PvPDifficultyfmt[] = "diiii"; char const RandomPropertiesPointsfmt[] = "niiiiiiiiiiiiiii"; -char const ScalingStatDistributionfmt[] = "niii"; char const SkillLinefmt[] = "nisxixixx"; char const SkillLineAbilityfmt[] = "niiiiiiiiiiii"; char const SkillRaceClassInfofmt[] = "diiiiiii"; -char const SpecializationSpellsEntryfmt[] = "niiix"; -char const SpellCastTimefmt[] = "nixx"; char const SpellCategoriesEntryfmt[] = "diiiiiiiii"; char const SpellCategoryfmt[] = "nixxii"; -char const SpellDurationfmt[] = "niii"; char const SpellEffectEntryfmt[] = "iiifiiiffiiiiiifiifiiiiifiiiiif"; const std::string CustomSpellEffectEntryfmt = "ppppppppppppppappppppppppp"; const std::string CustomSpellEffectEntryIndex = "Id"; @@ -150,9 +114,6 @@ const std::string CustomSpellEntryIndex = "Id"; char const SpellEffectScalingfmt[] = "nfffi"; char const SpellFocusObjectfmt[] = "nx"; char const SpellItemEnchantmentfmt[] = "niiiiiiiiiixiiiiiiiiiiifff"; -char const SpellItemEnchantmentConditionfmt[] = "nbbbbbiiiiibbbbbbbbbbiiiiibbbbb"; -char const SpellRadiusfmt[] = "nxfff"; -char const SpellRangefmt[] = "nffffixx"; char const SpellScalingEntryfmt[] = "niiiifiii"; char const SpellTargetRestrictionsEntryfmt[] = "niiffiiii"; char const SpellInterruptsEntryfmt[] = "diiiiiii"; @@ -165,15 +126,10 @@ char const SpellShapeshiftFormfmt[] = "nxxiixiiiiiiiiiiiiixx"; char const StableSlotPricesfmt[] = "ni"; char const SummonPropertiesfmt[] = "niiiii"; char const TalentEntryfmt[] = "niiiiiiiiix"; -char const TotemCategoryEntryfmt[] = "nxii"; -char const UnitPowerBarfmt[] = "niixxxxxxxxxxxxxxxxxxxxxxxx"; -char const TransportAnimationfmt[] = "diifffx"; -char const TransportRotationfmt[] = "diiffff"; char const VehicleEntryfmt[] = "niiffffiiiiiiiifffffffffffffffxxxxfifiiii"; char const VehicleSeatEntryfmt[] = "niiffffffffffiiiiiifffffffiiifffiiiiiiiffiiiiffffffffffffiiiiiiiii"; char const WMOAreaTableEntryfmt[] = "niiixxxxxiixxxx"; char const WorldMapAreaEntryfmt[] = "xinxffffixxxxx"; -char const WorldMapOverlayEntryfmt[] = "nxiiiixxxxxxxxxx"; char const WorldSafeLocsEntryfmt[] = "niffffx"; #endif diff --git a/src/server/game/Entities/AreaTrigger/AreaTrigger.cpp b/src/server/game/Entities/AreaTrigger/AreaTrigger.cpp index b1ce1f0cdbb..b559c6dd2ba 100644 --- a/src/server/game/Entities/AreaTrigger/AreaTrigger.cpp +++ b/src/server/game/Entities/AreaTrigger/AreaTrigger.cpp @@ -75,7 +75,7 @@ bool AreaTrigger::CreateAreaTrigger(ObjectGuid::LowType guidlow, uint32 triggerE SetGuidValue(AREATRIGGER_CASTER, caster->GetGUID()); SetUInt32Value(AREATRIGGER_SPELLID, spell->Id); - SetUInt32Value(AREATRIGGER_SPELLVISUALID, spell->SpellVisual[0]); + SetUInt32Value(AREATRIGGER_SPELLVISUALID, spell->GetSpellVisual(GetMap()->GetDifficultyID())); SetUInt32Value(AREATRIGGER_DURATION, spell->GetDuration()); CopyPhaseFrom(caster); diff --git a/src/server/game/Entities/DynamicObject/DynamicObject.cpp b/src/server/game/Entities/DynamicObject/DynamicObject.cpp index 5f2bd4915de..a90d2832de9 100644 --- a/src/server/game/Entities/DynamicObject/DynamicObject.cpp +++ b/src/server/game/Entities/DynamicObject/DynamicObject.cpp @@ -97,7 +97,7 @@ bool DynamicObject::CreateDynamicObject(ObjectGuid::LowType guidlow, Unit* caste SetEntry(spell->Id); SetObjectScale(1.0f); SetGuidValue(DYNAMICOBJECT_CASTER, caster->GetGUID()); - SetUInt32Value(DYNAMICOBJECT_BYTES, spell->SpellVisual[0] | (type << 28)); + SetUInt32Value(DYNAMICOBJECT_BYTES, spell->GetSpellVisual(GetMap()->GetDifficultyID()) | (type << 28)); SetUInt32Value(DYNAMICOBJECT_SPELLID, spell->Id); SetFloatValue(DYNAMICOBJECT_RADIUS, radius); SetUInt32Value(DYNAMICOBJECT_CASTTIME, getMSTime()); diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 3d050f8011d..905fe5dfbf9 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -1147,7 +1147,7 @@ bool Player::Create(ObjectGuid::LowType guidlow, WorldPackets::Character::Charac } // original items - if (CharStartOutfitEntry const* oEntry = GetCharStartOutfitEntry(createInfo->Race, createInfo->Class, createInfo->Sex)) + if (CharStartOutfitEntry const* oEntry = sDB2Manager.GetCharStartOutfitEntry(createInfo->Race, createInfo->Class, createInfo->Sex)) { for (int j = 0; j < MAX_OUTFIT_ITEMS; ++j) { @@ -14879,7 +14879,7 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver, UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST_COUNT); UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST, quest->GetQuestId()); - if (uint32 questBit = GetQuestUniqueBitFlag(quest_id)) + if (uint32 questBit = sDB2Manager.GetQuestUniqueBitFlag(quest_id)) SetQuestCompletedBit(questBit, true); if (quest->HasFlag(QUEST_FLAGS_FLAGS_PVP)) @@ -15511,7 +15511,7 @@ void Player::RemoveRewardedQuest(uint32 questId, bool update /*= true*/) m_RewardedQuestsSave[questId] = QUEST_FORCE_DELETE_SAVE_TYPE; } - if (uint32 questBit = GetQuestUniqueBitFlag(questId)) + if (uint32 questBit = sDB2Manager.GetQuestUniqueBitFlag(questId)) SetQuestCompletedBit(questBit, false); if (update) @@ -18198,7 +18198,7 @@ void Player::_LoadQuestStatusRewarded(PreparedQueryResult result) // Skip loading special quests - they are also added to rewarded quests but only once and remain there forever // instead add them separately from load daily/weekly/monthly/seasonal if (!quest->IsDailyOrWeekly() && !quest->IsMonthly() && !quest->IsSeasonal()) - if (uint32 questBit = GetQuestUniqueBitFlag(quest_id)) + if (uint32 questBit = sDB2Manager.GetQuestUniqueBitFlag(quest_id)) SetQuestCompletedBit(questBit, true); } @@ -18238,7 +18238,7 @@ void Player::_LoadDailyQuestStatus(PreparedQueryResult result) continue; AddDynamicValue(PLAYER_DYNAMIC_FIELD_DAILY_QUESTS, quest_id); - if (uint32 questBit = GetQuestUniqueBitFlag(quest_id)) + if (uint32 questBit = sDB2Manager.GetQuestUniqueBitFlag(quest_id)) SetQuestCompletedBit(questBit, true); TC_LOG_DEBUG("entities.player.loading", "Daily quest (%u) cooldown for player (%s)", quest_id, GetGUID().ToString().c_str()); @@ -18264,7 +18264,7 @@ void Player::_LoadWeeklyQuestStatus(PreparedQueryResult result) continue; m_weeklyquests.insert(quest_id); - if (uint32 questBit = GetQuestUniqueBitFlag(quest_id)) + if (uint32 questBit = sDB2Manager.GetQuestUniqueBitFlag(quest_id)) SetQuestCompletedBit(questBit, true); TC_LOG_DEBUG("entities.player.loading", "Weekly quest {%u} cooldown for player (%s)", quest_id, GetGUID().ToString().c_str()); @@ -18291,7 +18291,7 @@ void Player::_LoadSeasonalQuestStatus(PreparedQueryResult result) continue; m_seasonalquests[event_id].insert(quest_id); - if (uint32 questBit = GetQuestUniqueBitFlag(quest_id)) + if (uint32 questBit = sDB2Manager.GetQuestUniqueBitFlag(quest_id)) SetQuestCompletedBit(questBit, true); TC_LOG_DEBUG("entities.player.loading", "Seasonal quest {%u} cooldown for player (%s)", quest_id, GetGUID().ToString().c_str()); @@ -18317,7 +18317,7 @@ void Player::_LoadMonthlyQuestStatus(PreparedQueryResult result) continue; m_monthlyquests.insert(quest_id); - if (uint32 questBit = GetQuestUniqueBitFlag(quest_id)) + if (uint32 questBit = sDB2Manager.GetQuestUniqueBitFlag(quest_id)) SetQuestCompletedBit(questBit, true); TC_LOG_DEBUG("entities.player.loading", "Monthly quest {%u} cooldown for player (%s)", quest_id, GetGUID().ToString().c_str()); @@ -23092,7 +23092,7 @@ void Player::SetMonthlyQuestStatus(uint32 quest_id) void Player::DailyReset() { for (uint32 questId : GetDynamicValues(PLAYER_DYNAMIC_FIELD_DAILY_QUESTS)) - if (uint32 questBit = GetQuestUniqueBitFlag(questId)) + if (uint32 questBit = sDB2Manager.GetQuestUniqueBitFlag(questId)) SetQuestCompletedBit(questBit, false); ClearDynamicValue(PLAYER_DYNAMIC_FIELD_DAILY_QUESTS); @@ -23113,7 +23113,7 @@ void Player::ResetWeeklyQuestStatus() return; for (uint32 questId : m_weeklyquests) - if (uint32 questBit = GetQuestUniqueBitFlag(questId)) + if (uint32 questBit = sDB2Manager.GetQuestUniqueBitFlag(questId)) SetQuestCompletedBit(questBit, false); m_weeklyquests.clear(); @@ -23131,7 +23131,7 @@ void Player::ResetSeasonalQuestStatus(uint16 event_id) return; for (uint32 questId : eventItr->second) - if (uint32 questBit = GetQuestUniqueBitFlag(questId)) + if (uint32 questBit = sDB2Manager.GetQuestUniqueBitFlag(questId)) SetQuestCompletedBit(questBit, false); m_seasonalquests.erase(eventItr); @@ -23145,7 +23145,7 @@ void Player::ResetMonthlyQuestStatus() return; for (uint32 questId : m_monthlyquests) - if (uint32 questBit = GetQuestUniqueBitFlag(questId)) + if (uint32 questBit = sDB2Manager.GetQuestUniqueBitFlag(questId)) SetQuestCompletedBit(questBit, false); m_monthlyquests.clear(); @@ -23618,22 +23618,9 @@ uint32 Player::GetResurrectionSpellId() for (AuraEffectList::const_iterator itr = dummyAuras.begin(); itr != dummyAuras.end(); ++itr) { // Soulstone Resurrection // prio: 3 (max, non death persistent) - if (prio < 2 && (*itr)->GetSpellInfo()->SpellVisual[0] == 99 && (*itr)->GetSpellInfo()->SpellIconID == 92) + if (prio < 2 && (*itr)->GetSpellInfo()->SpellFamilyName == SPELLFAMILY_WARLOCK && (*itr)->GetSpellInfo()->SpellFamilyFlags[1] & 0x1000000) { - switch ((*itr)->GetId()) - { - case 20707: spell_id = 3026; break; // rank 1 - case 20762: spell_id = 20758; break; // rank 2 - case 20763: spell_id = 20759; break; // rank 3 - case 20764: spell_id = 20760; break; // rank 4 - case 20765: spell_id = 20761; break; // rank 5 - case 27239: spell_id = 27240; break; // rank 6 - case 47883: spell_id = 47882; break; // rank 7 - default: - TC_LOG_ERROR("entities.player", "Unhandled spell %u: S.Resurrection", (*itr)->GetId()); - continue; - } - + spell_id = 3026; prio = 3; } // Twisting Nether // prio: 2 (max) @@ -26620,7 +26607,7 @@ void Player::RemoveOverrideSpell(uint32 overridenSpellId, uint32 newSpellId) void Player::LearnSpecializationSpells() { - if (std::vector<SpecializationSpellsEntry const*> const* specSpells = GetSpecializationSpells(GetSpecId(GetActiveTalentGroup()))) + if (std::vector<SpecializationSpellsEntry const*> const* specSpells = sDB2Manager.GetSpecializationSpells(GetSpecId(GetActiveTalentGroup()))) { for (size_t j = 0; j < specSpells->size(); ++j) { @@ -26642,7 +26629,7 @@ void Player::RemoveSpecializationSpells() { if (ChrSpecializationEntry const* specialization = sChrSpecializationByIndexStore[getClass()][i]) { - if (std::vector<SpecializationSpellsEntry const*> const* specSpells = GetSpecializationSpells(specialization->ID)) + if (std::vector<SpecializationSpellsEntry const*> const* specSpells = sDB2Manager.GetSpecializationSpells(specialization->ID)) { for (size_t j = 0; j < specSpells->size(); ++j) { diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 74056219a7e..5631b486774 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -5625,7 +5625,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere case 70664: { // Proc only from normal Rejuvenation - if (procSpell->SpellVisual[0] != 32) + if (procSpell->Id != 774) return false; Player* caster = ToPlayer(); @@ -5707,7 +5707,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere // At melee attack or Hammer of the Righteous spell damage considered as melee attack bool stacker = !procSpell || procSpell->Id == 53595; // spells with SPELL_DAMAGE_CLASS_MELEE excluding Judgements - bool damager = procSpell && (procSpell->EquippedItemClass != -1 || (procSpell->SpellIconID == 243 && procSpell->SpellVisual[0] == 39)); + bool damager = procSpell && (procSpell->EquippedItemClass != -1 || procSpell->Id == 71433 || procSpell->Id == 71434); if (!stacker && !damager) return false; @@ -9701,11 +9701,11 @@ void Unit::Dismount() MountCapabilityEntry const* Unit::GetMountCapability(uint32 mountType) const { if (!mountType) - return NULL; + return nullptr; - MountTypeEntry const* mountTypeEntry = sMountTypeStore.LookupEntry(mountType); - if (!mountTypeEntry) - return NULL; + DB2Manager::MountTypeXCapabilitySet const* capabilities = sDB2Manager.GetMountCapabilities(mountType); + if (!capabilities) + return nullptr; uint32 zoneId, areaId; GetZoneAndAreaId(zoneId, areaId); @@ -9713,9 +9713,9 @@ MountCapabilityEntry const* Unit::GetMountCapability(uint32 mountType) const if (GetTypeId() == TYPEID_PLAYER) ridingSkill = ToPlayer()->GetSkillValue(SKILL_RIDING); - for (uint32 i = MAX_MOUNT_CAPABILITIES; i > 0; --i) + for (MountTypeXCapabilityEntry const* mountTypeXCapability : *capabilities) { - MountCapabilityEntry const* mountCapability = sMountCapabilityStore.LookupEntry(mountTypeEntry->MountCapability[i - 1]); + MountCapabilityEntry const* mountCapability = sMountCapabilityStore.LookupEntry(mountTypeXCapability->MountCapabilityID); if (!mountCapability) continue; @@ -9753,7 +9753,7 @@ MountCapabilityEntry const* Unit::GetMountCapability(uint32 mountType) const return mountCapability; } - return NULL; + return nullptr; } bool Unit::IsServiceProvider() const @@ -10999,7 +10999,7 @@ void Unit::ModSpellCastTime(SpellInfo const* spellInfo, int32 & castTime, Spell* castTime = int32(float(castTime) * GetFloatValue(UNIT_MOD_CAST_SPEED)); else if (spellInfo->HasAttribute(SPELL_ATTR0_REQ_AMMO) && !spellInfo->HasAttribute(SPELL_ATTR2_AUTOREPEAT_FLAG)) castTime = int32(float(castTime) * m_modAttackSpeedPct[RANGED_ATTACK]); - else if (spellInfo->SpellVisual[0] == 3881 && HasAura(67556)) // cooking with Chef Hat. + else if (IsPartOfSkillLine(SKILL_COOKING, spellInfo->Id) && HasAura(67556)) // cooking with Chef Hat. castTime = 500; } @@ -11589,7 +11589,7 @@ uint32 Unit::GetPowerIndex(uint32 powerType) const if (ToPet() && ToPet()->getPetType() == HUNTER_PET) classId = CLASS_HUNTER; - return GetPowerIndexByClass(powerType, classId); + return sDB2Manager.GetPowerIndexByClass(powerType, classId); } int32 Unit::GetCreatePowers(Powers power) const diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index 066996a1bd5..ebf05876e10 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -380,6 +380,7 @@ enum InventorySlot }; struct FactionTemplateEntry; +struct MountCapabilityEntry; struct SpellValue; class AuraApplication; diff --git a/src/server/game/Garrison/Garrison.h b/src/server/game/Garrison/Garrison.h index 7123854cbc6..11311ef7fc3 100644 --- a/src/server/game/Garrison/Garrison.h +++ b/src/server/game/Garrison/Garrison.h @@ -37,6 +37,12 @@ enum GarrisonFollowerFlags GARRISON_FOLLOWER_FLAG_UNIQUE = 0x1 }; +enum GarrisonFollowerType +{ + FOLLOWER_TYPE_GARRISON = 1, + FOLLOWER_TYPE_SHIPYARD = 2 +}; + enum GarrisonAbilityFlags { GARRISON_ABILITY_FLAG_TRAIT = 0x01, diff --git a/src/server/game/Garrison/GarrisonMgr.cpp b/src/server/game/Garrison/GarrisonMgr.cpp index 349ebdc42a1..86392a26d36 100644 --- a/src/server/game/Garrison/GarrisonMgr.cpp +++ b/src/server/game/Garrison/GarrisonMgr.cpp @@ -46,6 +46,9 @@ void GarrisonMgr::Initialize() { if (GarrAbilityEntry const* ability = sGarrAbilityStore.LookupEntry(followerAbility->GarrAbilityID)) { + if (ability->FollowerTypeID != FOLLOWER_TYPE_GARRISON) + continue; + if (!(ability->Flags & GARRISON_ABILITY_CANNOT_ROLL) && ability->Flags & GARRISON_ABILITY_FLAG_TRAIT) _garrisonFollowerRandomTraits.insert(ability); diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 059eb5304fd..08a350b19f7 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -2616,7 +2616,7 @@ void ObjectMgr::LoadItemTemplates() itemTemplate.FlagsCu = 0; itemTemplate.SpellPPMRate = 0.0f; - if (std::vector<ItemSpecOverrideEntry const*> const* itemSpecOverrides = GetItemSpecOverrides(sparse->ID)) + if (std::vector<ItemSpecOverrideEntry const*> const* itemSpecOverrides = sDB2Manager.GetItemSpecOverrides(sparse->ID)) { for (ItemSpecOverrideEntry const* itemSpecOverride : *itemSpecOverrides) itemTemplate.Specializations[0].insert(itemSpecOverride->SpecID); @@ -2669,12 +2669,8 @@ void ObjectMgr::LoadItemTemplates() // Check if item templates for DBC referenced character start outfit are present std::set<uint32> notFoundOutfit; - for (uint32 i = 1; i < sCharStartOutfitStore.GetNumRows(); ++i) + for (CharStartOutfitEntry const* entry : sCharStartOutfitStore) { - CharStartOutfitEntry const* entry = sCharStartOutfitStore.LookupEntry(i); - if (!entry) - continue; - for (int j = 0; j < MAX_OUTFIT_ITEMS; ++j) { if (entry->ItemID[j] <= 0) @@ -2978,7 +2974,7 @@ void ObjectMgr::PlayerCreateInfoAddItemHelper(uint32 race_, uint32 class_, uint3 for (uint32 gender = 0; gender < GENDER_NONE; ++gender) { - if (CharStartOutfitEntry const* entry = GetCharStartOutfitEntry(race_, class_, gender)) + if (CharStartOutfitEntry const* entry = sDB2Manager.GetCharStartOutfitEntry(race_, class_, gender)) { bool found = false; for (uint8 x = 0; x < MAX_OUTFIT_ITEMS; ++x) diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp index 9b8daf553a4..4083a07523c 100644 --- a/src/server/game/Guilds/Guild.cpp +++ b/src/server/game/Guilds/Guild.cpp @@ -2157,10 +2157,9 @@ void Guild::SendLoginInfo(WorldSession* session) player->GetSession()->SendPacket(renameFlag.Write()); } - for (uint32 i = 0; i < sGuildPerkSpellsStore.GetNumRows(); ++i) - if (GuildPerkSpellsEntry const* entry = sGuildPerkSpellsStore.LookupEntry(i)) - if (entry->GuildLevel <= GetLevel()) - player->LearnSpell(entry->SpellID, true); + for (GuildPerkSpellsEntry const* entry : sGuildPerkSpellsStore) + if (entry->GuildLevel <= GetLevel()) + player->LearnSpell(entry->SpellID, true); m_achievementMgr.SendAllAchievementData(player); @@ -2704,10 +2703,9 @@ void Guild::DeleteMember(ObjectGuid guid, bool isDisbanding, bool isKicked, bool player->SetRank(0); player->SetGuildLevel(0); - for (uint32 i = 0; i < sGuildPerkSpellsStore.GetNumRows(); ++i) - if (GuildPerkSpellsEntry const* entry = sGuildPerkSpellsStore.LookupEntry(i)) - if (entry->GuildLevel <= GetLevel()) - player->RemoveSpell(entry->SpellID, false, false); + for (GuildPerkSpellsEntry const* entry : sGuildPerkSpellsStore) + if (entry->GuildLevel <= GetLevel()) + player->RemoveSpell(entry->SpellID, false, false); } _DeleteMemberFromDB(guid.GetCounter()); diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index 87d50b99bda..c823bb57e9e 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -2335,7 +2335,7 @@ void WorldSession::HandleRandomizeCharNameOpcode(WorldPackets::Character::Genera WorldPackets::Character::GenerateRandomCharacterNameResult result; result.Success = true; - result.Name = GetRandomCharacterName(packet.Race, packet.Sex); + result.Name = sDB2Manager.GetNameGenEntry(packet.Race, packet.Sex, GetSessionDbcLocale()); SendPacket(result.Write()); } diff --git a/src/server/game/Handlers/MailHandler.cpp b/src/server/game/Handlers/MailHandler.cpp index dd55c6f2f06..60690f6c79b 100644 --- a/src/server/game/Handlers/MailHandler.cpp +++ b/src/server/game/Handlers/MailHandler.cpp @@ -628,7 +628,7 @@ void WorldSession::HandleMailCreateTextItem(WorldPackets::Mail::MailCreateTextIt return; } - bodyItem->SetText(mailTemplateEntry->Body_lang); + bodyItem->SetText(mailTemplateEntry->Body->Str[GetSessionDbcLocale()]); } else bodyItem->SetText(m->body); diff --git a/src/server/game/Maps/TransportMgr.h b/src/server/game/Maps/TransportMgr.h index 74e8d00e0f7..2df1c9fb0ef 100644 --- a/src/server/game/Maps/TransportMgr.h +++ b/src/server/game/Maps/TransportMgr.h @@ -21,8 +21,8 @@ #include <G3D/Quat.h> #include "Spline.h" #include "DBCStores.h" +#include "DB2Stores.h" #include "ObjectGuid.h" -#include "DB2Structure.h" struct KeyFrame; struct GameObjectTemplate; @@ -99,7 +99,7 @@ typedef std::map<uint32, TransportAnimation> TransportAnimationContainer; class TransportMgr { - friend void LoadDBCStores(std::string const&); + friend void DB2Manager::LoadStores(std::string const&); public: static TransportMgr* instance() diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 461fc1d0a76..79971717305 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -2185,12 +2185,6 @@ void AuraEffect::HandleAuraTransform(AuraApplication const* aurApp, uint8 mode, if (uint32 modelid = ci->GetRandomValidModelId()) model_id = modelid; // Will use the default model here - // Polymorph (sheep) - if (GetSpellInfo()->SpellFamilyName == SPELLFAMILY_MAGE && GetSpellInfo()->SpellIconID == 82 && GetSpellInfo()->SpellVisual[0] == 12978) - if (Unit* caster = GetCaster()) - if (caster->HasAura(52648)) // Glyph of the Penguin - model_id = 26452; - target->SetDisplayId(model_id); // Dragonmaw Illusion (set mount model also) diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index e57576cfb7b..516de90d454 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -1353,19 +1353,6 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b case SPELLFAMILY_MAGE: if (!caster) break; - /// @todo This should be moved to similar function in spell::hit - if (GetSpellInfo()->SpellFamilyFlags[0] & 0x01000000) - { - // Polymorph Sound - Sheep && Penguin - if (GetSpellInfo()->SpellIconID == 82 && GetSpellInfo()->SpellVisual[0] == 12978) - { - // Glyph of the Penguin - if (caster->HasAura(52648)) - caster->CastSpell(target, 61635, true); - else - caster->CastSpell(target, 61634, true); - } - } switch (GetId()) { case 12536: // Clearcasting diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 6109ca0a5e1..3b0da910b43 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -4276,6 +4276,7 @@ void Spell::SendChannelStart(uint32 duration) m_caster->SetChannelObjectGuid(channelTarget); m_caster->SetUInt32Value(UNIT_CHANNEL_SPELL, m_spellInfo->Id); + m_caster->SetUInt32Value(UNIT_CHANNEL_SPELL_X_SPELL_VISUAL, m_spellInfo->GetSpellXSpellVisualId(m_caster->GetMap()->GetDifficultyID())); } void Spell::SendResurrectRequest(Player* target) @@ -6663,7 +6664,7 @@ bool Spell::IsAutoActionResetSpell() const bool Spell::IsNeedSendToClient() const { - return m_spellInfo->SpellVisual[0] || m_spellInfo->SpellVisual[1] || m_spellInfo->IsChanneled() || + return m_spellInfo->GetSpellXSpellVisualId(m_caster->GetMap()->GetDifficultyID()) || m_spellInfo->IsChanneled() || (m_spellInfo->HasAttribute(SPELL_ATTR8_AURA_SEND_AMOUNT)) || m_spellInfo->Speed > 0.0f || (!m_triggeredByAuraSpell && !IsTriggered()); } diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index fdc24750f6e..3af8adabd7f 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -499,7 +499,7 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex) case SPELLFAMILY_DRUID: { // Ferocious Bite - if (m_caster->GetTypeId() == TYPEID_PLAYER && (m_spellInfo->SpellFamilyFlags[0] & 0x000800000) && m_spellInfo->SpellVisual[0] == 6587) + if (m_caster->GetTypeId() == TYPEID_PLAYER && m_spellInfo->SpellFamilyFlags[3] & 0x1000) { // converts each extra point of energy ( up to 25 energy ) into additional damage int32 energy = -(m_caster->ModifyPower(POWER_ENERGY, -25)); @@ -2686,16 +2686,13 @@ void Spell::EffectEnchantItemTmp(SpellEffIndex effIndex) duration = 3600; // 1 hour // shaman family enchantments else if (m_spellInfo->SpellFamilyName == SPELLFAMILY_SHAMAN) - duration = 1800; // 30 mins + duration = 3600; // 30 mins // other cases with this SpellVisual already selected - else if (m_spellInfo->SpellVisual[0] == 215) + else if (m_spellInfo->GetSpellVisual(DIFFICULTY_NONE) == 215) duration = 1800; // 30 mins // some fishing pole bonuses except Glow Worm which lasts full hour - else if (m_spellInfo->SpellVisual[0] == 563 && m_spellInfo->Id != 64401) + else if (m_spellInfo->GetSpellVisual(DIFFICULTY_NONE) == 563 && m_spellInfo->Id != 64401) duration = 600; // 10 mins - // shaman rockbiter enchantments - else if (m_spellInfo->SpellVisual[0] == 0) - duration = 1800; // 30 mins else if (m_spellInfo->Id == 29702) duration = 300; // 5 mins else if (m_spellInfo->Id == 37360) diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index 26b3ee17f12..f9f777f22f3 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -947,7 +947,8 @@ SpellEffectInfo::StaticData SpellEffectInfo::_data[TOTAL_SPELL_EFFECTS] = {EFFECT_IMPLICIT_TARGET_NONE, TARGET_OBJECT_TYPE_NONE}, // 244 SPELL_EFFECT_244 }; -SpellInfo::SpellInfo(SpellEntry const* spellEntry, SpellEffectEntryMap const& effectsMap) : _hasPowerDifficultyData(false) +SpellInfo::SpellInfo(SpellEntry const* spellEntry, SpellEffectEntryMap const& effectsMap, SpellVisualMap&& visuals) + : _hasPowerDifficultyData(false) { Id = spellEntry->ID; @@ -1006,13 +1007,11 @@ SpellInfo::SpellInfo(SpellEntry const* spellEntry, SpellEffectEntryMap const& ef Speed = _misc ? _misc->Speed : 0; SchoolMask = _misc ? _misc->SchoolMask : 0; AttributesCu = 0; - - for (uint8 i = 0; i < 2; ++i) - SpellVisual[i] = _misc ? _misc->SpellVisualID[i] : 0; - SpellIconID = _misc ? _misc->SpellIconID : 0; ActiveIconID = _misc ? _misc->ActiveIconID : 0; + _visuals = std::move(visuals); + // SpellScalingEntry SpellScalingEntry const* _scaling = GetSpellScaling(); Scaling.CastTimeMin = _scaling ? _scaling->CastTimeMin : 0; @@ -2801,6 +2800,42 @@ bool SpellInfo::IsHighRankOf(SpellInfo const* spellInfo) const return false; } +uint32 SpellInfo::GetSpellXSpellVisualId(Difficulty difficulty) const +{ + DifficultyEntry const* difficultyEntry = sDifficultyStore.LookupEntry(difficulty); + while (difficultyEntry) + { + auto itr = _visuals.find(difficulty); + if (itr != _visuals.end()) + for (SpellXSpellVisualEntry const* visual : itr->second) + if (!visual->PlayerConditionID) + return visual->ID; + + difficultyEntry = sDifficultyStore.LookupEntry(difficultyEntry->FallbackDifficultyID); + } + + auto itr = _visuals.find(DIFFICULTY_NONE); + if (itr != _visuals.end()) + for (SpellXSpellVisualEntry const* visual : itr->second) + if (!visual->PlayerConditionID) + return visual->ID; + + return 0; +} + +uint32 SpellInfo::GetSpellVisual(Difficulty difficulty, Player* /*forPlayer*/ /*= nullptr*/) const +{ + if (SpellXSpellVisualEntry const* visual = sSpellXSpellVisualStore.LookupEntry(GetSpellXSpellVisualId(difficulty))) + { + //if (visual->SpellVisualID[1] && forPlayer->GetViolenceLevel() operator 2) + // return visual->SpellVisualID[1]; + + return visual->SpellVisualID[0]; + } + + return 0; +} + void SpellInfo::_InitializeExplicitTargetMask() { bool srcSet = false; diff --git a/src/server/game/Spells/SpellInfo.h b/src/server/game/Spells/SpellInfo.h index 6d1d787e303..5fd960066f0 100644 --- a/src/server/game/Spells/SpellInfo.h +++ b/src/server/game/Spells/SpellInfo.h @@ -318,6 +318,9 @@ typedef std::unordered_map<uint32, SpellEffectInfoVector> SpellEffectInfoMap; typedef std::vector<SpellEffectEntry const*> SpellEffectEntryVector; typedef std::unordered_map<uint32, SpellEffectEntryVector> SpellEffectEntryMap; +typedef std::vector<SpellXSpellVisualEntry const*> SpellVisualVector; +typedef std::unordered_map<uint32, SpellVisualVector> SpellVisualMap; + typedef std::vector<AuraEffect*> AuraEffectVector; class SpellInfo @@ -446,7 +449,7 @@ public: SpellTotemsEntry const* GetSpellTotems() const; SpellMiscEntry const* GetSpellMisc() const; - SpellInfo(SpellEntry const* spellEntry, SpellEffectEntryMap const& effectsMap); + SpellInfo(SpellEntry const* spellEntry, SpellEffectEntryMap const& effectsMap, SpellVisualMap&& visuals); ~SpellInfo(); uint32 GetCategory() const; @@ -566,6 +569,9 @@ public: bool IsDifferentRankOf(SpellInfo const* spellInfo) const; bool IsHighRankOf(SpellInfo const* spellInfo) const; + uint32 GetSpellXSpellVisualId(Difficulty difficulty) const; + uint32 GetSpellVisual(Difficulty difficulty, Player* forPlayer = nullptr) const; + // loading helpers void _InitializeExplicitTargetMask(); bool _IsPositiveEffect(uint32 effIndex, bool deep) const; @@ -582,6 +588,7 @@ public: SpellEffectInfo const* GetEffect(WorldObject const* obj, uint32 index) const { return GetEffect(obj->GetMap()->GetDifficultyID(), index); } SpellEffectInfoMap _effects; + SpellVisualMap _visuals; bool _hasPowerDifficultyData; }; diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 6002a7415f0..ac125950c24 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -71,24 +71,24 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellInfo const* spellproto) case SPELLFAMILY_GENERIC: { // Entrapment -- 135373 - if (spellproto->SpellIconID == 20 && spellproto->SpellVisual[0] == 39588) + if (spellproto->SpellIconID == 20 && spellproto->GetSpellVisual(DIFFICULTY_NONE) == 39588) return DIMINISHING_ROOT; // Intimidation -- 24394 - if (spellproto->SpellIconID == 166 && spellproto->SpellVisual[0] == 2816) + if (spellproto->SpellIconID == 166 && spellproto->GetSpellVisual(DIFFICULTY_NONE) == 2816) return DIMINISHING_STUN; // Pulverize (Primal Earth Elemental) -- 118345 - if (spellproto->SpellIconID == 4507 && spellproto->SpellVisual[0] == 39877) + if (spellproto->SpellIconID == 4507 && spellproto->GetSpellVisual(DIFFICULTY_NONE) == 39877) return DIMINISHING_STUN; // Static Charge (Capacitor Totem) -- 118905 - if (spellproto->SpellIconID == 54 && spellproto->SpellVisual[0] == 24442) + if (spellproto->SpellIconID == 54 && spellproto->GetSpellVisual(DIFFICULTY_NONE) == 24442) return DIMINISHING_STUN; // Remorseless Winter -- 115001 - if (spellproto->SpellIconID == 5744 && spellproto->SpellVisual[0] == 23514) + if (spellproto->SpellIconID == 5744 && spellproto->GetSpellVisual(DIFFICULTY_NONE) == 23514) return DIMINISHING_STUN; // Gorefiend's Grasp -- 108199 - if (spellproto->SpellIconID == 5743 && spellproto->SpellVisual[0] == 28937) + if (spellproto->SpellIconID == 5743 && spellproto->GetSpellVisual(DIFFICULTY_NONE) == 28937) return DIMINISHING_AOE_KNOCKBACK; break; } @@ -153,7 +153,7 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellInfo const* spellproto) if (spellproto->SpellFamilyFlags[1] & 0x8000000) return DIMINISHING_INCAPACITATE; // Blood Horror -- 137143, no flags (17986) - if (spellproto->SpellIconID == 6447 && spellproto->SpellVisual[0] == 26758) + if (spellproto->SpellIconID == 6447 && spellproto->GetSpellVisual(DIFFICULTY_NONE) == 26758) return DIMINISHING_INCAPACITATE; // Fear -- 118699 @@ -197,11 +197,11 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellInfo const* spellproto) if (spellproto->SpellFamilyFlags[0] & 0x2000) return DIMINISHING_STUN; // Rake -- 163505 -- no flags on the stun, 20490 - if (spellproto->SpellIconID == 494 && spellproto->SpellVisual[0] == 38283) + if (spellproto->SpellIconID == 494 && spellproto->GetSpellVisual(DIFFICULTY_NONE) == 38283) return DIMINISHING_STUN; // Incapacitating Roar -- 99, no flags on the stun, 14 - if (spellproto->SpellIconID == 960 && spellproto->SpellVisual[0] == 38528) + if (spellproto->SpellIconID == 960 && spellproto->GetSpellVisual(DIFFICULTY_NONE) == 38528) return DIMINISHING_INCAPACITATE; // Cyclone -- 33786 @@ -223,7 +223,7 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellInfo const* spellproto) if (spellproto->SpellFamilyFlags[0] & 0x200) return DIMINISHING_ROOT; // Mass Entanglement -- 102359, no flags on the root, 13535 - if (spellproto->SpellIconID == 5782 && spellproto->SpellVisual[0] == 38269) + if (spellproto->SpellIconID == 5782 && spellproto->GetSpellVisual(DIFFICULTY_NONE) == 38269) return DIMINISHING_ROOT; // Faerie Fire -- 770, 20 seconds in PvP (6.0) @@ -262,14 +262,14 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellInfo const* spellproto) // return DIMINISHING_AOE_KNOCKBACK; // Charge (Tenacity pet) -- 53148, no flags (5526) - if (spellproto->SpellIconID == 1559 && spellproto->SpellVisual[0] == 39480) + if (spellproto->SpellIconID == 1559 && spellproto->GetSpellVisual(DIFFICULTY_NONE) == 39480) return DIMINISHING_ROOT; // Narrow Escape -- 136634, no flags (17964) if (spellproto->SpellIconID == 3342 && spellproto->SchoolMask == 8) return DIMINISHING_ROOT; // Binding Shot -- 117526, no flags (15581) - if (spellproto->SpellIconID == 4612 && spellproto->SpellVisual[0] == 6859) + if (spellproto->SpellIconID == 4612 && spellproto->GetSpellVisual(DIFFICULTY_NONE) == 6859) return DIMINISHING_STUN; // Freezing Trap -- 3355 @@ -316,7 +316,7 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellInfo const* spellproto) if (spellproto->SpellFamilyFlags[2] & 0x4000) return DIMINISHING_ROOT; // Frost Shock (with Frozen Power) -- 63685, no flags (6918) - if (spellproto->SpellIconID == 193 && spellproto->SpellVisual[0] == 39876) + if (spellproto->SpellIconID == 193 && spellproto->GetSpellVisual(DIFFICULTY_NONE) == 39876) return DIMINISHING_ROOT; break; } @@ -327,31 +327,31 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellInfo const* spellproto) return DIMINISHING_SILENCE; // Chains of Ice (with Chilblains) -- 96294, no flags (13020) - if (spellproto->SpellIconID == 180 && spellproto->SpellVisual[0] == 20135) + if (spellproto->SpellIconID == 180 && spellproto->GetSpellVisual(DIFFICULTY_NONE) == 20135) return DIMINISHING_ROOT; // Asphyxiate -- 108194 if (spellproto->SpellFamilyFlags[2] & 0x100000) return DIMINISHING_STUN; // Gnaw (Ghoul) -- 91800, no flags (12511) - if (spellproto->SpellIconID == 3010 && spellproto->SpellVisual[0] == 38760) + if (spellproto->SpellIconID == 3010 && spellproto->GetSpellVisual(DIFFICULTY_NONE) == 38760) return DIMINISHING_STUN; // Monstrous Blow (Ghoul w/ Dark Transformation active) -- 91797, no flags (12510) - if (spellproto->SpellIconID == 15 && spellproto->SpellVisual[0] == 38761) + if (spellproto->SpellIconID == 15 && spellproto->GetSpellVisual(DIFFICULTY_NONE) == 38761) return DIMINISHING_STUN; break; } case SPELLFAMILY_PRIEST: { // Glyph of Mind Blast -- 87194, no flags (10092) - if (spellproto->SpellIconID == 2114 && spellproto->SpellVisual[0] == 38927) + if (spellproto->SpellIconID == 2114 && spellproto->GetSpellVisual(DIFFICULTY_NONE) == 38927) return DIMINISHING_ROOT; // Void Tendrils -- 114404, no flags (15067) - if (spellproto->SpellIconID == 5816 && spellproto->SpellVisual[0] == 25199) + if (spellproto->SpellIconID == 5816 && spellproto->GetSpellVisual(DIFFICULTY_NONE) == 25199) return DIMINISHING_ROOT; // Dominate Mind -- 605 - if (spellproto->SpellFamilyFlags[0] & 0x20000 && spellproto->SpellVisual[0] == 39068) + if (spellproto->SpellFamilyFlags[0] & 0x20000 && spellproto->GetSpellVisual(DIFFICULTY_NONE) == 39068) return DIMINISHING_INCAPACITATE; // Holy Word: Chastise -- 88625 if (spellproto->SpellFamilyFlags[2] & 0x20) @@ -372,7 +372,7 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellInfo const* spellproto) case SPELLFAMILY_MONK: { // Disable -- 116706, no flags (15483) - if (spellproto->SpellIconID == 23 && spellproto->SpellVisual[0] == 39984) + if (spellproto->SpellIconID == 23 && spellproto->GetSpellVisual(DIFFICULTY_NONE) == 39984) return DIMINISHING_ROOT; // Charging Ox Wave -- 119392 @@ -386,13 +386,13 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellInfo const* spellproto) return DIMINISHING_STUN; // Glyph of Breath of Fire -- 123393, no flags (16504) - if (spellproto->SpellIconID == 15 && spellproto->SpellVisual[0] == 25408) + if (spellproto->SpellIconID == 15 && spellproto->GetSpellVisual(DIFFICULTY_NONE) == 25408) return DIMINISHING_INCAPACITATE; // Paralysis -- 115078 if (spellproto->SpellFamilyFlags[2] & 0x800000) return DIMINISHING_INCAPACITATE; // Ring of Peace -- 137460, no flags (18006) - if (spellproto->SpellIconID == 7195 && spellproto->SpellVisual[0] == 39999) + if (spellproto->SpellIconID == 7195 && spellproto->GetSpellVisual(DIFFICULTY_NONE) == 39999) return DIMINISHING_INCAPACITATE; break; } @@ -446,7 +446,7 @@ int32 GetDiminishingReturnsLimitDuration(SpellInfo const* spellproto) case SPELLFAMILY_HUNTER: { // Binding Shot - 3 seconds in PvP (6.0) - if (spellproto->SpellIconID == 4612 && spellproto->SpellVisual[0] == 6859) + if (spellproto->SpellIconID == 4612 && spellproto->GetSpellVisual(DIFFICULTY_NONE) == 6859) return 3 * IN_MILLISECONDS; // Wyvern Sting - 6 seconds in PvP (6.0) if (spellproto->SpellFamilyFlags[1] & 0x1000) @@ -2745,16 +2745,13 @@ void SpellMgr::LoadSpellInfoStore() mSpellInfoMap.resize(sSpellStore.GetNumRows(), NULL); std::unordered_map<uint32, SpellEffectEntryMap> effectsBySpell; + std::unordered_map<uint32, SpellVisualMap> visualsBySpell; - for (uint32 i = 0; i < sSpellEffectStore.GetNumRows(); ++i) + for (SpellEffectEntry const* effect : sSpellEffectStore) { - SpellEffectEntry const* effect = sSpellEffectStore.LookupEntry(i); - if (!effect) - continue; - if (effect->EffectIndex >= MAX_SPELL_EFFECTS) { - TC_LOG_ERROR("server.loading", "Spell %u has invalid EffectIndex %u, max is %u, skipped", i, effect->EffectIndex, uint32(MAX_SPELL_EFFECTS)); + TC_LOG_ERROR("server.loading", "Spell %u has invalid EffectIndex %u, max is %u, skipped", effect->SpellID, effect->EffectIndex, uint32(MAX_SPELL_EFFECTS)); continue; } @@ -2765,9 +2762,12 @@ void SpellMgr::LoadSpellInfoStore() effectsForDifficulty[effect->EffectIndex] = effect; } + for (SpellXSpellVisualEntry const* visual : sSpellXSpellVisualStore) + visualsBySpell[visual->SpellID][visual->DifficultyID].push_back(visual); + for (uint32 i = 0; i < sSpellStore.GetNumRows(); ++i) if (SpellEntry const* spellEntry = sSpellStore.LookupEntry(i)) - mSpellInfoMap[i] = new SpellInfo(spellEntry, effectsBySpell[i]); + mSpellInfoMap[i] = new SpellInfo(spellEntry, effectsBySpell[i], std::move(visualsBySpell[i])); TC_LOG_INFO("server.loading", ">> Loaded SpellInfo store in %u ms", GetMSTimeDiffToNow(oldMSTime)); } @@ -2938,7 +2938,7 @@ void SpellMgr::LoadSpellInfoCustomAttributes() if (!spellInfo->_IsPositiveEffect(EFFECT_2, false)) spellInfo->AttributesCu |= SPELL_ATTR0_CU_NEGATIVE_EFF2; - if (spellInfo->SpellVisual[0] == 3879) + if (spellInfo->GetSpellVisual(DIFFICULTY_NONE) == 3879) spellInfo->AttributesCu |= SPELL_ATTR0_CU_CONE_BACK; if (talentSpells.count(spellInfo->Id)) diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp index 4d1d484cb2f..8fa5bd079e6 100644 --- a/src/server/scripts/Commands/cs_lookup.cpp +++ b/src/server/scripts/Commands/cs_lookup.cpp @@ -919,7 +919,7 @@ public: // Search in TaxiNodes.dbc for (TaxiNodesEntry const* nodeEntry : sTaxiNodesStore) { - std::string name = nodeEntry->Name_lang->Str[locale]; + std::string name = nodeEntry->Name->Str[locale]; if (name.empty()) continue; diff --git a/src/server/shared/Database/Implementation/HotfixDatabase.cpp b/src/server/shared/Database/Implementation/HotfixDatabase.cpp index b8e2b2c8fee..be2ff140fd8 100644 --- a/src/server/shared/Database/Implementation/HotfixDatabase.cpp +++ b/src/server/shared/Database/Implementation/HotfixDatabase.cpp @@ -33,23 +33,67 @@ void HotfixDatabaseConnection::DoPrepareStatements() // AreaGroupMember.db2 PrepareStatement(HOTFIX_SEL_AREA_GROUP_MEMBER, "SELECT ID, AreaGroupID, AreaID FROM area_group_member ORDER BY ID DESC", CONNECTION_SYNCH); + // AuctionHouse.db2 + PrepareStatement(HOTFIX_SEL_AUCTION_HOUSE, "SELECT ID, FactionID, DepositRate, ConsignmentRate, Name FROM auction_house ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_AUCTION_HOUSE, "SELECT ID, Name_lang FROM auction_house_locale WHERE locale = ?", CONNECTION_SYNCH); + + // BarberShopStyle.db2 + PrepareStatement(HOTFIX_SEL_BARBER_SHOP_STYLE, "SELECT ID, Type, DisplayName, Description, CostModifier, Race, Sex, Data FROM barber_shop_style" + " ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_BARBER_SHOP_STYLE, "SELECT ID, DisplayName_lang, Description_lang FROM barber_shop_style_locale WHERE locale = ?", CONNECTION_SYNCH); + // BroadcastText.db2 - PrepareStatement(HOTFIX_SEL_BROADCAST_TEXT, "SELECT ID, Language, MaleText, FemaleText, EmoteID1, EmoteID2, EmoteID3, " - "EmoteDelay1, EmoteDelay2, EmoteDelay3, SoundID, UnkEmoteID, Type FROM broadcast_text ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_BROADCAST_TEXT, "SELECT ID, Language, MaleText, FemaleText, EmoteID1, EmoteID2, EmoteID3, EmoteDelay1, EmoteDelay2, " + "EmoteDelay3, SoundID, UnkEmoteID, Type FROM broadcast_text ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_BROADCAST_TEXT, "SELECT ID, MaleText_lang, FemaleText_lang FROM broadcast_text_locale WHERE locale = ?", CONNECTION_SYNCH); + // CharStartOutfit.db2 + PrepareStatement(HOTFIX_SEL_CHAR_START_OUTFIT, "SELECT ID, RaceID, ClassID, GenderID, OutfitID, 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, PetFamilyID FROM char_start_outfit ORDER BY ID DESC", CONNECTION_SYNCH); + + // ChrClassesXPowerTypes.db2 + PrepareStatement(HOTFIX_SEL_CHR_CLASSES_X_POWER_TYPES, "SELECT ID, ClassID, PowerType FROM chr_classes_x_power_types ORDER BY ID DESC", CONNECTION_SYNCH); + + // CinematicSequences.db2 + PrepareStatement(HOTFIX_SEL_CINEMATIC_SEQUENCES, "SELECT ID, SoundID, Camera1, Camera2, Camera3, Camera4, Camera5, Camera6, Camera7, Camera8" + " FROM cinematic_sequences ORDER BY ID DESC", CONNECTION_SYNCH); + + // CreatureDisplayInfo.db2 + PrepareStatement(HOTFIX_SEL_CREATURE_DISPLAY_INFO, "SELECT ID, ModelID, SoundID, ExtendedDisplayInfoID, CreatureModelScale, Unknown620, " + "CreatureModelAlpha, TextureVariation1, TextureVariation2, TextureVariation3, PortraitTextureName, PortraitCreatureDisplayInfoID, SizeClass, " + "BloodID, NPCSoundID, ParticleColorID, CreatureGeosetData, ObjectEffectPackageID, AnimReplacementSetID, Flags, Gender, StateSpellVisualKitID" + " FROM creature_display_info ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_CREATURE_DISPLAY_INFO, "SELECT ID, TextureVariation_lang1, TextureVariation_lang2, TextureVariation_lang3, " + "PortraitTextureName_lang FROM creature_display_info_locale WHERE locale = ?", CONNECTION_SYNCH); + + // CreatureType.db2 + PrepareStatement(HOTFIX_SEL_CREATURE_TYPE, "SELECT ID, Name, Flags FROM creature_type ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_CREATURE_TYPE, "SELECT ID, Name_lang FROM creature_type_locale WHERE locale = ?", CONNECTION_SYNCH); + // CurrencyTypes.db2 - PrepareStatement(HOTFIX_SEL_CURRENCY_TYPES, "SELECT ID, CategoryID, Name, InventoryIcon1, InventoryIcon2, SpellWeight, SpellCategory, " - "MaxQty, MaxEarnablePerWeek, Flags, Quality, Description FROM currency_types ORDER BY ID DESC", CONNECTION_SYNCH); - PREPARE_LOCALE_STMT(HOTFIX_SEL_CURRENCY_TYPES, "SELECT ID, Name_lang, InventoryIcon1_lang, InventoryIcon2_lang, " - "Description_lang FROM currency_types_locale WHERE locale = ?", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_CURRENCY_TYPES, "SELECT ID, CategoryID, Name, InventoryIcon1, InventoryIcon2, SpellWeight, SpellCategory, MaxQty, " + "MaxEarnablePerWeek, Flags, Quality, Description FROM currency_types ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_CURRENCY_TYPES, "SELECT ID, Name_lang, InventoryIcon1_lang, InventoryIcon2_lang, Description_lang" + " FROM currency_types_locale WHERE locale = ?", CONNECTION_SYNCH); // CurvePoint.db2 PrepareStatement(HOTFIX_SEL_CURVE_POINT, "SELECT ID, CurveID, `Index`, X, Y FROM curve_point ORDER BY ID DESC", CONNECTION_SYNCH); + // DestructibleModelData.db2 + PrepareStatement(HOTFIX_SEL_DESTRUCTIBLE_MODEL_DATA, "SELECT ID, StateDamagedDisplayID, StateDamagedImpactEffectDoodadSet, StateDamagedAmbientDoodadSet, " + "StateDamagedNameSet, StateDestroyedDisplayID, StateDestroyedDestructionDoodadSet, StateDestroyedImpactEffectDoodadSet, StateDestroyedAmbientDoodadSet, " + "StateDestroyedNameSet, StateRebuildingDisplayID, StateRebuildingDestructionDoodadSet, StateRebuildingImpactEffectDoodadSet, " + "StateRebuildingAmbientDoodadSet, StateRebuildingNameSet, StateSmokeDisplayID, StateSmokeInitDoodadSet, StateSmokeAmbientDoodadSet, StateSmokeNameSet, " + "EjectDirection, RepairGroundFx, DoNotHighlight, HealEffect, HealEffectSpeed FROM destructible_model_data ORDER BY ID DESC", CONNECTION_SYNCH); + + // DurabilityQuality.db2 + PrepareStatement(HOTFIX_SEL_DURABILITY_QUALITY, "SELECT ID, QualityMod FROM durability_quality ORDER BY ID DESC", CONNECTION_SYNCH); + // GameObjects.db2 - PrepareStatement(HOTFIX_SEL_GAMEOBJECTS, "SELECT ID, MapID, DisplayID, PositionX, PositionY, PositionZ, RotationX, RotationY, RotationZ, RotationW, Size, " - "PhaseUseFlags, PhaseID, PhaseGroupID, Type, Data0, Data1, Data2, Data3, Data4, Data5, Data6, Data7, Name FROM gameobjects ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_GAMEOBJECTS, "SELECT ID, MapID, DisplayID, PositionX, PositionY, PositionZ, RotationX, RotationY, RotationZ, " + "RotationW, Size, PhaseUseFlags, PhaseID, PhaseGroupID, Type, Data0, Data1, Data2, Data3, Data4, Data5, Data6, Data7, Name FROM gameobjects" + " ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_GAMEOBJECTS, "SELECT ID, Name_lang FROM gameobjects_locale WHERE locale = ?", CONNECTION_SYNCH); // GameTables.db2 @@ -57,35 +101,38 @@ void HotfixDatabaseConnection::DoPrepareStatements() PREPARE_LOCALE_STMT(HOTFIX_SEL_GAME_TABLES, "SELECT ID, Name_lang FROM game_tables_locale WHERE locale = ?", CONNECTION_SYNCH); // GarrAbility.db2 - PrepareStatement(HOTFIX_SEL_GARR_ABILITY, "SELECT ID, Flags, Name, Description, IconFileDataID, OtherFactionGarrAbilityID, " - "GarrAbilityCategoryID FROM garr_ability ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_GARR_ABILITY, "SELECT ID, Flags, Name, Description, IconFileDataID, OtherFactionGarrAbilityID, GarrAbilityCategoryID, " + "FollowerTypeID FROM garr_ability ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_GARR_ABILITY, "SELECT ID, Name_lang, Description_lang FROM garr_ability_locale WHERE locale = ?", CONNECTION_SYNCH); // GarrBuilding.db2 - PrepareStatement(HOTFIX_SEL_GARR_BUILDING, "SELECT ID, HordeGameObjectID, AllianceGameObjectID, Unknown, Type, Level, NameAlliance, NameHorde, Description, " - "Tooltip, BuildDuration, CostCurrencyID, CostCurrencyAmount, HordeTexPrefixKitID, AllianceTexPrefixKitID, IconFileDataID, BonusAmount, Flags, " - "AllianceActivationScenePackageID, HordeActivationScenePackageID, MaxShipments, FollowerRequiredGarrAbilityID, FollowerGarrAbilityEffectID, CostMoney " - "FROM garr_building ORDER BY ID DESC", CONNECTION_SYNCH); - PREPARE_LOCALE_STMT(HOTFIX_SEL_GARR_BUILDING, "SELECT ID, NameAlliance_lang, NameHorde_lang, Description_lang, Tooltip_lang " - "FROM garr_building_locale WHERE locale = ?", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_GARR_BUILDING, "SELECT ID, HordeGameObjectID, AllianceGameObjectID, Unknown, Type, Level, NameAlliance, NameHorde, " + "Description, Tooltip, BuildDuration, CostCurrencyID, CostCurrencyAmount, HordeTexPrefixKitID, AllianceTexPrefixKitID, IconFileDataID, " + "BonusAmount, Flags, AllianceActivationScenePackageID, HordeActivationScenePackageID, MaxShipments, FollowerRequiredGarrAbilityID, " + "FollowerGarrAbilityEffectID, CostMoney FROM garr_building ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_GARR_BUILDING, "SELECT ID, NameAlliance_lang, NameHorde_lang, Description_lang, Tooltip_lang" + " FROM garr_building_locale WHERE locale = ?", CONNECTION_SYNCH); // GarrBuildingPlotInst.db2 PrepareStatement(HOTFIX_SEL_GARR_BUILDING_PLOT_INST, "SELECT ID, GarrBuildingID, UiTextureAtlasMemberID, GarrSiteLevelPlotInstID, " "LandmarkOffsetX, LandmarkOffsetY FROM garr_building_plot_inst ORDER BY ID DESC", CONNECTION_SYNCH); // GarrClassSpec.db2 - PrepareStatement(HOTFIX_SEL_GARR_CLASS_SPEC, "SELECT ID, NameMale, NameFemale, NameGenderless, ClassAtlasID, GarrFollItemSetID " - "FROM garr_class_spec ORDER BY ID DESC", CONNECTION_SYNCH); - PREPARE_LOCALE_STMT(HOTFIX_SEL_GARR_CLASS_SPEC, "SELECT ID, NameMale_lang, NameFemale_lang, NameGenderless_lang FROM garr_class_spec_locale WHERE locale = ?", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_GARR_CLASS_SPEC, "SELECT ID, NameMale, NameFemale, NameGenderless, ClassAtlasID, GarrFollItemSetID" + " FROM garr_class_spec ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_GARR_CLASS_SPEC, "SELECT ID, NameMale_lang, NameFemale_lang, NameGenderless_lang FROM garr_class_spec_locale" + " WHERE locale = ?", CONNECTION_SYNCH); // GarrFollower.db2 - PrepareStatement(HOTFIX_SEL_GARR_FOLLOWER, "SELECT ID, HordeCreatureID, AllianceCreatureID, HordeUiAnimRaceInfoID, AllianceUiAnimRaceInfoID, Quality, " - "HordeGarrClassSpecID, AllianceGarrClassSpecID, HordeGarrFollItemSetID, AllianceGarrFollItemSetID, Level, ItemLevelWeapon, ItemLevelArmor, Unknown1, Flags, " - "HordeSourceText, AllianceSourceText, Unknown2, Unknown3, HordePortraitIconID, AlliancePortraitIconID FROM garr_follower ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_GARR_FOLLOWER, "SELECT ID, FollowerTypeID, HordeCreatureID, AllianceCreatureID, HordeUiAnimRaceInfoID, AllianceUiAnimRaceInfoID, " + "Quality, HordeGarrClassSpecID, AllianceGarrClassSpecID, HordeGarrFollItemSetID, AllianceGarrFollItemSetID, Level, ItemLevelWeapon, " + "ItemLevelArmor, Unknown1, Flags, HordeSourceText, AllianceSourceText, Unknown2, Unknown3, HordePortraitIconID, AlliancePortraitIconID, " + "HordeListPortraitTextureKitID, AllianceListPortraitTextureKitID FROM garr_follower ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_GARR_FOLLOWER, "SELECT ID, HordeSourceText_lang, AllianceSourceText_lang FROM garr_follower_locale WHERE locale = ?", CONNECTION_SYNCH); // GarrFollowerXAbility.db2 - PrepareStatement(HOTFIX_SEL_GARR_FOLLOWER_X_ABILITY, "SELECT ID, GarrFollowerID, GarrAbilityID, FactionIndex FROM garr_follower_x_ability ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_GARR_FOLLOWER_X_ABILITY, "SELECT ID, GarrFollowerID, GarrAbilityID, FactionIndex FROM garr_follower_x_ability" + " ORDER BY ID DESC", CONNECTION_SYNCH); // GarrPlot.db2 PrepareStatement(HOTFIX_SEL_GARR_PLOT, "SELECT ID, GarrPlotUICategoryID, PlotType, Flags, Name, MinCount, MaxCount, " @@ -104,16 +151,36 @@ void HotfixDatabaseConnection::DoPrepareStatements() "UpgradeResourceCost, UpgradeMoneyCost FROM garr_site_level ORDER BY ID DESC", CONNECTION_SYNCH); // GarrSiteLevelPlotInst.db2 - PrepareStatement(HOTFIX_SEL_GARR_SITE_LEVEL_PLOT_INST, "SELECT ID, GarrSiteLevelID, GarrPlotInstanceID, LandmarkX, LandmarkY, " - "Unknown FROM garr_site_level_plot_inst ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_GARR_SITE_LEVEL_PLOT_INST, "SELECT ID, GarrSiteLevelID, GarrPlotInstanceID, LandmarkX, LandmarkY, Unknown" + " FROM garr_site_level_plot_inst ORDER BY ID DESC", CONNECTION_SYNCH); + + // GlyphSlot.db2 + PrepareStatement(HOTFIX_SEL_GLYPH_SLOT, "SELECT ID, Type, Tooltip FROM glyph_slot ORDER BY ID DESC", CONNECTION_SYNCH); + + // GuildPerkSpells.db2 + PrepareStatement(HOTFIX_SEL_GUILD_PERK_SPELLS, "SELECT ID, GuildLevel, SpellID FROM guild_perk_spells ORDER BY ID DESC", CONNECTION_SYNCH); // Holidays.db2 - PrepareStatement(HOTFIX_SEL_HOLIDAYS, "SELECT ID, Duration1, Duration2, Duration3, Duration4, Duration5, Duration6, Duration7, Duration8, Duration9, Duration10, " - "Date1, Date2, Date3, Date4, Date5, Date6, Date7, Date8, Date9, Date10, Date11, Date12, Date13, Date14, Date15, Date16, Region, Looping, " - "CalendarFlags1, CalendarFlags2, CalendarFlags3, CalendarFlags4, CalendarFlags5, CalendarFlags6, CalendarFlags7, CalendarFlags8, CalendarFlags9, CalendarFlags10, " - "HolidayNameID, HolidayDescriptionID, TextureFilename, Priority, CalendarFilterType, Flags FROM holidays ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_HOLIDAYS, "SELECT ID, Duration1, Duration2, Duration3, Duration4, Duration5, Duration6, Duration7, Duration8, " + "Duration9, Duration10, Date1, Date2, Date3, Date4, Date5, Date6, Date7, Date8, Date9, Date10, Date11, Date12, Date13, Date14, Date15, " + "Date16, Region, Looping, CalendarFlags1, CalendarFlags2, CalendarFlags3, CalendarFlags4, CalendarFlags5, CalendarFlags6, CalendarFlags7, " + "CalendarFlags8, CalendarFlags9, CalendarFlags10, HolidayNameID, HolidayDescriptionID, TextureFilename, Priority, CalendarFilterType, Flags" + " FROM holidays ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_HOLIDAYS, "SELECT ID, TextureFilename_lang FROM holidays_locale WHERE locale = ?", CONNECTION_SYNCH); + // ImportPriceArmor.db2 + PrepareStatement(HOTFIX_SEL_IMPORT_PRICE_ARMOR, "SELECT ID, ClothFactor, LeatherFactor, MailFactor, PlateFactor FROM import_price_armor" + " ORDER BY ID DESC", CONNECTION_SYNCH); + + // ImportPriceQuality.db2 + PrepareStatement(HOTFIX_SEL_IMPORT_PRICE_QUALITY, "SELECT ID, Factor FROM import_price_quality ORDER BY ID DESC", CONNECTION_SYNCH); + + // ImportPriceShield.db2 + PrepareStatement(HOTFIX_SEL_IMPORT_PRICE_SHIELD, "SELECT ID, Factor FROM import_price_shield ORDER BY ID DESC", CONNECTION_SYNCH); + + // ImportPriceWeapon.db2 + PrepareStatement(HOTFIX_SEL_IMPORT_PRICE_WEAPON, "SELECT ID, Factor FROM import_price_weapon ORDER BY ID DESC", CONNECTION_SYNCH); + // ItemAppearance.db2 PrepareStatement(HOTFIX_SEL_ITEM_APPEARANCE, "SELECT ID, DisplayID, IconFileDataID FROM item_appearance ORDER BY ID DESC", CONNECTION_SYNCH); @@ -121,115 +188,218 @@ void HotfixDatabaseConnection::DoPrepareStatements() PrepareStatement(HOTFIX_SEL_ITEM_BONUS, "SELECT ID, BonusListID, Type, Value1, Value2, `Index` FROM item_bonus ORDER BY ID DESC", CONNECTION_SYNCH); // ItemBonusTreeNode.db2 - PrepareStatement(HOTFIX_SEL_ITEM_BONUS_TREE_NODE, "SELECT ID, BonusTreeID, BonusTreeModID, SubTreeID, BonusListID FROM item_bonus_tree_node ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_ITEM_BONUS_TREE_NODE, "SELECT ID, BonusTreeID, BonusTreeModID, SubTreeID, BonusListID FROM item_bonus_tree_node" + " ORDER BY ID DESC", CONNECTION_SYNCH); + + // ItemClass.db2 + PrepareStatement(HOTFIX_SEL_ITEM_CLASS, "SELECT ID, Flags, PriceMod, Name FROM item_class ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_ITEM_CLASS, "SELECT ID, Name_lang FROM item_class_locale WHERE locale = ?", CONNECTION_SYNCH); // ItemCurrencyCost.db2 - PrepareStatement(HOTFIX_SEL_ITEM_CURRENCY_COST, "SELECT ID, ItemID FROM item_currency_cost ORDER BY ItemID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_ITEM_CURRENCY_COST, "SELECT ID, ItemId FROM item_currency_cost ORDER BY ID DESC", CONNECTION_SYNCH); + + // ItemDisenchantLoot.db2 + PrepareStatement(HOTFIX_SEL_ITEM_DISENCHANT_LOOT, "SELECT ID, ItemClass, ItemSubClass, ItemQuality, MinItemLevel, MaxItemLevel, " + "RequiredDisenchantSkill FROM item_disenchant_loot ORDER BY ID DESC", CONNECTION_SYNCH); // ItemEffect.db2 - PrepareStatement(HOTFIX_SEL_ITEM_EFFECT, "SELECT ID, ItemID, OrderIndex, SpellID, `Trigger`, Charges, Cooldown, " - "Category, CategoryCooldown FROM item_effect ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_ITEM_EFFECT, "SELECT ID, ItemID, OrderIndex, SpellID, `Trigger`, Charges, Cooldown, Category, CategoryCooldown, " + "ChrSpecializationID FROM item_effect ORDER BY ID DESC", CONNECTION_SYNCH); // Item.db2 - PrepareStatement(HOTFIX_SEL_ITEM, "SELECT ID, Class, SubClass, SoundOverrideSubclass, Material, InventoryType, Sheath, " - "FileDataID, GroupSoundsID FROM item ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_ITEM, "SELECT ID, Class, SubClass, SoundOverrideSubclass, Material, InventoryType, Sheath, FileDataID, GroupSoundsID" + " FROM item ORDER BY ID DESC", CONNECTION_SYNCH); // ItemExtendedCost.db2 - PrepareStatement(HOTFIX_SEL_ITEM_EXTENDED_COST, "SELECT ID, RequiredArenaSlot, RequiredItem1, RequiredItem2, RequiredItem3, RequiredItem4, RequiredItem5, " - "RequiredItemCount1, RequiredItemCount2, RequiredItemCount3, RequiredItemCount4, RequiredItemCount5, RequiredPersonalArenaRating, ItemPurchaseGroup, " - "RequiredCurrency1, RequiredCurrency2, RequiredCurrency3, RequiredCurrency4, RequiredCurrency5, " - "RequiredCurrencyCount1, RequiredCurrencyCount2, RequiredCurrencyCount3, RequiredCurrencyCount4, RequiredCurrencyCount5, " + PrepareStatement(HOTFIX_SEL_ITEM_EXTENDED_COST, "SELECT ID, RequiredArenaSlot, RequiredItem1, RequiredItem2, RequiredItem3, RequiredItem4, " + "RequiredItem5, RequiredItemCount1, RequiredItemCount2, RequiredItemCount3, RequiredItemCount4, RequiredItemCount5, " + "RequiredPersonalArenaRating, ItemPurchaseGroup, RequiredCurrency1, RequiredCurrency2, RequiredCurrency3, RequiredCurrency4, " + "RequiredCurrency5, RequiredCurrencyCount1, RequiredCurrencyCount2, RequiredCurrencyCount3, RequiredCurrencyCount4, RequiredCurrencyCount5, " "RequiredFactionId, RequiredFactionStanding, RequirementFlags, RequiredAchievement, RequiredMoney FROM item_extended_cost ORDER BY ID DESC", CONNECTION_SYNCH); + // ItemLimitCategory.db2 + PrepareStatement(HOTFIX_SEL_ITEM_LIMIT_CATEGORY, "SELECT ID, Name, Quantity, Flags FROM item_limit_category ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_ITEM_LIMIT_CATEGORY, "SELECT ID, Name_lang FROM item_limit_category_locale WHERE locale = ?", CONNECTION_SYNCH); + // ItemModifiedAppearance.db2 - PrepareStatement(HOTFIX_SEL_ITEM_MODIFIED_APPEARANCE, "SELECT ID, ItemID, AppearanceModID, AppearanceID, " - "IconFileDataID, `Index` FROM item_modified_appearance ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_ITEM_MODIFIED_APPEARANCE, "SELECT ID, ItemID, AppearanceModID, AppearanceID, IconFileDataID, `Index`" + " FROM item_modified_appearance ORDER BY ID DESC", CONNECTION_SYNCH); + + // ItemPriceBase.db2 + PrepareStatement(HOTFIX_SEL_ITEM_PRICE_BASE, "SELECT ID, ItemLevel, ArmorFactor, WeaponFactor FROM item_price_base ORDER BY ID DESC", CONNECTION_SYNCH); + + // ItemRandomProperties.db2 + PrepareStatement(HOTFIX_SEL_ITEM_RANDOM_PROPERTIES, "SELECT ID, InternalName, Enchantment1, Enchantment2, Enchantment3, Enchantment4, " + "Enchantment5, Name FROM item_random_properties ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_ITEM_RANDOM_PROPERTIES, "SELECT ID, InternalName_lang, Name_lang FROM item_random_properties_locale" + " WHERE locale = ?", CONNECTION_SYNCH); - // Item-sparse.db2 + // ItemRandomSuffix.db2 + PrepareStatement(HOTFIX_SEL_ITEM_RANDOM_SUFFIX, "SELECT ID, Name, InternalName, Enchantment1, Enchantment2, Enchantment3, Enchantment4, " + "Enchantment5, AllocationPct1, AllocationPct2, AllocationPct3, AllocationPct4, AllocationPct5 FROM item_random_suffix ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_ITEM_RANDOM_SUFFIX, "SELECT ID, Name_lang, InternalName_lang FROM item_random_suffix_locale WHERE locale = ?", CONNECTION_SYNCH); + + // ItemSparse.db2 PrepareStatement(HOTFIX_SEL_ITEM_SPARSE, "SELECT ID, Quality, Flags1, Flags2, Flags3, Unk1, Unk2, BuyCount, BuyPrice, SellPrice, InventoryType, " - "AllowableClass, AllowableRace, ItemLevel, RequiredLevel, RequiredSkill, RequiredSkillRank, RequiredSpell, RequiredHonorRank, RequiredCityRank, " - "RequiredReputationFaction, RequiredReputationRank, MaxCount, Stackable, ContainerSlots, " - "ItemStatType1, ItemStatType2, ItemStatType3, ItemStatType4, ItemStatType5, ItemStatType6, ItemStatType7, ItemStatType8, ItemStatType9, ItemStatType10, " - "ItemStatValue1, ItemStatValue2, ItemStatValue3, ItemStatValue4, ItemStatValue5, ItemStatValue6, ItemStatValue7, ItemStatValue8, ItemStatValue9, ItemStatValue10, " - "ItemStatAllocation1, ItemStatAllocation2, ItemStatAllocation3, ItemStatAllocation4, ItemStatAllocation5, " - "ItemStatAllocation6, ItemStatAllocation7, ItemStatAllocation8, ItemStatAllocation9, ItemStatAllocation10, " - "ItemStatSocketCostMultiplier1, ItemStatSocketCostMultiplier2, ItemStatSocketCostMultiplier3, ItemStatSocketCostMultiplier4, ItemStatSocketCostMultiplier5, " - "ItemStatSocketCostMultiplier6, ItemStatSocketCostMultiplier7, ItemStatSocketCostMultiplier8, ItemStatSocketCostMultiplier9, ItemStatSocketCostMultiplier10, " - "ScalingStatDistribution, DamageType, Delay, RangedModRange, Bonding, Name, Name2, Name3, Name4, Description, PageText, LanguageID, PageMaterial, " - "StartQuest, LockID, Material, Sheath, RandomProperty, RandomSuffix, ItemSet, Area, Map, BagFamily, TotemCategory, " - "SocketColor1, SocketColor2, SocketColor3, SocketBonus, GemProperties, ArmorDamageModifier, Duration, ItemLimitCategory, " + "AllowableClass, AllowableRace, ItemLevel, RequiredLevel, RequiredSkill, RequiredSkillRank, RequiredSpell, RequiredHonorRank, " + "RequiredCityRank, RequiredReputationFaction, RequiredReputationRank, MaxCount, Stackable, ContainerSlots, ItemStatType1, ItemStatType2, " + "ItemStatType3, ItemStatType4, ItemStatType5, ItemStatType6, ItemStatType7, ItemStatType8, ItemStatType9, ItemStatType10, ItemStatValue1, " + "ItemStatValue2, ItemStatValue3, ItemStatValue4, ItemStatValue5, ItemStatValue6, ItemStatValue7, ItemStatValue8, ItemStatValue9, " + "ItemStatValue10, ItemStatAllocation1, ItemStatAllocation2, ItemStatAllocation3, ItemStatAllocation4, ItemStatAllocation5, " + "ItemStatAllocation6, ItemStatAllocation7, ItemStatAllocation8, ItemStatAllocation9, ItemStatAllocation10, ItemStatSocketCostMultiplier1, " + "ItemStatSocketCostMultiplier2, ItemStatSocketCostMultiplier3, ItemStatSocketCostMultiplier4, ItemStatSocketCostMultiplier5, " + "ItemStatSocketCostMultiplier6, ItemStatSocketCostMultiplier7, ItemStatSocketCostMultiplier8, ItemStatSocketCostMultiplier9, " + "ItemStatSocketCostMultiplier10, ScalingStatDistribution, DamageType, Delay, RangedModRange, Bonding, Name, Name2, Name3, Name4, Description, " + "PageText, LanguageID, PageMaterial, StartQuest, LockID, Material, Sheath, RandomProperty, RandomSuffix, ItemSet, Area, Map, BagFamily, " + "TotemCategory, SocketColor1, SocketColor2, SocketColor3, SocketBonus, GemProperties, ArmorDamageModifier, Duration, ItemLimitCategory, " "HolidayID, StatScalingFactor, CurrencySubstitutionID, CurrencySubstitutionCount, ItemNameDescriptionID FROM item_sparse ORDER BY ID DESC", CONNECTION_SYNCH); - PREPARE_LOCALE_STMT(HOTFIX_SEL_ITEM_SPARSE, "SELECT ID, Name_lang, Name2_lang, Name3_lang, Name4_lang, Description_lang FROM item_sparse_locale WHERE locale = ?", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_ITEM_SPARSE, "SELECT ID, Name_lang, Name2_lang, Name3_lang, Name4_lang, Description_lang FROM item_sparse_locale" + " WHERE locale = ?", CONNECTION_SYNCH); + + // ItemSpec.db2 + PrepareStatement(HOTFIX_SEL_ITEM_SPEC, "SELECT ID, MinLevel, MaxLevel, ItemType, PrimaryStat, SecondaryStat, SpecID FROM item_spec" + " ORDER BY ID DESC", CONNECTION_SYNCH); + + // ItemSpecOverride.db2 + PrepareStatement(HOTFIX_SEL_ITEM_SPEC_OVERRIDE, "SELECT ID, ItemID, SpecID FROM item_spec_override ORDER BY ID DESC", CONNECTION_SYNCH); // ItemXBonusTree.db2 PrepareStatement(HOTFIX_SEL_ITEM_X_BONUS_TREE, "SELECT ID, ItemID, BonusTreeID FROM item_x_bonus_tree ORDER BY ID DESC", CONNECTION_SYNCH); // KeyChain.db2 - PrepareStatement(HOTFIX_SEL_KEY_CHAIN, "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 key_chain ORDER BY Id DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_KEY_CHAIN, "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 key_chain" + " ORDER BY Id DESC", CONNECTION_SYNCH); + + // MailTemplate.db2 + PrepareStatement(HOTFIX_SEL_MAIL_TEMPLATE, "SELECT ID, Body FROM mail_template ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_MAIL_TEMPLATE, "SELECT ID, Body_lang FROM mail_template_locale WHERE locale = ?", CONNECTION_SYNCH); // Mount.db2 - PrepareStatement(HOTFIX_SEL_MOUNT, "SELECT Id, MountTypeId, DisplayId, Flags, Name, Description, SourceDescription, " - "Source, SpellId, PlayerConditionId FROM mount ORDER BY Id DESC", CONNECTION_SYNCH); - PREPARE_LOCALE_STMT(HOTFIX_SEL_MOUNT, "SELECT ID, Name_lang, Description_lang, SourceDescription_lang FROM mount_locale WHERE locale = ?", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_MOUNT, "SELECT Id, MountTypeId, DisplayId, Flags, Name, Description, SourceDescription, Source, SpellId, " + "PlayerConditionId FROM mount ORDER BY Id DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_MOUNT, "SELECT Id, Name_lang, Description_lang, SourceDescription_lang FROM mount_locale WHERE locale = ?", CONNECTION_SYNCH); + + // MountCapability.db2 + PrepareStatement(HOTFIX_SEL_MOUNT_CAPABILITY, "SELECT ID, Flags, RequiredRidingSkill, RequiredArea, RequiredAura, RequiredSpell, SpeedModSpell, " + "RequiredMap FROM mount_capability ORDER BY ID DESC", CONNECTION_SYNCH); + + // MountType.db2 + PrepareStatement(HOTFIX_SEL_MOUNT_TYPE_X_CAPABILITY, "SELECT ID, MountTypeID, OrderIndex, MountCapabilityID FROM mount_type_x_capability ORDER BY ID DESC", CONNECTION_SYNCH); + + // NameGen.db2 + PrepareStatement(HOTFIX_SEL_NAME_GEN, "SELECT ID, Name, Race, Sex FROM name_gen ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_NAME_GEN, "SELECT ID, Name_lang FROM name_gen_locale WHERE locale = ?", CONNECTION_SYNCH); // OverrideSpellData.db2 - PrepareStatement(HOTFIX_SEL_OVERRIDE_SPELL_DATA, "SELECT ID, SpellID1, SpellID2, SpellID3, SpellID4, SpellID5, " - "SpellID6, SpellID7, SpellID8, SpellID9, SpellID10, Flags, PlayerActionbarFileDataID FROM override_spell_data ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_OVERRIDE_SPELL_DATA, "SELECT ID, SpellID1, SpellID2, SpellID3, SpellID4, SpellID5, SpellID6, SpellID7, SpellID8, " + "SpellID9, SpellID10, Flags, PlayerActionbarFileDataID FROM override_spell_data ORDER BY ID DESC", CONNECTION_SYNCH); + + // PhaseXPhaseGroup.db2 + PrepareStatement(HOTFIX_SEL_PHASE_X_PHASE_GROUP, "SELECT ID, PhaseID, PhaseGroupID FROM phase_group ORDER BY ID DESC", CONNECTION_SYNCH); - // PhaseGroup.db2 - PrepareStatement(HOTFIX_SEL_PHASE_GROUP, "SELECT ID, PhaseID, PhaseGroupID FROM phase_group ORDER BY ID DESC", CONNECTION_SYNCH); + // QuestMoneyReward.db2 + PrepareStatement(HOTFIX_SEL_QUEST_MONEY_REWARD, "SELECT Level, Money1, Money2, Money3, Money4, Money5, Money6, Money7, Money8, Money9, Money10" + " FROM quest_money_reward ORDER BY Level DESC", CONNECTION_SYNCH); // QuestPackageItem.db2 PrepareStatement(HOTFIX_SEL_QUEST_PACKAGE_ITEM, "SELECT ID, QuestPackageID, ItemID, ItemCount, FilterType FROM quest_package_item ORDER BY ID DESC", CONNECTION_SYNCH); + // QuestSort.db2 + PrepareStatement(HOTFIX_SEL_QUEST_SORT, "SELECT ID, SortName FROM quest_sort ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_QUEST_SORT, "SELECT ID, SortName_lang FROM quest_sort_locale WHERE locale = ?", CONNECTION_SYNCH); + + // QuestV2.db2 + PrepareStatement(HOTFIX_SEL_QUEST_V2, "SELECT ID, UniqueBitFlag FROM quest_v2 ORDER BY ID DESC", CONNECTION_SYNCH); + + // QuestXP.db2 + PrepareStatement(HOTFIX_SEL_QUEST_XP, "SELECT ID, Exp1, Exp2, Exp3, Exp4, Exp5, Exp6, Exp7, Exp8, Exp9, Exp10 FROM quest_xp ORDER BY ID DESC", CONNECTION_SYNCH); + + // ScalingStatDistribution.db2 + PrepareStatement(HOTFIX_SEL_SCALING_STAT_DISTRIBUTION, "SELECT ID, MinLevel, MaxLevel, ItemLevelCurveID FROM scaling_stat_distribution" + " ORDER BY ID DESC", CONNECTION_SYNCH); + // SoundEntries.db2 PrepareStatement(HOTFIX_SEL_SOUND_ENTRIES, "SELECT ID, SoundType, Name, FileDataID1, FileDataID2, FileDataID3, FileDataID4, FileDataID5, " "FileDataID6, FileDataID7, FileDataID8, FileDataID9, FileDataID10, FileDataID11, FileDataID12, FileDataID13, FileDataID14, FileDataID15, " "FileDataID16, FileDataID17, FileDataID18, FileDataID19, FileDataID20, Freq1, Freq2, Freq3, Freq4, Freq5, Freq6, Freq7, Freq8, Freq9, Freq10, " - "Freq11, Freq12, Freq13, Freq14, Freq15, Freq16, Freq17, Freq18, Freq19, Freq20, VolumeFloat, Flags, MinDistance, DistanceCutoff, " - "EAXDef, SoundEntriesAdvancedID, VolumeVariationPlus, VolumeVariationMinus, PitchVariationPlus, " - "PitchVariationMinus, PitchAdjust, DialogType, BusOverwriteID FROM sound_entries ORDER BY ID DESC", CONNECTION_SYNCH); + "Freq11, Freq12, Freq13, Freq14, Freq15, Freq16, Freq17, Freq18, Freq19, Freq20, VolumeFloat, Flags, MinDistance, DistanceCutoff, EAXDef, " + "SoundEntriesAdvancedID, VolumeVariationPlus, VolumeVariationMinus, PitchVariationPlus, PitchVariationMinus, PitchAdjust, DialogType, " + "BusOverwriteID FROM sound_entries ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_SOUND_ENTRIES, "SELECT ID, Name_lang FROM sound_entries_locale WHERE locale = ?", CONNECTION_SYNCH); + // SpecializationSpells.db2 + PrepareStatement(HOTFIX_SEL_SPECIALIZATION_SPELLS, "SELECT ID, SpecID, OrderIndex, SpellID, OverridesSpellID, Description" + " FROM specialization_spells ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_SPECIALIZATION_SPELLS, "SELECT ID, Description_lang FROM specialization_spells_locale WHERE locale = ?", CONNECTION_SYNCH); + // SpellAuraRestrictions.db2 - PrepareStatement(HOTFIX_SEL_SPELL_AURA_RESTRICTIONS, "SELECT ID, CasterAuraState, TargetAuraState, ExcludeCasterAuraState, ExcludeTargetAuraState, " - "CasterAuraSpell, TargetAuraSpell, ExcludeCasterAuraSpell, ExcludeTargetAuraSpell FROM spell_aura_restrictions ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_SPELL_AURA_RESTRICTIONS, "SELECT ID, CasterAuraState, TargetAuraState, ExcludeCasterAuraState, " + "ExcludeTargetAuraState, CasterAuraSpell, TargetAuraSpell, ExcludeCasterAuraSpell, ExcludeTargetAuraSpell FROM spell_aura_restrictions" + " ORDER BY ID DESC", CONNECTION_SYNCH); // SpellCastingRequirements.db2 - PrepareStatement(HOTFIX_SEL_SPELL_CASTING_REQUIREMENTS, "SELECT ID, FacingCasterFlags, MinFactionID, MinReputation, " - "RequiredAreasID, RequiredAuraVision, RequiresSpellFocus FROM spell_casting_requirements ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_SPELL_CASTING_REQUIREMENTS, "SELECT ID, FacingCasterFlags, MinFactionID, MinReputation, RequiredAreasID, " + "RequiredAuraVision, RequiresSpellFocus FROM spell_casting_requirements ORDER BY ID DESC", CONNECTION_SYNCH); + + // SpellCastTimes.db2 + PrepareStatement(HOTFIX_SEL_SPELL_CAST_TIMES, "SELECT ID, CastTime, CastTimePerLevel, MinCastTime FROM spell_cast_times ORDER BY ID DESC", CONNECTION_SYNCH); // SpellClassOptions.db2 PrepareStatement(HOTFIX_SEL_SPELL_CLASS_OPTIONS, "SELECT ID, ModalNextSpell, SpellClassMask1, SpellClassMask2, SpellClassMask3, SpellClassMask4, " "SpellClassSet FROM spell_class_options ORDER BY ID DESC", CONNECTION_SYNCH); + // SpellDuration.db2 + PrepareStatement(HOTFIX_SEL_SPELL_DURATION, "SELECT ID, Duration1, Duration2, Duration3 FROM spell_duration ORDER BY ID DESC", CONNECTION_SYNCH); + + // SpellItemEnchantmentCondition.db2 + PrepareStatement(HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT_CONDITION, "SELECT ID, LTOperandType1, LTOperandType2, LTOperandType3, LTOperandType4, " + "LTOperandType5, LTOperand1, LTOperand2, LTOperand3, LTOperand4, LTOperand5, 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", CONNECTION_SYNCH); + // SpellLearnSpell.db2 PrepareStatement(HOTFIX_SEL_SPELL_LEARN_SPELL, "SELECT ID, LearnSpellID, SpellID, OverridesSpellID FROM spell_learn_spell ORDER BY ID DESC", CONNECTION_SYNCH); // SpellMisc.db2 PrepareStatement(HOTFIX_SEL_SPELL_MISC, "SELECT ID, Attributes, AttributesEx, AttributesExB, AttributesExC, AttributesExD, AttributesExE, " - "AttributesExF, AttributesExG, AttributesExH, AttributesExI, AttributesExJ, AttributesExK, AttributesExL, AttributesExM, " - "CastingTimeIndex, DurationIndex, RangeIndex, Speed, SpellVisualID1, SpellVisualID2, SpellIconID, ActiveIconID, " - "SchoolMask, MultistrikeSpeedMod FROM spell_misc ORDER BY ID DESC", CONNECTION_SYNCH); + "AttributesExF, AttributesExG, AttributesExH, AttributesExI, AttributesExJ, AttributesExK, AttributesExL, AttributesExM, CastingTimeIndex, " + "DurationIndex, RangeIndex, Speed, SpellIconID, ActiveIconID, SchoolMask, MultistrikeSpeedMod FROM spell_misc" + " ORDER BY ID DESC", CONNECTION_SYNCH); // SpellPower.db2 - PrepareStatement(HOTFIX_SEL_SPELL_POWER, "SELECT ID, SpellID, PowerIndex, PowerType, ManaCost, ManaCostPerLevel, ManaCostPerSecond, ManaCostAdditional, " - "PowerDisplayID, UnitPowerBarID, ManaCostPercentage, ManaCostPercentagePerSecond, RequiredAura, HealthCostPercentage FROM spell_power ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_SPELL_POWER, "SELECT ID, SpellID, PowerIndex, PowerType, ManaCost, ManaCostPerLevel, ManaCostPerSecond, " + "ManaCostAdditional, PowerDisplayID, UnitPowerBarID, ManaCostPercentage, ManaCostPercentagePerSecond, RequiredAura, HealthCostPercentage" + " FROM spell_power ORDER BY ID DESC", CONNECTION_SYNCH); // SpellPowerDifficulty.db2 - PrepareStatement(HOTFIX_SEL_SPELL_POWER_DIFFICULTY, "SELECT SpellPowerID, DifficultyID, PowerIndex FROM spell_power_difficulty ORDER BY SpellPowerID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_SPELL_POWER_DIFFICULTY, "SELECT SpellPowerID, DifficultyID, PowerIndex FROM spell_power_difficulty" + " ORDER BY SpellPowerID DESC", CONNECTION_SYNCH); + + // SpellRadius.db2 + PrepareStatement(HOTFIX_SEL_SPELL_RADIUS, "SELECT ID, Radius, RadiusPerLevel, RadiusMin, RadiusMax FROM spell_radius ORDER BY ID DESC", CONNECTION_SYNCH); + + // SpellRange.db2 + PrepareStatement(HOTFIX_SEL_SPELL_RANGE, "SELECT ID, MinRangeHostile, MinRangeFriend, MaxRangeHostile, MaxRangeFriend, Flags, DisplayName, " + "DisplayNameShort FROM spell_range ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_SPELL_RANGE, "SELECT ID, DisplayName_lang, DisplayNameShort_lang FROM spell_range_locale WHERE locale = ?", CONNECTION_SYNCH); // SpellReagents.db2 PrepareStatement(HOTFIX_SEL_SPELL_REAGENTS, "SELECT ID, Reagent1, Reagent2, Reagent3, Reagent4, Reagent5, Reagent6, Reagent7, Reagent8, " - "ReagentCount1, ReagentCount2, ReagentCount3, ReagentCount4, ReagentCount5, ReagentCount6, ReagentCount7, ReagentCount8, " - "CurrencyID, CurrencyCount FROM spell_reagents ORDER BY ID DESC", CONNECTION_SYNCH); + "ReagentCount1, ReagentCount2, ReagentCount3, ReagentCount4, ReagentCount5, ReagentCount6, ReagentCount7, ReagentCount8 " + " FROM spell_reagents ORDER BY ID DESC", CONNECTION_SYNCH); // SpellRuneCost.db2 - PrepareStatement(HOTFIX_SEL_SPELL_RUNE_COST, "SELECT ID, Blood, Unholy, Frost, Chromatic, RunicPower FROM spell_rune_cost ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_SPELL_RUNE_COST, "SELECT ID, Blood, Unholy, Frost, Chromatic, RunicPower FROM spell_rune_cost" + " ORDER BY ID DESC", CONNECTION_SYNCH); // SpellTotems.db2 - PrepareStatement(HOTFIX_SEL_SPELL_TOTEMS, "SELECT ID, RequiredTotemCategoryID1, RequiredTotemCategoryID2, Totem1, Totem2 FROM spell_totems ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_SPELL_TOTEMS, "SELECT ID, RequiredTotemCategoryID1, RequiredTotemCategoryID2, Totem1, Totem2 FROM spell_totems" + " ORDER BY ID DESC", CONNECTION_SYNCH); + + // SpellXSpellVisual.db2 + PrepareStatement(HOTFIX_SEL_SPELL_X_SPELL_VISUAL, "SELECT ID, SpellID, DifficultyID, SpellVisualID1, SpellVisualID2, Unk620, PlayerConditionID, " + "Flags FROM spell_x_spell_visual ORDER BY ID DESC", CONNECTION_SYNCH); // TaxiNodes.db2 PrepareStatement(HOTFIX_SEL_TAXI_NODES, "SELECT ID, MapID, PosX, PosY, PosZ, Name, MountCreatureID1, MountCreatureID2, ConditionID, " @@ -240,6 +410,30 @@ void HotfixDatabaseConnection::DoPrepareStatements() PrepareStatement(HOTFIX_SEL_TAXI_PATH, "SELECT ID, `From`, `To`, Cost FROM taxi_path ORDER BY ID DESC", CONNECTION_SYNCH); // TaxiPathNode.db2 - PrepareStatement(HOTFIX_SEL_TAXI_PATH_NODE, "SELECT ID, PathID, NodeIndex, MapID, LocX, LocY, LocZ, Flags, Delay, " - "ArrivalEventID, DepartureEventID FROM taxi_path_node ORDER BY ID DESC", CONNECTION_SYNCH); + PrepareStatement(HOTFIX_SEL_TAXI_PATH_NODE, "SELECT ID, PathID, NodeIndex, MapID, LocX, LocY, LocZ, Flags, Delay, ArrivalEventID, " + "DepartureEventID FROM taxi_path_node ORDER BY ID DESC", CONNECTION_SYNCH); + + // TotemCategory.db2 + PrepareStatement(HOTFIX_SEL_TOTEM_CATEGORY, "SELECT ID, Name, CategoryType, CategoryMask FROM totem_category ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_TOTEM_CATEGORY, "SELECT ID, Name_lang FROM totem_category_locale WHERE locale = ?", CONNECTION_SYNCH); + + // TransportAnimation.db2 + PrepareStatement(HOTFIX_SEL_TRANSPORT_ANIMATION, "SELECT ID, TransportID, TimeIndex, PosX, PosY, PosZ, SequenceID FROM transport_animation" + " ORDER BY ID DESC", CONNECTION_SYNCH); + + // TransportRotation.db2 + PrepareStatement(HOTFIX_SEL_TRANSPORT_ROTATION, "SELECT ID, TransportID, TimeIndex, X, Y, Z, W FROM transport_rotation ORDER BY ID DESC", CONNECTION_SYNCH); + + // UnitPowerBar.db2 + PrepareStatement(HOTFIX_SEL_UNIT_POWER_BAR, "SELECT ID, MinPower, MaxPower, StartPower, CenterPower, RegenerationPeace, RegenerationCombat, " + "BarType, FileDataID1, FileDataID2, FileDataID3, FileDataID4, FileDataID5, FileDataID6, Color1, Color2, Color3, Color4, Color5, Color6, " + "Flags, Name, Cost, OutOfError, ToolTip, StartInset, EndInset FROM unit_power_bar ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_UNIT_POWER_BAR, "SELECT ID, Name_lang, Cost_lang, OutOfError_lang, ToolTip_lang FROM unit_power_bar_locale" + " WHERE locale = ?", CONNECTION_SYNCH); + + // WorldMapOverlay.db2 + PrepareStatement(HOTFIX_SEL_WORLD_MAP_OVERLAY, "SELECT ID, MapAreaID, AreaID1, AreaID2, AreaID3, AreaID4, TextureName, TextureWidth, " + "TextureHeight, OffsetX, OffsetY, HitRectTop, HitRectLeft, HitRectBottom, HitRectRight, PlayerConditionID FROM world_map_overlay" + " ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_WORLD_MAP_OVERLAY, "SELECT ID, TextureName_lang FROM world_map_overlay_locale WHERE locale = ?", CONNECTION_SYNCH); } diff --git a/src/server/shared/Database/Implementation/HotfixDatabase.h b/src/server/shared/Database/Implementation/HotfixDatabase.h index e92cbb444b5..c92b7b23499 100644 --- a/src/server/shared/Database/Implementation/HotfixDatabase.h +++ b/src/server/shared/Database/Implementation/HotfixDatabase.h @@ -46,14 +46,36 @@ enum HotfixDatabaseStatements HOTFIX_SEL_AREA_GROUP_MEMBER, + HOTFIX_SEL_AUCTION_HOUSE, + HOTFIX_SEL_AUCTION_HOUSE_LOCALE, + + HOTFIX_SEL_BARBER_SHOP_STYLE, + HOTFIX_SEL_BARBER_SHOP_STYLE_LOCALE, + HOTFIX_SEL_BROADCAST_TEXT, HOTFIX_SEL_BROADCAST_TEXT_LOCALE, + HOTFIX_SEL_CHAR_START_OUTFIT, + + HOTFIX_SEL_CHR_CLASSES_X_POWER_TYPES, + + HOTFIX_SEL_CINEMATIC_SEQUENCES, + + HOTFIX_SEL_CREATURE_DISPLAY_INFO, + HOTFIX_SEL_CREATURE_DISPLAY_INFO_LOCALE, + + HOTFIX_SEL_CREATURE_TYPE, + HOTFIX_SEL_CREATURE_TYPE_LOCALE, + HOTFIX_SEL_CURRENCY_TYPES, HOTFIX_SEL_CURRENCY_TYPES_LOCALE, HOTFIX_SEL_CURVE_POINT, + HOTFIX_SEL_DESTRUCTIBLE_MODEL_DATA, + + HOTFIX_SEL_DURABILITY_QUALITY, + HOTFIX_SEL_GAMEOBJECTS, HOTFIX_SEL_GAMEOBJECTS_LOCALE, @@ -88,50 +110,112 @@ enum HotfixDatabaseStatements HOTFIX_SEL_GARR_SITE_LEVEL_PLOT_INST, + HOTFIX_SEL_GLYPH_SLOT, + + HOTFIX_SEL_GUILD_PERK_SPELLS, + HOTFIX_SEL_HOLIDAYS, HOTFIX_SEL_HOLIDAYS_LOCALE, + HOTFIX_SEL_IMPORT_PRICE_ARMOR, + + HOTFIX_SEL_IMPORT_PRICE_QUALITY, + + HOTFIX_SEL_IMPORT_PRICE_SHIELD, + + HOTFIX_SEL_IMPORT_PRICE_WEAPON, + HOTFIX_SEL_ITEM_APPEARANCE, HOTFIX_SEL_ITEM_BONUS, HOTFIX_SEL_ITEM_BONUS_TREE_NODE, + HOTFIX_SEL_ITEM_CLASS, + HOTFIX_SEL_ITEM_CLASS_LOCALE, + HOTFIX_SEL_ITEM_CURRENCY_COST, + HOTFIX_SEL_ITEM_DISENCHANT_LOOT, + HOTFIX_SEL_ITEM_EFFECT, HOTFIX_SEL_ITEM, HOTFIX_SEL_ITEM_EXTENDED_COST, + HOTFIX_SEL_ITEM_LIMIT_CATEGORY, + HOTFIX_SEL_ITEM_LIMIT_CATEGORY_LOCALE, + HOTFIX_SEL_ITEM_MODIFIED_APPEARANCE, + HOTFIX_SEL_ITEM_PRICE_BASE, + + HOTFIX_SEL_ITEM_RANDOM_PROPERTIES, + HOTFIX_SEL_ITEM_RANDOM_PROPERTIES_LOCALE, + + HOTFIX_SEL_ITEM_RANDOM_SUFFIX, + HOTFIX_SEL_ITEM_RANDOM_SUFFIX_LOCALE, + HOTFIX_SEL_ITEM_SPARSE, HOTFIX_SEL_ITEM_SPARSE_LOCALE, + HOTFIX_SEL_ITEM_SPEC, + + HOTFIX_SEL_ITEM_SPEC_OVERRIDE, + HOTFIX_SEL_ITEM_X_BONUS_TREE, HOTFIX_SEL_KEY_CHAIN, + HOTFIX_SEL_MAIL_TEMPLATE, + HOTFIX_SEL_MAIL_TEMPLATE_LOCALE, + HOTFIX_SEL_MOUNT, HOTFIX_SEL_MOUNT_LOCALE, + HOTFIX_SEL_MOUNT_CAPABILITY, + + HOTFIX_SEL_MOUNT_TYPE_X_CAPABILITY, + + HOTFIX_SEL_NAME_GEN, + HOTFIX_SEL_NAME_GEN_LOCALE, + HOTFIX_SEL_OVERRIDE_SPELL_DATA, - HOTFIX_SEL_PHASE_GROUP, + HOTFIX_SEL_PHASE_X_PHASE_GROUP, + + HOTFIX_SEL_QUEST_MONEY_REWARD, HOTFIX_SEL_QUEST_PACKAGE_ITEM, + HOTFIX_SEL_QUEST_SORT, + HOTFIX_SEL_QUEST_SORT_LOCALE, + + HOTFIX_SEL_QUEST_V2, + + HOTFIX_SEL_QUEST_XP, + + HOTFIX_SEL_SCALING_STAT_DISTRIBUTION, + HOTFIX_SEL_SOUND_ENTRIES, HOTFIX_SEL_SOUND_ENTRIES_LOCALE, + HOTFIX_SEL_SPECIALIZATION_SPELLS, + HOTFIX_SEL_SPECIALIZATION_SPELLS_LOCALE, + HOTFIX_SEL_SPELL_AURA_RESTRICTIONS, HOTFIX_SEL_SPELL_CASTING_REQUIREMENTS, + HOTFIX_SEL_SPELL_CAST_TIMES, + HOTFIX_SEL_SPELL_CLASS_OPTIONS, + HOTFIX_SEL_SPELL_DURATION, + + HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT_CONDITION, + HOTFIX_SEL_SPELL_LEARN_SPELL, HOTFIX_SEL_SPELL_MISC, @@ -140,12 +224,19 @@ enum HotfixDatabaseStatements HOTFIX_SEL_SPELL_POWER_DIFFICULTY, + HOTFIX_SEL_SPELL_RADIUS, + + HOTFIX_SEL_SPELL_RANGE, + HOTFIX_SEL_SPELL_RANGE_LOCALE, + HOTFIX_SEL_SPELL_REAGENTS, HOTFIX_SEL_SPELL_RUNE_COST, HOTFIX_SEL_SPELL_TOTEMS, + HOTFIX_SEL_SPELL_X_SPELL_VISUAL, + HOTFIX_SEL_TAXI_NODES, HOTFIX_SEL_TAXI_NODES_LOCALE, @@ -153,6 +244,19 @@ enum HotfixDatabaseStatements HOTFIX_SEL_TAXI_PATH_NODE, + HOTFIX_SEL_TOTEM_CATEGORY, + HOTFIX_SEL_TOTEM_CATEGORY_LOCALE, + + HOTFIX_SEL_TRANSPORT_ANIMATION, + + HOTFIX_SEL_TRANSPORT_ROTATION, + + HOTFIX_SEL_UNIT_POWER_BAR, + HOTFIX_SEL_UNIT_POWER_BAR_LOCALE, + + HOTFIX_SEL_WORLD_MAP_OVERLAY, + HOTFIX_SEL_WORLD_MAP_OVERLAY_LOCALE, + MAX_HOTFIXDATABASE_STATEMENTS }; |