aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/hotfixes/2015_02_22_00_hotfixes.sql1162
-rw-r--r--src/server/game/DataStores/DB2Stores.cpp182
-rw-r--r--src/server/game/DataStores/DB2Stores.h66
-rw-r--r--src/server/game/DataStores/DB2Structure.h76
-rw-r--r--src/server/game/DataStores/DB2fmt.h58
-rw-r--r--src/server/game/DataStores/DBCfmt.h1
-rw-r--r--src/server/game/Handlers/QueryHandler.cpp3
-rw-r--r--src/server/game/Movement/Waypoints/Path.h12
-rw-r--r--src/server/game/Server/Packets/QueryPackets.cpp10
-rw-r--r--src/server/game/Server/Packets/QueryPackets.h6
-rw-r--r--src/server/game/Spells/Spell.cpp12
-rw-r--r--src/server/game/Spells/SpellInfo.cpp2
-rw-r--r--src/server/game/World/World.cpp9
-rw-r--r--src/server/shared/DataStores/DB2StorageLoader.cpp16
-rw-r--r--src/server/shared/DataStores/DB2Store.h210
-rw-r--r--src/server/shared/Database/Implementation/HotfixDatabase.cpp164
-rw-r--r--src/server/shared/Database/Implementation/HotfixDatabase.h73
17 files changed, 1668 insertions, 394 deletions
diff --git a/sql/updates/hotfixes/2015_02_22_00_hotfixes.sql b/sql/updates/hotfixes/2015_02_22_00_hotfixes.sql
new file mode 100644
index 00000000000..f39dda765e2
--- /dev/null
+++ b/sql/updates/hotfixes/2015_02_22_00_hotfixes.sql
@@ -0,0 +1,1162 @@
+ALTER TABLE `broadcast_text`
+ CHANGE `ID` `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ CHANGE `Language` `Language` int(11) NOT NULL DEFAULT '0',
+ CHANGE `MaleText` `MaleText` text,
+ CHANGE `FemaleText` `FemaleText` text,
+ CHANGE `EmoteID0` `EmoteID1` int(10) unsigned NOT NULL DEFAULT '0',
+ CHANGE `EmoteID1` `EmoteID2` int(10) unsigned NOT NULL DEFAULT '0',
+ CHANGE `EmoteID2` `EmoteID3` int(10) unsigned NOT NULL DEFAULT '0',
+ CHANGE `EmoteDelay0` `EmoteDelay1` int(10) unsigned NOT NULL DEFAULT '0',
+ CHANGE `EmoteDelay1` `EmoteDelay2` int(10) unsigned NOT NULL DEFAULT '0',
+ CHANGE `EmoteDelay2` `EmoteDelay3` int(10) unsigned NOT NULL DEFAULT '0',
+ CHANGE `SoundID` `SoundID` int(10) unsigned NOT NULL DEFAULT '0',
+ CHANGE `UnkMoP1` `UnkEmoteID` int(10) unsigned NOT NULL DEFAULT '0',
+ CHANGE `UnkMoP2` `Type` int(10) unsigned NOT NULL DEFAULT '0';
+
+--
+-- Table structure for table `broadcast_text_locale`
+--
+
+DROP TABLE IF EXISTS `broadcast_text_locale`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `broadcast_text_locale` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `locale` varchar(4) NOT NULL,
+ `MaleText_lang` text,
+ `FemaleText_lang` text,
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`,`locale`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `broadcast_text_locale`
+--
+
+INSERT INTO `broadcast_text_locale` SELECT `ID`,'koKR',`MaleText_loc1`,`FemaleText_loc1`,`VerifiedBuild` FROM `locales_broadcast_text`;
+INSERT INTO `broadcast_text_locale` SELECT `ID`,'frFR',`MaleText_loc2`,`FemaleText_loc2`,`VerifiedBuild` FROM `locales_broadcast_text`;
+INSERT INTO `broadcast_text_locale` SELECT `ID`,'deDE',`MaleText_loc3`,`FemaleText_loc3`,`VerifiedBuild` FROM `locales_broadcast_text`;
+INSERT INTO `broadcast_text_locale` SELECT `ID`,'zhCN',`MaleText_loc4`,`FemaleText_loc4`,`VerifiedBuild` FROM `locales_broadcast_text`;
+INSERT INTO `broadcast_text_locale` SELECT `ID`,'zhTW',`MaleText_loc5`,`FemaleText_loc5`,`VerifiedBuild` FROM `locales_broadcast_text`;
+INSERT INTO `broadcast_text_locale` SELECT `ID`,'esES',`MaleText_loc6`,`FemaleText_loc6`,`VerifiedBuild` FROM `locales_broadcast_text`;
+INSERT INTO `broadcast_text_locale` SELECT `ID`,'esMX',`MaleText_loc7`,`FemaleText_loc7`,`VerifiedBuild` FROM `locales_broadcast_text`;
+INSERT INTO `broadcast_text_locale` SELECT `ID`,'ruRU',`MaleText_loc8`,`FemaleText_loc8`,`VerifiedBuild` FROM `locales_broadcast_text`;
+DROP TABLE IF EXISTS `locales_broadcast_text`;
+
+--
+-- Table structure for table `curve_point`
+--
+
+DROP TABLE IF EXISTS `curve_point`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `curve_point` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `CurveID` int(10) unsigned NOT NULL DEFAULT '0',
+ `Index` int(10) unsigned NOT NULL DEFAULT '0',
+ `X` float NOT NULL DEFAULT '0',
+ `Y` float NOT NULL DEFAULT '0',
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `curve_point`
+--
+
+LOCK TABLES `curve_point` WRITE;
+/*!40000 ALTER TABLE `curve_point` DISABLE KEYS */;
+/*!40000 ALTER TABLE `curve_point` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `holidays`
+--
+
+DROP TABLE IF EXISTS `holidays`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `holidays` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `Duration1` int(10) unsigned NOT NULL DEFAULT '0',
+ `Duration2` int(10) unsigned NOT NULL DEFAULT '0',
+ `Duration3` int(10) unsigned NOT NULL DEFAULT '0',
+ `Duration4` int(10) unsigned NOT NULL DEFAULT '0',
+ `Duration5` int(10) unsigned NOT NULL DEFAULT '0',
+ `Duration6` int(10) unsigned NOT NULL DEFAULT '0',
+ `Duration7` int(10) unsigned NOT NULL DEFAULT '0',
+ `Duration8` int(10) unsigned NOT NULL DEFAULT '0',
+ `Duration9` int(10) unsigned NOT NULL DEFAULT '0',
+ `Duration10` int(10) unsigned NOT NULL DEFAULT '0',
+ `Date1` int(10) unsigned NOT NULL DEFAULT '0',
+ `Date2` int(10) unsigned NOT NULL DEFAULT '0',
+ `Date3` int(10) unsigned NOT NULL DEFAULT '0',
+ `Date4` int(10) unsigned NOT NULL DEFAULT '0',
+ `Date5` int(10) unsigned NOT NULL DEFAULT '0',
+ `Date6` int(10) unsigned NOT NULL DEFAULT '0',
+ `Date7` int(10) unsigned NOT NULL DEFAULT '0',
+ `Date8` int(10) unsigned NOT NULL DEFAULT '0',
+ `Date9` int(10) unsigned NOT NULL DEFAULT '0',
+ `Date10` int(10) unsigned NOT NULL DEFAULT '0',
+ `Date11` int(10) unsigned NOT NULL DEFAULT '0',
+ `Date12` int(10) unsigned NOT NULL DEFAULT '0',
+ `Date13` int(10) unsigned NOT NULL DEFAULT '0',
+ `Date14` int(10) unsigned NOT NULL DEFAULT '0',
+ `Date15` int(10) unsigned NOT NULL DEFAULT '0',
+ `Date16` int(10) unsigned NOT NULL DEFAULT '0',
+ `Region` int(10) unsigned NOT NULL DEFAULT '0',
+ `Looping` int(10) unsigned NOT NULL DEFAULT '0',
+ `CalendarFlags1` int(10) unsigned NOT NULL DEFAULT '0',
+ `CalendarFlags2` int(10) unsigned NOT NULL DEFAULT '0',
+ `CalendarFlags3` int(10) unsigned NOT NULL DEFAULT '0',
+ `CalendarFlags4` int(10) unsigned NOT NULL DEFAULT '0',
+ `CalendarFlags5` int(10) unsigned NOT NULL DEFAULT '0',
+ `CalendarFlags6` int(10) unsigned NOT NULL DEFAULT '0',
+ `CalendarFlags7` int(10) unsigned NOT NULL DEFAULT '0',
+ `CalendarFlags8` int(10) unsigned NOT NULL DEFAULT '0',
+ `CalendarFlags9` int(10) unsigned NOT NULL DEFAULT '0',
+ `CalendarFlags10` int(10) unsigned NOT NULL DEFAULT '0',
+ `HolidayNameID` int(10) unsigned NOT NULL DEFAULT '0',
+ `HolidayDescriptionID` int(10) unsigned NOT NULL DEFAULT '0',
+ `TextureFilename` text,
+ `Priority` int(10) unsigned NOT NULL DEFAULT '0',
+ `CalendarFilterType` 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;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `holidays`
+--
+
+LOCK TABLES `holidays` WRITE;
+/*!40000 ALTER TABLE `holidays` DISABLE KEYS */;
+/*!40000 ALTER TABLE `holidays` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `holidays_locale`
+--
+
+DROP TABLE IF EXISTS `holidays_locale`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `holidays_locale` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `locale` varchar(4) NOT NULL,
+ `TextureFilename_lang` text,
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`,`locale`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `holidays_locale`
+--
+
+LOCK TABLES `holidays_locale` WRITE;
+/*!40000 ALTER TABLE `holidays_locale` DISABLE KEYS */;
+/*!40000 ALTER TABLE `holidays_locale` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `item_appearance`
+--
+
+DROP TABLE IF EXISTS `item_appearance`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `item_appearance` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `DisplayID` int(10) unsigned NOT NULL DEFAULT '0',
+ `IconFileDataID` int(10) unsigned NOT NULL DEFAULT '0',
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `item_appearance`
+--
+
+LOCK TABLES `item_appearance` WRITE;
+/*!40000 ALTER TABLE `item_appearance` DISABLE KEYS */;
+/*!40000 ALTER TABLE `item_appearance` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `item_bonus`
+--
+
+DROP TABLE IF EXISTS `item_bonus`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `item_bonus` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `BonusListID` int(10) unsigned NOT NULL DEFAULT '0',
+ `Type` int(10) unsigned NOT NULL DEFAULT '0',
+ `Value1` int(11) NOT NULL DEFAULT '0',
+ `Value2` int(11) NOT NULL DEFAULT '0',
+ `Index` int(10) unsigned NOT NULL DEFAULT '0',
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `item_bonus`
+--
+
+LOCK TABLES `item_bonus` WRITE;
+/*!40000 ALTER TABLE `item_bonus` DISABLE KEYS */;
+/*!40000 ALTER TABLE `item_bonus` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `item_bonus_tree_node`
+--
+
+DROP TABLE IF EXISTS `item_bonus_tree_node`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `item_bonus_tree_node` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `BonusTreeID` int(10) unsigned NOT NULL DEFAULT '0',
+ `BonusTreeModID` int(10) unsigned NOT NULL DEFAULT '0',
+ `SubTreeID` int(10) unsigned NOT NULL DEFAULT '0',
+ `BonusListID` int(10) unsigned NOT NULL DEFAULT '0',
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `item_bonus_tree_node`
+--
+
+LOCK TABLES `item_bonus_tree_node` WRITE;
+/*!40000 ALTER TABLE `item_bonus_tree_node` DISABLE KEYS */;
+/*!40000 ALTER TABLE `item_bonus_tree_node` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `item_currency_cost`
+--
+
+DROP TABLE IF EXISTS `item_currency_cost`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `item_currency_cost` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `ItemId` int(10) unsigned NOT NULL DEFAULT '0',
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`),
+ UNIQUE KEY `idx_itemId` (`ItemId`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `item_currency_cost`
+--
+
+LOCK TABLES `item_currency_cost` WRITE;
+/*!40000 ALTER TABLE `item_currency_cost` DISABLE KEYS */;
+/*!40000 ALTER TABLE `item_currency_cost` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `item_effect`
+--
+
+DROP TABLE IF EXISTS `item_effect`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `item_effect` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `ItemID` int(10) unsigned NOT NULL DEFAULT '0',
+ `OrderIndex` int(10) unsigned NOT NULL DEFAULT '0',
+ `SpellID` int(10) unsigned NOT NULL DEFAULT '0',
+ `Trigger` int(10) unsigned NOT NULL DEFAULT '0',
+ `Charges` int(10) unsigned NOT NULL DEFAULT '0',
+ `Cooldown` int(11) NOT NULL DEFAULT '0',
+ `Category` int(10) unsigned NOT NULL DEFAULT '0',
+ `CategoryCooldown` int(11) NOT NULL DEFAULT '0',
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `item_effect`
+--
+
+LOCK TABLES `item_effect` WRITE;
+/*!40000 ALTER TABLE `item_effect` DISABLE KEYS */;
+/*!40000 ALTER TABLE `item_effect` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `item`
+--
+
+DROP TABLE IF EXISTS `item`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `item` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `Class` int(10) unsigned NOT NULL DEFAULT '0',
+ `SubClass` int(10) unsigned NOT NULL DEFAULT '0',
+ `SoundOverrideSubclass` int(11) NOT NULL DEFAULT '0',
+ `Material` int(11) NOT NULL DEFAULT '0',
+ `InventoryType` int(10) unsigned NOT NULL DEFAULT '0',
+ `Sheath` int(10) unsigned NOT NULL DEFAULT '0',
+ `FileDataID` int(10) unsigned NOT NULL DEFAULT '0',
+ `GroupSoundsID` int(10) unsigned NOT NULL DEFAULT '0',
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `item`
+--
+
+LOCK TABLES `item` WRITE;
+/*!40000 ALTER TABLE `item` DISABLE KEYS */;
+/*!40000 ALTER TABLE `item` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `item_extended_cost`
+--
+
+DROP TABLE IF EXISTS `item_extended_cost`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `item_extended_cost` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredHonorPoints` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredArenaPoints` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredArenaSlot` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredItem1` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredItem2` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredItem3` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredItem4` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredItem5` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredItemCount1` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredItemCount2` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredItemCount3` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredItemCount4` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredItemCount5` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredPersonalArenaRating` int(10) unsigned NOT NULL DEFAULT '0',
+ `ItemPurchaseGroup` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredCurrency1` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredCurrency2` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredCurrency3` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredCurrency4` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredCurrency5` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredCurrencyCount1` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredCurrencyCount2` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredCurrencyCount3` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredCurrencyCount4` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredCurrencyCount5` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredFactionId` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredFactionStanding` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequirementFlags` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredAchievement` int(10) unsigned NOT NULL DEFAULT '0',
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `item_extended_cost`
+--
+
+LOCK TABLES `item_extended_cost` WRITE;
+/*!40000 ALTER TABLE `item_extended_cost` DISABLE KEYS */;
+/*!40000 ALTER TABLE `item_extended_cost` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `item_modified_appearance`
+--
+
+DROP TABLE IF EXISTS `item_modified_appearance`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `item_modified_appearance` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `ItemID` int(10) unsigned NOT NULL DEFAULT '0',
+ `AppearanceModID` int(10) unsigned NOT NULL DEFAULT '0',
+ `AppearanceID` int(10) unsigned NOT NULL DEFAULT '0',
+ `IconFileDataID` int(10) unsigned NOT NULL DEFAULT '0',
+ `Index` int(10) unsigned NOT NULL DEFAULT '0',
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `item_modified_appearance`
+--
+
+LOCK TABLES `item_modified_appearance` WRITE;
+/*!40000 ALTER TABLE `item_modified_appearance` DISABLE KEYS */;
+/*!40000 ALTER TABLE `item_modified_appearance` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `item_sparse`
+--
+
+DROP TABLE IF EXISTS `item_sparse`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `item_sparse` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `Quality` int(10) unsigned NOT NULL DEFAULT '0',
+ `Flags1` int(10) unsigned NOT NULL DEFAULT '0',
+ `Flags2` int(10) unsigned NOT NULL DEFAULT '0',
+ `Flags3` int(10) unsigned NOT NULL DEFAULT '0',
+ `Unk1` float NOT NULL DEFAULT '0',
+ `Unk2` float NOT NULL DEFAULT '0',
+ `BuyCount` int(10) unsigned NOT NULL DEFAULT '0',
+ `BuyPrice` int(10) unsigned NOT NULL DEFAULT '0',
+ `SellPrice` int(10) unsigned NOT NULL DEFAULT '0',
+ `InventoryType` int(10) unsigned NOT NULL DEFAULT '0',
+ `AllowableClass` int(11) NOT NULL DEFAULT '0',
+ `AllowableRace` int(11) NOT NULL DEFAULT '0',
+ `ItemLevel` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredLevel` int(11) NOT NULL DEFAULT '0',
+ `RequiredSkill` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredSkillRank` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredSpell` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredHonorRank` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredCityRank` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredReputationFaction` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredReputationRank` int(10) unsigned NOT NULL DEFAULT '0',
+ `MaxCount` int(10) unsigned NOT NULL DEFAULT '0',
+ `Stackable` int(10) unsigned NOT NULL DEFAULT '0',
+ `ContainerSlots` int(10) unsigned NOT NULL DEFAULT '0',
+ `ItemStatType1` int(11) NOT NULL DEFAULT '0',
+ `ItemStatType2` int(11) NOT NULL DEFAULT '0',
+ `ItemStatType3` int(11) NOT NULL DEFAULT '0',
+ `ItemStatType4` int(11) NOT NULL DEFAULT '0',
+ `ItemStatType5` int(11) NOT NULL DEFAULT '0',
+ `ItemStatType6` int(11) NOT NULL DEFAULT '0',
+ `ItemStatType7` int(11) NOT NULL DEFAULT '0',
+ `ItemStatType8` int(11) NOT NULL DEFAULT '0',
+ `ItemStatType9` int(11) NOT NULL DEFAULT '0',
+ `ItemStatType10` int(11) NOT NULL DEFAULT '0',
+ `ItemStatValue1` int(11) NOT NULL DEFAULT '0',
+ `ItemStatValue2` int(11) NOT NULL DEFAULT '0',
+ `ItemStatValue3` int(11) NOT NULL DEFAULT '0',
+ `ItemStatValue4` int(11) NOT NULL DEFAULT '0',
+ `ItemStatValue5` int(11) NOT NULL DEFAULT '0',
+ `ItemStatValue6` int(11) NOT NULL DEFAULT '0',
+ `ItemStatValue7` int(11) NOT NULL DEFAULT '0',
+ `ItemStatValue8` int(11) NOT NULL DEFAULT '0',
+ `ItemStatValue9` int(11) NOT NULL DEFAULT '0',
+ `ItemStatValue10` int(11) NOT NULL DEFAULT '0',
+ `ItemStatAllocation1` int(11) NOT NULL DEFAULT '0',
+ `ItemStatAllocation2` int(11) NOT NULL DEFAULT '0',
+ `ItemStatAllocation3` int(11) NOT NULL DEFAULT '0',
+ `ItemStatAllocation4` int(11) NOT NULL DEFAULT '0',
+ `ItemStatAllocation5` int(11) NOT NULL DEFAULT '0',
+ `ItemStatAllocation6` int(11) NOT NULL DEFAULT '0',
+ `ItemStatAllocation7` int(11) NOT NULL DEFAULT '0',
+ `ItemStatAllocation8` int(11) NOT NULL DEFAULT '0',
+ `ItemStatAllocation9` int(11) NOT NULL DEFAULT '0',
+ `ItemStatAllocation10` int(11) NOT NULL DEFAULT '0',
+ `ItemStatSocketCostMultiplier1` float NOT NULL DEFAULT '0',
+ `ItemStatSocketCostMultiplier2` float NOT NULL DEFAULT '0',
+ `ItemStatSocketCostMultiplier3` float NOT NULL DEFAULT '0',
+ `ItemStatSocketCostMultiplier4` float NOT NULL DEFAULT '0',
+ `ItemStatSocketCostMultiplier5` float NOT NULL DEFAULT '0',
+ `ItemStatSocketCostMultiplier6` float NOT NULL DEFAULT '0',
+ `ItemStatSocketCostMultiplier7` float NOT NULL DEFAULT '0',
+ `ItemStatSocketCostMultiplier8` float NOT NULL DEFAULT '0',
+ `ItemStatSocketCostMultiplier9` float NOT NULL DEFAULT '0',
+ `ItemStatSocketCostMultiplier10` float NOT NULL DEFAULT '0',
+ `ScalingStatDistribution` int(10) unsigned NOT NULL DEFAULT '0',
+ `DamageType` int(10) unsigned NOT NULL DEFAULT '0',
+ `Delay` int(10) unsigned NOT NULL DEFAULT '0',
+ `RangedModRange` float NOT NULL DEFAULT '0',
+ `Bonding` int(10) unsigned NOT NULL DEFAULT '0',
+ `Name` text,
+ `Name2` text,
+ `Name3` text,
+ `Name4` text,
+ `Description` text,
+ `PageText` int(10) unsigned NOT NULL DEFAULT '0',
+ `LanguageID` int(10) unsigned NOT NULL DEFAULT '0',
+ `PageMaterial` int(10) unsigned NOT NULL DEFAULT '0',
+ `StartQuest` int(10) unsigned NOT NULL DEFAULT '0',
+ `LockID` int(10) unsigned NOT NULL DEFAULT '0',
+ `Material` int(11) NOT NULL DEFAULT '0',
+ `Sheath` int(10) unsigned NOT NULL DEFAULT '0',
+ `RandomProperty` int(10) unsigned NOT NULL DEFAULT '0',
+ `RandomSuffix` int(10) unsigned NOT NULL DEFAULT '0',
+ `ItemSet` int(10) unsigned NOT NULL DEFAULT '0',
+ `Area` int(10) unsigned NOT NULL DEFAULT '0',
+ `Map` int(10) unsigned NOT NULL DEFAULT '0',
+ `BagFamily` int(10) unsigned NOT NULL DEFAULT '0',
+ `TotemCategory` int(10) unsigned NOT NULL DEFAULT '0',
+ `SocketColor1` int(10) unsigned NOT NULL DEFAULT '0',
+ `SocketColor2` int(10) unsigned NOT NULL DEFAULT '0',
+ `SocketColor3` int(10) unsigned NOT NULL DEFAULT '0',
+ `SocketBonus` int(10) unsigned NOT NULL DEFAULT '0',
+ `GemProperties` int(10) unsigned NOT NULL DEFAULT '0',
+ `ArmorDamageModifier` float NOT NULL DEFAULT '0',
+ `Duration` int(10) unsigned NOT NULL DEFAULT '0',
+ `ItemLimitCategory` int(10) unsigned NOT NULL DEFAULT '0',
+ `HolidayID` int(10) unsigned NOT NULL DEFAULT '0',
+ `StatScalingFactor` float NOT NULL DEFAULT '0',
+ `CurrencySubstitutionID` int(10) unsigned NOT NULL DEFAULT '0',
+ `CurrencySubstitutionCount` int(10) unsigned NOT NULL DEFAULT '0',
+ `ItemNameDescriptionID` int(10) unsigned NOT NULL DEFAULT '0',
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `item_sparse`
+--
+
+LOCK TABLES `item_sparse` WRITE;
+/*!40000 ALTER TABLE `item_sparse` DISABLE KEYS */;
+/*!40000 ALTER TABLE `item_sparse` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `item_sparse_locale`
+--
+
+DROP TABLE IF EXISTS `item_sparse_locale`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `item_sparse_locale` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `locale` varchar(4) NOT NULL,
+ `Name_lang` text,
+ `Name2_lang` text,
+ `Name3_lang` text,
+ `Name4_lang` text,
+ `Description_lang` text,
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`,`locale`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `item_sparse_locale`
+--
+
+LOCK TABLES `item_sparse_locale` WRITE;
+/*!40000 ALTER TABLE `item_sparse_locale` DISABLE KEYS */;
+/*!40000 ALTER TABLE `item_sparse_locale` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `item_x_bonus_tree`
+--
+
+DROP TABLE IF EXISTS `item_x_bonus_tree`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `item_x_bonus_tree` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `ItemID` int(10) unsigned NOT NULL DEFAULT '0',
+ `BonusTreeID` int(10) unsigned NOT NULL DEFAULT '0',
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `item_x_bonus_tree`
+--
+
+LOCK TABLES `item_x_bonus_tree` WRITE;
+/*!40000 ALTER TABLE `item_x_bonus_tree` DISABLE KEYS */;
+/*!40000 ALTER TABLE `item_x_bonus_tree` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `key_chain`
+--
+
+DROP TABLE IF EXISTS `key_chain`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `key_chain` (
+ `Id` int(10) unsigned NOT NULL DEFAULT '0',
+ `Key1` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Key2` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Key3` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Key4` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Key5` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Key6` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Key7` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Key8` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Key9` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Key10` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Key11` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Key12` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Key13` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Key14` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Key15` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Key16` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Key17` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Key18` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Key19` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Key20` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Key21` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Key22` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Key23` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Key24` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Key25` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Key26` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Key27` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Key28` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Key29` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Key30` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Key31` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Key32` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`Id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `key_chain`
+--
+
+LOCK TABLES `key_chain` WRITE;
+/*!40000 ALTER TABLE `key_chain` DISABLE KEYS */;
+/*!40000 ALTER TABLE `key_chain` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `mount`
+--
+
+DROP TABLE IF EXISTS `mount`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `mount` (
+ `Id` int(10) unsigned NOT NULL DEFAULT '0',
+ `MountTypeId` int(10) unsigned NOT NULL DEFAULT '0',
+ `DisplayId` int(10) unsigned NOT NULL DEFAULT '0',
+ `Flags` int(10) unsigned NOT NULL DEFAULT '0',
+ `Name` text,
+ `Description` text,
+ `SourceDescription` text,
+ `Source` int(10) unsigned NOT NULL DEFAULT '0',
+ `SpellId` 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;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `mount`
+--
+
+LOCK TABLES `mount` WRITE;
+/*!40000 ALTER TABLE `mount` DISABLE KEYS */;
+/*!40000 ALTER TABLE `mount` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `mount_locale`
+--
+
+DROP TABLE IF EXISTS `mount_locale`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `mount_locale` (
+ `Id` int(10) unsigned NOT NULL DEFAULT '0',
+ `locale` varchar(4) NOT NULL,
+ `Name_lang` text,
+ `Description_lang` text,
+ `SourceDescription_lang` text,
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`Id`,`locale`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `mount_locale`
+--
+
+LOCK TABLES `mount_locale` WRITE;
+/*!40000 ALTER TABLE `mount_locale` DISABLE KEYS */;
+/*!40000 ALTER TABLE `mount_locale` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `override_spell_data`
+--
+
+DROP TABLE IF EXISTS `override_spell_data`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `override_spell_data` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `SpellID1` int(10) unsigned NOT NULL DEFAULT '0',
+ `SpellID2` int(10) unsigned NOT NULL DEFAULT '0',
+ `SpellID3` int(10) unsigned NOT NULL DEFAULT '0',
+ `SpellID4` int(10) unsigned NOT NULL DEFAULT '0',
+ `SpellID5` int(10) unsigned NOT NULL DEFAULT '0',
+ `SpellID6` int(10) unsigned NOT NULL DEFAULT '0',
+ `SpellID7` int(10) unsigned NOT NULL DEFAULT '0',
+ `SpellID8` int(10) unsigned NOT NULL DEFAULT '0',
+ `SpellID9` int(10) unsigned NOT NULL DEFAULT '0',
+ `SpellID10` int(10) unsigned NOT NULL DEFAULT '0',
+ `Flags` int(10) unsigned NOT NULL DEFAULT '0',
+ `PlayerActionbarFileDataID` int(10) unsigned NOT NULL DEFAULT '0',
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `override_spell_data`
+--
+
+LOCK TABLES `override_spell_data` WRITE;
+/*!40000 ALTER TABLE `override_spell_data` DISABLE KEYS */;
+/*!40000 ALTER TABLE `override_spell_data` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `phase_group`
+--
+
+DROP TABLE IF EXISTS `phase_group`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `phase_group` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `PhaseID` int(10) unsigned NOT NULL DEFAULT '0',
+ `PhaseGroupID` int(10) unsigned NOT NULL DEFAULT '0',
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `phase_group`
+--
+
+LOCK TABLES `phase_group` WRITE;
+/*!40000 ALTER TABLE `phase_group` DISABLE KEYS */;
+/*!40000 ALTER TABLE `phase_group` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `spell_aura_restrictions`
+--
+
+DROP TABLE IF EXISTS `spell_aura_restrictions`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `spell_aura_restrictions` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `CasterAuraState` int(10) unsigned NOT NULL DEFAULT '0',
+ `TargetAuraState` int(10) unsigned NOT NULL DEFAULT '0',
+ `ExcludeCasterAuraState` int(10) unsigned NOT NULL DEFAULT '0',
+ `ExcludeTargetAuraState` int(10) unsigned NOT NULL DEFAULT '0',
+ `CasterAuraSpell` int(10) unsigned NOT NULL DEFAULT '0',
+ `TargetAuraSpell` int(10) unsigned NOT NULL DEFAULT '0',
+ `ExcludeCasterAuraSpell` int(10) unsigned NOT NULL DEFAULT '0',
+ `ExcludeTargetAuraSpell` int(10) unsigned NOT NULL DEFAULT '0',
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `spell_aura_restrictions`
+--
+
+LOCK TABLES `spell_aura_restrictions` WRITE;
+/*!40000 ALTER TABLE `spell_aura_restrictions` DISABLE KEYS */;
+/*!40000 ALTER TABLE `spell_aura_restrictions` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `spell_casting_requirements`
+--
+
+DROP TABLE IF EXISTS `spell_casting_requirements`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `spell_casting_requirements` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `FacingCasterFlags` int(10) unsigned NOT NULL DEFAULT '0',
+ `MinFactionID` int(10) unsigned NOT NULL DEFAULT '0',
+ `MinReputation` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredAreasID` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredAuraVision` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiresSpellFocus` int(10) unsigned NOT NULL DEFAULT '0',
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `spell_casting_requirements`
+--
+
+LOCK TABLES `spell_casting_requirements` WRITE;
+/*!40000 ALTER TABLE `spell_casting_requirements` DISABLE KEYS */;
+/*!40000 ALTER TABLE `spell_casting_requirements` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `spell_class_options`
+--
+
+DROP TABLE IF EXISTS `spell_class_options`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `spell_class_options` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `ModalNextSpell` int(10) unsigned NOT NULL DEFAULT '0',
+ `SpellClassMask1` int(10) unsigned NOT NULL DEFAULT '0',
+ `SpellClassMask2` int(10) unsigned NOT NULL DEFAULT '0',
+ `SpellClassMask3` int(10) unsigned NOT NULL DEFAULT '0',
+ `SpellClassMask4` int(10) unsigned NOT NULL DEFAULT '0',
+ `SpellClassSet` int(10) unsigned NOT NULL DEFAULT '0',
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `spell_class_options`
+--
+
+LOCK TABLES `spell_class_options` WRITE;
+/*!40000 ALTER TABLE `spell_class_options` DISABLE KEYS */;
+/*!40000 ALTER TABLE `spell_class_options` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `spell_learn_spell`
+--
+
+DROP TABLE IF EXISTS `spell_learn_spell`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `spell_learn_spell` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `LearnSpellID` int(10) unsigned NOT NULL DEFAULT '0',
+ `SpellID` int(10) unsigned NOT NULL DEFAULT '0',
+ `OverridesSpellID` int(10) unsigned NOT NULL DEFAULT '0',
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `spell_learn_spell`
+--
+
+LOCK TABLES `spell_learn_spell` WRITE;
+/*!40000 ALTER TABLE `spell_learn_spell` DISABLE KEYS */;
+/*!40000 ALTER TABLE `spell_learn_spell` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `spell_misc`
+--
+
+DROP TABLE IF EXISTS `spell_misc`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `spell_misc` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `Attributes` int(10) unsigned NOT NULL DEFAULT '0',
+ `AttributesEx` int(10) unsigned NOT NULL DEFAULT '0',
+ `AttributesExB` int(10) unsigned NOT NULL DEFAULT '0',
+ `AttributesExC` int(10) unsigned NOT NULL DEFAULT '0',
+ `AttributesExD` int(10) unsigned NOT NULL DEFAULT '0',
+ `AttributesExE` int(10) unsigned NOT NULL DEFAULT '0',
+ `AttributesExF` int(10) unsigned NOT NULL DEFAULT '0',
+ `AttributesExG` int(10) unsigned NOT NULL DEFAULT '0',
+ `AttributesExH` int(10) unsigned NOT NULL DEFAULT '0',
+ `AttributesExI` int(10) unsigned NOT NULL DEFAULT '0',
+ `AttributesExJ` int(10) unsigned NOT NULL DEFAULT '0',
+ `AttributesExK` int(10) unsigned NOT NULL DEFAULT '0',
+ `AttributesExL` int(10) unsigned NOT NULL DEFAULT '0',
+ `AttributesExM` int(10) unsigned NOT NULL DEFAULT '0',
+ `CastingTimeIndex` int(10) unsigned NOT NULL DEFAULT '0',
+ `DurationIndex` int(10) unsigned NOT NULL DEFAULT '0',
+ `RangeIndex` int(10) unsigned NOT NULL DEFAULT '0',
+ `Speed` float NOT NULL DEFAULT '0',
+ `SpellVisualID1` int(10) unsigned NOT NULL DEFAULT '0',
+ `SpellVisualID2` int(10) unsigned NOT NULL DEFAULT '0',
+ `SpellIconID` int(10) unsigned NOT NULL DEFAULT '0',
+ `ActiveIconID` int(10) unsigned NOT NULL DEFAULT '0',
+ `SchoolMask` int(10) unsigned NOT NULL DEFAULT '0',
+ `MultistrikeSpeedMod` float NOT NULL DEFAULT '0',
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `spell_misc`
+--
+
+LOCK TABLES `spell_misc` WRITE;
+/*!40000 ALTER TABLE `spell_misc` DISABLE KEYS */;
+/*!40000 ALTER TABLE `spell_misc` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `spell_power`
+--
+
+DROP TABLE IF EXISTS `spell_power`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `spell_power` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `SpellID` int(10) unsigned NOT NULL DEFAULT '0',
+ `PowerIndex` int(10) unsigned NOT NULL DEFAULT '0',
+ `PowerType` int(10) unsigned NOT NULL DEFAULT '0',
+ `ManaCost` int(10) unsigned NOT NULL DEFAULT '0',
+ `ManaCostPerLevel` int(10) unsigned NOT NULL DEFAULT '0',
+ `ManaCostPerSecond` int(10) unsigned NOT NULL DEFAULT '0',
+ `ManaCostAdditional` int(10) unsigned NOT NULL DEFAULT '0',
+ `PowerDisplayID` int(10) unsigned NOT NULL DEFAULT '0',
+ `UnitPowerBarID` int(10) unsigned NOT NULL DEFAULT '0',
+ `ManaCostPercentage` float NOT NULL DEFAULT '0',
+ `ManaCostPercentagePerSecond` float NOT NULL DEFAULT '0',
+ `RequiredAura` int(10) unsigned NOT NULL DEFAULT '0',
+ `HealthCostPercentage` float NOT NULL DEFAULT '0',
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `spell_power`
+--
+
+LOCK TABLES `spell_power` WRITE;
+/*!40000 ALTER TABLE `spell_power` DISABLE KEYS */;
+/*!40000 ALTER TABLE `spell_power` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `spell_reagents`
+--
+
+DROP TABLE IF EXISTS `spell_reagents`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `spell_reagents` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `Reagent1` int(11) NOT NULL DEFAULT '0',
+ `Reagent2` int(11) NOT NULL DEFAULT '0',
+ `Reagent3` int(11) NOT NULL DEFAULT '0',
+ `Reagent4` int(11) NOT NULL DEFAULT '0',
+ `Reagent5` int(11) NOT NULL DEFAULT '0',
+ `Reagent6` int(11) NOT NULL DEFAULT '0',
+ `Reagent7` int(11) NOT NULL DEFAULT '0',
+ `Reagent8` int(11) NOT NULL DEFAULT '0',
+ `ReagentCount1` int(10) unsigned NOT NULL DEFAULT '0',
+ `ReagentCount2` int(10) unsigned NOT NULL DEFAULT '0',
+ `ReagentCount3` int(10) unsigned NOT NULL DEFAULT '0',
+ `ReagentCount4` int(10) unsigned NOT NULL DEFAULT '0',
+ `ReagentCount5` int(10) unsigned NOT NULL DEFAULT '0',
+ `ReagentCount6` int(10) unsigned NOT NULL DEFAULT '0',
+ `ReagentCount7` int(10) unsigned NOT NULL DEFAULT '0',
+ `ReagentCount8` int(10) unsigned NOT NULL DEFAULT '0',
+ `CurrencyID` int(10) unsigned NOT NULL DEFAULT '0',
+ `CurrencyCount` int(10) unsigned NOT NULL DEFAULT '0',
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `spell_reagents`
+--
+
+LOCK TABLES `spell_reagents` WRITE;
+/*!40000 ALTER TABLE `spell_reagents` DISABLE KEYS */;
+/*!40000 ALTER TABLE `spell_reagents` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `spell_rune_cost`
+--
+
+DROP TABLE IF EXISTS `spell_rune_cost`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `spell_rune_cost` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `Blood` int(10) unsigned NOT NULL DEFAULT '0',
+ `Unholy` int(10) unsigned NOT NULL DEFAULT '0',
+ `Frost` int(10) unsigned NOT NULL DEFAULT '0',
+ `Chromatic` int(10) unsigned NOT NULL DEFAULT '0',
+ `RunicPower` int(10) unsigned NOT NULL DEFAULT '0',
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `spell_rune_cost`
+--
+
+LOCK TABLES `spell_rune_cost` WRITE;
+/*!40000 ALTER TABLE `spell_rune_cost` DISABLE KEYS */;
+/*!40000 ALTER TABLE `spell_rune_cost` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `spell_totems`
+--
+
+DROP TABLE IF EXISTS `spell_totems`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `spell_totems` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredTotemCategoryID1` int(10) unsigned NOT NULL DEFAULT '0',
+ `RequiredTotemCategoryID2` int(10) unsigned NOT NULL DEFAULT '0',
+ `Totem1` int(10) unsigned NOT NULL DEFAULT '0',
+ `Totem2` int(10) unsigned NOT NULL DEFAULT '0',
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `spell_totems`
+--
+
+LOCK TABLES `spell_totems` WRITE;
+/*!40000 ALTER TABLE `spell_totems` DISABLE KEYS */;
+/*!40000 ALTER TABLE `spell_totems` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `taxi_nodes`
+--
+
+DROP TABLE IF EXISTS `taxi_nodes`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `taxi_nodes` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `MapID` 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',
+ `Name` text,
+ `MountCreatureID1` int(10) unsigned NOT NULL DEFAULT '0',
+ `MountCreatureID2` int(10) unsigned NOT NULL DEFAULT '0',
+ `ConditionID` int(10) unsigned NOT NULL DEFAULT '0',
+ `Flags` int(10) unsigned NOT NULL DEFAULT '0',
+ `MapOffsetX` float NOT NULL DEFAULT '0',
+ `MapOffsetY` float NOT NULL DEFAULT '0',
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `taxi_nodes`
+--
+
+LOCK TABLES `taxi_nodes` WRITE;
+/*!40000 ALTER TABLE `taxi_nodes` DISABLE KEYS */;
+/*!40000 ALTER TABLE `taxi_nodes` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `taxi_nodes_locale`
+--
+
+DROP TABLE IF EXISTS `taxi_nodes_locale`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `taxi_nodes_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;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `taxi_nodes_locale`
+--
+
+LOCK TABLES `taxi_nodes_locale` WRITE;
+/*!40000 ALTER TABLE `taxi_nodes_locale` DISABLE KEYS */;
+/*!40000 ALTER TABLE `taxi_nodes_locale` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `taxi_path`
+--
+
+DROP TABLE IF EXISTS `taxi_path`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `taxi_path` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `From` int(10) unsigned NOT NULL DEFAULT '0',
+ `To` int(10) unsigned NOT NULL DEFAULT '0',
+ `Cost` int(10) unsigned NOT NULL DEFAULT '0',
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `taxi_path`
+--
+
+LOCK TABLES `taxi_path` WRITE;
+/*!40000 ALTER TABLE `taxi_path` DISABLE KEYS */;
+/*!40000 ALTER TABLE `taxi_path` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `taxi_path_node`
+--
+
+ALTER TABLE `taxi_path_node`
+ CHANGE `ID` `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ CHANGE `PathNode` `PathID` int(10) unsigned NOT NULL DEFAULT '0',
+ CHANGE `NodeIndex` `NodeIndex` int(10) unsigned NOT NULL DEFAULT '0',
+ CHANGE `MapID` `MapID` int(10) unsigned NOT NULL DEFAULT '0',
+ CHANGE `PositionX` `LocX` float NOT NULL DEFAULT '0',
+ CHANGE `PositionY` `LocY` float NOT NULL DEFAULT '0',
+ CHANGE `PositionZ` `LocZ` float NOT NULL DEFAULT '0',
+ CHANGE `ActionFlags` `Flags` int(10) unsigned NOT NULL DEFAULT '0',
+ CHANGE `Delay` `Delay` int(10) unsigned NOT NULL DEFAULT '0',
+ CHANGE `ArrivalEventID` `ArrivalEventID` int(10) unsigned NOT NULL DEFAULT '0',
+ CHANGE `DepartureEventID` `DepartureEventID` int(10) unsigned NOT NULL DEFAULT '0',
+ CHANGE `VerifiedBuild` `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0';
+
+ALTER TABLE `hotfix_data` ADD `Deleted` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `Timestamp`;
diff --git a/src/server/game/DataStores/DB2Stores.cpp b/src/server/game/DataStores/DB2Stores.cpp
index fed1c1e60b3..44ac3d8ca19 100644
--- a/src/server/game/DataStores/DB2Stores.cpp
+++ b/src/server/game/DataStores/DB2Stores.cpp
@@ -23,36 +23,37 @@
#include "World.h"
#include <functional>
-DB2Storage<BroadcastTextEntry> sBroadcastTextStore(BroadcastTextEntryfmt, HOTFIX_SEL_BROADCAST_TEXT);
-DB2Storage<CurvePointEntry> sCurvePointStore(CurvePointEntryfmt);
-DB2Storage<HolidaysEntry> sHolidaysStore(HolidaysEntryfmt);
-DB2Storage<ItemEntry> sItemStore(Itemfmt);
-DB2Storage<ItemAppearanceEntry> sItemAppearanceStore(ItemAppearanceEntryfmt);
-DB2Storage<ItemBonusEntry> sItemBonusStore(ItemBonusEntryfmt);
-DB2Storage<ItemBonusTreeNodeEntry> sItemBonusTreeNodeStore(ItemBonusTreeNodeEntryfmt);
-DB2Storage<ItemCurrencyCostEntry> sItemCurrencyCostStore(ItemCurrencyCostfmt);
-DB2Storage<ItemExtendedCostEntry> sItemExtendedCostStore(ItemExtendedCostEntryfmt);
-DB2Storage<ItemEffectEntry> sItemEffectStore(ItemEffectEntryfmt);
-DB2Storage<ItemModifiedAppearanceEntry> sItemModifiedAppearanceStore(ItemModifiedAppearanceEntryfmt);
-DB2Storage<ItemSparseEntry> sItemSparseStore(ItemSparsefmt);
-DB2Storage<ItemXBonusTreeEntry> sItemXBonusTreeStore(ItemXBonusTreeEntryfmt);
-DB2Storage<KeyChainEntry> sKeyChainStore(KeyChainfmt);
-DB2Storage<MountEntry> sMountStore(Mountfmt);
-DB2Storage<OverrideSpellDataEntry> sOverrideSpellDataStore(OverrideSpellDataEntryfmt);
-DB2Storage<PhaseGroupEntry> sPhaseGroupStore(PhaseGroupEntryfmt);
-DB2Storage<SpellAuraRestrictionsEntry> sSpellAuraRestrictionsStore(SpellAuraRestrictionsEntryfmt);
-DB2Storage<SpellCastingRequirementsEntry> sSpellCastingRequirementsStore(SpellCastingRequirementsEntryfmt);
-DB2Storage<SpellClassOptionsEntry> sSpellClassOptionsStore(SpellClassOptionsEntryfmt);
-DB2Storage<SpellLearnSpellEntry> sSpellLearnSpellStore(SpellLearnSpellEntryfmt);
-DB2Storage<SpellMiscEntry> sSpellMiscStore(SpellMiscEntryfmt);
-DB2Storage<SpellPowerEntry> sSpellPowerStore(SpellPowerEntryfmt);
+DB2Storage<BroadcastTextEntry> sBroadcastTextStore(BroadcastTextFormat, HOTFIX_SEL_BROADCAST_TEXT);
+DB2Storage<CurvePointEntry> sCurvePointStore(CurvePointFormat, HOTFIX_SEL_CURVE_POINT);
+DB2Storage<HolidaysEntry> sHolidaysStore(HolidaysEntryFormat, HOTFIX_SEL_HOLIDAYS);
+DB2Storage<ItemAppearanceEntry> sItemAppearanceStore(ItemAppearanceFormat, HOTFIX_SEL_ITEM_APPEARANCE);
+DB2Storage<ItemBonusEntry> sItemBonusStore(ItemBonusFormat, HOTFIX_SEL_ITEM_BONUS);
+DB2Storage<ItemBonusTreeNodeEntry> sItemBonusTreeNodeStore(ItemBonusTreeNodeFormat, HOTFIX_SEL_ITEM_BONUS_TREE_NODE);
+DB2Storage<ItemCurrencyCostEntry> sItemCurrencyCostStore(ItemCurrencyCostFormat, HOTFIX_SEL_ITEM_CURRENCY_COST);
+DB2Storage<ItemEffectEntry> sItemEffectStore(ItemEffectFormat, HOTFIX_SEL_ITEM_EFFECT);
+DB2Storage<ItemEntry> sItemStore(ItemFormat, HOTFIX_SEL_ITEM);
+DB2Storage<ItemExtendedCostEntry> sItemExtendedCostStore(ItemExtendedCostFormat, HOTFIX_SEL_ITEM_EXTENDED_COST);
+DB2Storage<ItemModifiedAppearanceEntry> sItemModifiedAppearanceStore(ItemModifiedAppearanceFormat, HOTFIX_SEL_ITEM_MODIFIED_APPEARANCE);
+DB2Storage<ItemSparseEntry> sItemSparseStore(ItemSparseFormat, HOTFIX_SEL_ITEM_SPARSE);
+DB2Storage<ItemXBonusTreeEntry> sItemXBonusTreeStore(ItemXBonusTreeFormat, HOTFIX_SEL_ITEM_X_BONUS_TREE);
+DB2Storage<KeyChainEntry> sKeyChainStore(KeyChainFormat, HOTFIX_SEL_KEY_CHAIN);
+DB2Storage<MountEntry> sMountStore(MountFormat, HOTFIX_SEL_MOUNT);
+DB2Storage<OverrideSpellDataEntry> sOverrideSpellDataStore(OverrideSpellDataFormat, HOTFIX_SEL_OVERRIDE_SPELL_DATA);
+DB2Storage<PhaseGroupEntry> sPhaseGroupStore(PhaseGroupFormat, HOTFIX_SEL_PHASE_GROUP);
+DB2Storage<SpellAuraRestrictionsEntry> sSpellAuraRestrictionsStore(SpellAuraRestrictionsFormat, HOTFIX_SEL_SPELL_AURA_RESTRICTIONS);
+DB2Storage<SpellCastingRequirementsEntry> sSpellCastingRequirementsStore(SpellCastingRequirementsFormat, HOTFIX_SEL_SPELL_CASTING_REQUIREMENTS);
+DB2Storage<SpellClassOptionsEntry> sSpellClassOptionsStore(SpellClassOptionsFormat, HOTFIX_SEL_SPELL_CLASS_OPTIONS);
+DB2Storage<SpellLearnSpellEntry> sSpellLearnSpellStore(SpellLearnSpellFormat, HOTFIX_SEL_SPELL_LEARN_SPELL);
+DB2Storage<SpellMiscEntry> sSpellMiscStore(SpellMiscFormat, HOTFIX_SEL_SPELL_MISC);
+DB2Storage<SpellPowerEntry> sSpellPowerStore(SpellPowerFormat, HOTFIX_SEL_SPELL_POWER);
+DB2Storage<SpellReagentsEntry> sSpellReagentsStore(SpellReagentsFormat, HOTFIX_SEL_SPELL_REAGENTS);
+DB2Storage<SpellRuneCostEntry> sSpellRuneCostStore(SpellRuneCostFormat, HOTFIX_SEL_SPELL_RUNE_COST);
+DB2Storage<SpellTotemsEntry> sSpellTotemsStore(SpellTotemsFormat, HOTFIX_SEL_SPELL_TOTEMS);
+DB2Storage<TaxiNodesEntry> sTaxiNodesStore(TaxiNodesFormat, HOTFIX_SEL_TAXI_NODES);
+DB2Storage<TaxiPathEntry> sTaxiPathStore(TaxiPathFormat, HOTFIX_SEL_TAXI_PATH);
+DB2Storage<TaxiPathNodeEntry> sTaxiPathNodeStore(TaxiPathNodeFormat, HOTFIX_SEL_TAXI_PATH_NODE);
+
SpellPowerBySpellIDMap sSpellPowerBySpellIDStore;
-DB2Storage<SpellReagentsEntry> sSpellReagentsStore(SpellReagentsEntryfmt);
-DB2Storage<SpellRuneCostEntry> sSpellRuneCostStore(SpellRuneCostEntryfmt);
-DB2Storage<SpellTotemsEntry> sSpellTotemsStore(SpellTotemsEntryfmt);
-DB2Storage<TaxiNodesEntry> sTaxiNodesStore(TaxiNodesEntryfmt);
-DB2Storage<TaxiPathEntry> sTaxiPathStore(TaxiPathEntryfmt);
-DB2Storage<TaxiPathNodeEntry> sTaxiPathNodeStore(TaxiPathNodeEntryfmt, HOTFIX_SEL_TAXI_PATH_NODE);
TaxiMask sTaxiNodesMask;
TaxiMask sOldContinentsNodesMask;
TaxiMask sHordeTaxiNodesMask;
@@ -66,19 +67,19 @@ typedef std::list<std::string> DB2StoreProblemList;
uint32 DB2FilesCount = 0;
template<class T>
-inline void LoadDB2(uint32& availableDb2Locales, DB2StoreProblemList& errlist, DB2Manager::StorageMap& stores, DB2Storage<T>& storage, std::string const& db2_path, std::string const& filename)
+inline void LoadDB2(uint32& availableDb2Locales, DB2StoreProblemList& errlist, DB2Manager::StorageMap& stores, DB2Storage<T>* storage, std::string const& db2_path, std::string const& filename)
{
// compatibility format and C++ structure sizes
- ASSERT(DB2FileLoader::GetFormatRecordSize(storage.GetFormat()) == sizeof(T),
+ ASSERT(DB2FileLoader::GetFormatRecordSize(storage->GetFormat()) == sizeof(T),
"Size of '%s' set by format string (%u) not equal size of C++ structure (" SZFMTD ").",
- filename.c_str(), DB2FileLoader::GetFormatRecordSize(storage.GetFormat()), sizeof(T));
+ filename.c_str(), DB2FileLoader::GetFormatRecordSize(storage->GetFormat()), sizeof(T));
++DB2FilesCount;
std::string db2_filename = db2_path + filename;
- if (storage.Load(db2_filename.c_str(), uint32(sWorld->GetDefaultDbcLocale())))
+ if (storage->Load(db2_filename.c_str(), uint32(sWorld->GetDefaultDbcLocale())))
{
- storage.LoadFromDB();
+ storage->LoadFromDB();
for (uint32 i = 0; i < TOTAL_LOCALES; ++i)
{
@@ -92,13 +93,12 @@ inline void LoadDB2(uint32& availableDb2Locales, DB2StoreProblemList& errlist, D
localizedName.push_back('/');
localizedName.append(filename);
- if (!storage.LoadStringsFrom(localizedName.c_str(), i))
+ if (!storage->LoadStringsFrom(localizedName.c_str(), i))
availableDb2Locales &= ~(1 << i); // mark as not available for speedup next checks
}
- storage.LoadStringsFromDB(i);
+ storage->LoadStringsFromDB(i);
}
-
}
else
{
@@ -106,7 +106,7 @@ inline void LoadDB2(uint32& availableDb2Locales, DB2StoreProblemList& errlist, D
if (FILE* f = fopen(db2_filename.c_str(), "rb"))
{
std::ostringstream stream;
- stream << db2_filename << " exists, and has " << storage.GetFieldCount() << " field(s) (expected " << strlen(storage.GetFormat()) << "). Extracted file might be from wrong client version.";
+ stream << db2_filename << " exists, and has " << storage->GetFieldCount() << " field(s) (expected " << strlen(storage->GetFormat()) << "). Extracted file might be from wrong client version.";
std::string buf = stream.str();
errlist.push_back(buf);
fclose(f);
@@ -115,45 +115,47 @@ inline void LoadDB2(uint32& availableDb2Locales, DB2StoreProblemList& errlist, D
errlist.push_back(db2_filename);
}
- stores[storage.GetHash()] = &storage;
+ stores[storage->GetHash()] = storage;
}
void DB2Manager::LoadStores(std::string const& dataPath)
{
+ uint32 oldMSTime = getMSTime();
+
std::string db2Path = dataPath + "dbc/";
DB2StoreProblemList bad_db2_files;
uint32 availableDb2Locales = 0xFF;
- LoadDB2(availableDb2Locales, bad_db2_files, _stores, sBroadcastTextStore, db2Path, "BroadcastText.db2");
- LoadDB2(availableDb2Locales, bad_db2_files, _stores, sCurvePointStore, db2Path, "CurvePoint.db2");
- LoadDB2(availableDb2Locales, bad_db2_files, _stores, sHolidaysStore, db2Path, "Holidays.db2");
- LoadDB2(availableDb2Locales, bad_db2_files, _stores, sItemStore, db2Path, "Item.db2");
- LoadDB2(availableDb2Locales, bad_db2_files, _stores, sItemAppearanceStore, db2Path, "ItemAppearance.db2");
- LoadDB2(availableDb2Locales, bad_db2_files, _stores, sItemBonusStore, db2Path, "ItemBonus.db2");
- LoadDB2(availableDb2Locales, bad_db2_files, _stores, sItemBonusTreeNodeStore, db2Path, "ItemBonusTreeNode.db2");
- LoadDB2(availableDb2Locales, bad_db2_files, _stores, sItemCurrencyCostStore, db2Path, "ItemCurrencyCost.db2");
- LoadDB2(availableDb2Locales, bad_db2_files, _stores, sItemExtendedCostStore, db2Path, "ItemExtendedCost.db2");
- LoadDB2(availableDb2Locales, bad_db2_files, _stores, sItemEffectStore, db2Path, "ItemEffect.db2");
- LoadDB2(availableDb2Locales, bad_db2_files, _stores, sItemModifiedAppearanceStore, db2Path, "ItemModifiedAppearance.db2");
- LoadDB2(availableDb2Locales, bad_db2_files, _stores, sItemSparseStore, db2Path, "Item-sparse.db2");
- LoadDB2(availableDb2Locales, bad_db2_files, _stores, sItemXBonusTreeStore, db2Path, "ItemXBonusTree.db2");
- LoadDB2(availableDb2Locales, bad_db2_files, _stores, sKeyChainStore, db2Path, "KeyChain.db2");
- LoadDB2(availableDb2Locales, bad_db2_files, _stores, sMountStore, db2Path, "Mount.db2");
- LoadDB2(availableDb2Locales, bad_db2_files, _stores, sOverrideSpellDataStore, db2Path, "OverrideSpellData.db2");
- LoadDB2(availableDb2Locales, bad_db2_files, _stores, sPhaseGroupStore, db2Path, "PhaseXPhaseGroup.db2");
- LoadDB2(availableDb2Locales, bad_db2_files, _stores, sSpellAuraRestrictionsStore, db2Path, "SpellAuraRestrictions.db2");
- LoadDB2(availableDb2Locales, bad_db2_files, _stores, sSpellCastingRequirementsStore, db2Path, "SpellCastingRequirements.db2");
- LoadDB2(availableDb2Locales, bad_db2_files, _stores, sSpellClassOptionsStore, db2Path, "SpellClassOptions.db2");
- LoadDB2(availableDb2Locales, bad_db2_files, _stores, sSpellLearnSpellStore, db2Path, "SpellLearnSpell.db2");
- LoadDB2(availableDb2Locales, bad_db2_files, _stores, sSpellMiscStore, db2Path, "SpellMisc.db2");
- LoadDB2(availableDb2Locales, bad_db2_files, _stores, sSpellPowerStore, db2Path, "SpellPower.db2");
- LoadDB2(availableDb2Locales, bad_db2_files, _stores, sSpellReagentsStore, db2Path, "SpellReagents.db2");
- LoadDB2(availableDb2Locales, bad_db2_files, _stores, sSpellRuneCostStore, db2Path, "SpellRuneCost.db2");
- LoadDB2(availableDb2Locales, bad_db2_files, _stores, sSpellTotemsStore, db2Path, "SpellTotems.db2");
- LoadDB2(availableDb2Locales, bad_db2_files, _stores, sTaxiNodesStore, db2Path, "TaxiNodes.db2");
- LoadDB2(availableDb2Locales, bad_db2_files, _stores, sTaxiPathStore, db2Path, "TaxiPath.db2");
- LoadDB2(availableDb2Locales, bad_db2_files, _stores, sTaxiPathNodeStore, db2Path, "TaxiPathNode.db2");
+ LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sBroadcastTextStore, db2Path, "BroadcastText.db2");
+ LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sCurvePointStore, db2Path, "CurvePoint.db2");
+ LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sHolidaysStore, db2Path, "Holidays.db2");
+ LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sItemAppearanceStore, db2Path, "ItemAppearance.db2");
+ LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sItemBonusStore, db2Path, "ItemBonus.db2");
+ LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sItemBonusTreeNodeStore, db2Path, "ItemBonusTreeNode.db2");
+ LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sItemCurrencyCostStore, db2Path, "ItemCurrencyCost.db2");
+ LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sItemEffectStore, db2Path, "ItemEffect.db2");
+ LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sItemExtendedCostStore, db2Path, "ItemExtendedCost.db2");
+ LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sItemModifiedAppearanceStore, db2Path, "ItemModifiedAppearance.db2");
+ LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sItemSparseStore, db2Path, "Item-sparse.db2");
+ LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sItemStore, db2Path, "Item.db2");
+ LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sItemXBonusTreeStore, db2Path, "ItemXBonusTree.db2");
+ LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sKeyChainStore, db2Path, "KeyChain.db2");
+ LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sMountStore, db2Path, "Mount.db2");
+ LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sOverrideSpellDataStore, db2Path, "OverrideSpellData.db2");
+ LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sPhaseGroupStore, db2Path, "PhaseXPhaseGroup.db2");
+ LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sSpellAuraRestrictionsStore, db2Path, "SpellAuraRestrictions.db2");
+ LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sSpellCastingRequirementsStore, db2Path, "SpellCastingRequirements.db2");
+ LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sSpellClassOptionsStore, db2Path, "SpellClassOptions.db2");
+ LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sSpellLearnSpellStore, db2Path, "SpellLearnSpell.db2");
+ LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sSpellMiscStore, db2Path, "SpellMisc.db2");
+ LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sSpellPowerStore, db2Path, "SpellPower.db2");
+ LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sSpellReagentsStore, db2Path, "SpellReagents.db2");
+ LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sSpellRuneCostStore, db2Path, "SpellRuneCost.db2");
+ LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sSpellTotemsStore, db2Path, "SpellTotems.db2");
+ LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sTaxiNodesStore, db2Path, "TaxiNodes.db2");
+ LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sTaxiPathNodeStore, db2Path, "TaxiPathNode.db2");
+ LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sTaxiPathStore, db2Path, "TaxiPath.db2");
for (uint32 i = 0; i < sItemBonusStore.GetNumRows(); ++i)
if (ItemBonusEntry const* bonus = sItemBonusStore.LookupEntry(i))
@@ -209,6 +211,7 @@ void DB2Manager::LoadStores(std::string const& dataPath)
for (uint32 i = 1; i < sTaxiPathStore.GetNumRows(); ++i)
if (TaxiPathEntry const* entry = sTaxiPathStore.LookupEntry(i))
sTaxiPathSetBySource[entry->From][entry->To] = TaxiPathBySourceAndDestination(entry->ID, entry->Cost);
+
uint32 pathCount = sTaxiPathStore.GetNumRows();
// Calculate path nodes count
@@ -317,7 +320,7 @@ void DB2Manager::LoadStores(std::string const& dataPath)
exit(1);
}
- TC_LOG_INFO("misc", ">> Initialized %d DB2 data stores.", DB2FilesCount);
+ TC_LOG_INFO("server.loading", ">> Initialized %d DB2 data stores in %u ms", DB2FilesCount, GetMSTimeDiffToNow(oldMSTime));
}
DB2StorageBase const* DB2Manager::GetStorage(uint32 type) const
@@ -333,7 +336,7 @@ void DB2Manager::LoadHotfixData()
{
uint32 oldMSTime = getMSTime();
- QueryResult result = HotfixDatabase.Query("SELECT TableHash, RecordID, `Timestamp` FROM hotfix_data");
+ QueryResult result = HotfixDatabase.Query("SELECT TableHash, RecordID, `Timestamp`, Deleted FROM hotfix_data");
if (!result)
{
@@ -355,6 +358,13 @@ void DB2Manager::LoadHotfixData()
info.Timestamp = fields[2].GetUInt32();
_hotfixData.push_back(info);
+ if (fields[3].GetBool())
+ {
+ auto itr = _stores.find(info.TableHash);
+ if (itr != _stores.end())
+ itr->second->EraseRecord(info.Entry);
+ }
+
++count;
} while (result->NextRow());
@@ -407,21 +417,13 @@ uint32 DB2Manager::GetHeirloomItemLevel(uint32 curveId, uint32 level) const
return uint32(previousItr->second->Y); // Lowest scaling point
}
-uint32 DB2Manager::GetItemDisplayId(uint32 itemId, uint32 appearanceModId) const
+DB2Manager::ItemBonusList DB2Manager::GetItemBonusList(uint32 bonusListId) const
{
- auto itr = _itemDisplayIDs.find(itemId | (appearanceModId << 24));
- if (itr != _itemDisplayIDs.end())
+ auto itr = _itemBonusLists.find(bonusListId);
+ if (itr != _itemBonusLists.end())
return itr->second;
- // Fall back to unmodified appearance
- if (appearanceModId)
- {
- itr = _itemDisplayIDs.find(itemId);
- if (itr != _itemDisplayIDs.end())
- return itr->second;
- }
-
- return 0;
+ return ItemBonusList();
}
std::set<uint32> DB2Manager::GetItemBonusTree(uint32 itemId, uint32 itemBonusTreeMod) const
@@ -445,13 +447,21 @@ std::set<uint32> DB2Manager::GetItemBonusTree(uint32 itemId, uint32 itemBonusTre
return bonusListIDs;
}
-DB2Manager::ItemBonusList DB2Manager::GetItemBonusList(uint32 bonusListId) const
+uint32 DB2Manager::GetItemDisplayId(uint32 itemId, uint32 appearanceModId) const
{
- auto itr = _itemBonusLists.find(bonusListId);
- if (itr != _itemBonusLists.end())
+ auto itr = _itemDisplayIDs.find(itemId | (appearanceModId << 24));
+ if (itr != _itemDisplayIDs.end())
return itr->second;
- return ItemBonusList();
+ // Fall back to unmodified appearance
+ if (appearanceModId)
+ {
+ itr = _itemDisplayIDs.find(itemId);
+ if (itr != _itemDisplayIDs.end())
+ return itr->second;
+ }
+
+ return 0;
}
MountEntry const* DB2Manager::GetMount(uint32 spellId) const
diff --git a/src/server/game/DataStores/DB2Stores.h b/src/server/game/DataStores/DB2Stores.h
index f43dd2098f2..70152d67299 100644
--- a/src/server/game/DataStores/DB2Stores.h
+++ b/src/server/game/DataStores/DB2Stores.h
@@ -22,36 +22,34 @@
#include "DB2Structure.h"
#include "SharedDefines.h"
-extern DB2Storage<BroadcastTextEntry> sBroadcastTextStore;
-extern DB2Storage<HolidaysEntry> sHolidaysStore;
-extern DB2Storage<ItemEntry> sItemStore;
-extern DB2Storage<ItemCurrencyCostEntry> sItemCurrencyCostStore;
-extern DB2Storage<ItemExtendedCostEntry> sItemExtendedCostStore;
-extern DB2Storage<ItemEffectEntry> sItemEffectStore;
-extern DB2Storage<ItemSparseEntry> sItemSparseStore;
-extern DB2Storage<KeyChainEntry> sKeyChainStore;
-extern DB2Storage<OverrideSpellDataEntry> sOverrideSpellDataStore;
-extern DB2Storage<PhaseGroupEntry> sPhaseGroupStore;
-extern DB2Storage<SpellAuraRestrictionsEntry> sSpellAuraRestrictionsStore;
+extern DB2Storage<BroadcastTextEntry> sBroadcastTextStore;
+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<PhaseGroupEntry> sPhaseGroupStore;
+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 SpellPowerBySpellIDMap sSpellPowerBySpellIDStore;
-extern DB2Storage<SpellReagentsEntry> sSpellReagentsStore;
-extern DB2Storage<SpellRuneCostEntry> sSpellRuneCostStore;
-extern DB2Storage<SpellTotemsEntry> sSpellTotemsStore;
-extern DB2Storage<TaxiNodesEntry> sTaxiNodesStore;
-extern DB2Storage<TaxiPathEntry> sTaxiPathStore;
-extern DB2Storage<TaxiPathNodeEntry> sTaxiPathNodeStore;
-extern TaxiMask sTaxiNodesMask;
-extern TaxiMask sOldContinentsNodesMask;
-extern TaxiMask sHordeTaxiNodesMask;
-extern TaxiMask sAllianceTaxiNodesMask;
-extern TaxiMask sDeathKnightTaxiNodesMask;
-extern TaxiPathSetBySource sTaxiPathSetBySource;
-extern TaxiPathNodesByPath sTaxiPathNodesByPath;
+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;
struct HotfixNotify
{
@@ -67,10 +65,10 @@ class DB2Manager
public:
typedef std::map<uint32 /*hash*/, DB2StorageBase*> StorageMap;
typedef std::map<uint32 /*curveID*/, std::map<uint32/*index*/, CurvePointEntry const*, std::greater<uint32>>> HeirloomCurvesContainer;
- typedef std::unordered_map<uint32 /*itemId | appearanceMod << 24*/, uint32> ItemDisplayIdContainer;
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, MountEntry const*> MountContainer;
typedef std::unordered_map<uint32, std::set<uint32>> PhaseGroupContainer;
@@ -90,9 +88,9 @@ public:
static char const* GetBroadcastTextValue(BroadcastTextEntry const* broadcastText, LocaleConstant locale = DEFAULT_LOCALE, uint8 gender = GENDER_MALE, bool forceGender = false);
uint32 GetHeirloomItemLevel(uint32 curveId, uint32 level) const;
- uint32 GetItemDisplayId(uint32 itemId, uint32 appearanceModId) const;
- std::set<uint32> GetItemBonusTree(uint32 itemId, uint32 itemBonusTreeMod) const;
ItemBonusList GetItemBonusList(uint32 bonusListId) const;
+ std::set<uint32> GetItemBonusTree(uint32 itemId, uint32 itemBonusTreeMod) const;
+ uint32 GetItemDisplayId(uint32 itemId, uint32 appearanceModId) const;
MountEntry const* GetMount(uint32 spellId) const;
std::set<uint32> GetPhasesForGroup(uint32 group) const;
@@ -101,10 +99,10 @@ private:
HotfixData _hotfixData;
HeirloomCurvesContainer _heirloomCurvePoints;
- ItemDisplayIdContainer _itemDisplayIDs;
ItemBonusListContainer _itemBonusLists;
- ItemToBonusTreeContainer _itemToBonusTree;
ItemBonusTreeContainer _itemBonusTrees;
+ ItemDisplayIdContainer _itemDisplayIDs;
+ ItemToBonusTreeContainer _itemToBonusTree;
MountContainer _mountsBySpellId;
PhaseGroupContainer _phasesByGroup;
};
diff --git a/src/server/game/DataStores/DB2Structure.h b/src/server/game/DataStores/DB2Structure.h
index 30044aed5ce..4fcbf093f2d 100644
--- a/src/server/game/DataStores/DB2Structure.h
+++ b/src/server/game/DataStores/DB2Structure.h
@@ -62,25 +62,12 @@ struct HolidaysEntry
uint32 Region; // 27
uint32 Looping; // 28
uint32 CalendarFlags[MAX_HOLIDAY_FLAGS]; // 29-38
- //uint32 HolidayNameID; // 39 HolidayNames.dbc
- //uint32 HolidayDescriptionID; // 40 HolidayDescriptions.dbc
+ 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)
-};
-
-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 Flags; // 44 (0 = Darkmoon Faire, Fishing Contest and Wotlk Launch, rest is 1)
};
struct ItemAppearanceEntry
@@ -110,7 +97,7 @@ struct ItemBonusTreeNodeEntry
struct ItemCurrencyCostEntry
{
- //uint32 ID; // 0
+ uint32 ID; // 0
uint32 ItemId; // 1
};
@@ -127,6 +114,19 @@ struct ItemEffectEntry
int32 CategoryCooldown; // 8
};
+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
+};
+
#define MAX_ITEM_EXT_COST_ITEMS 5
#define MAX_ITEM_EXT_COST_CURRENCIES 5
@@ -259,8 +259,8 @@ struct OverrideSpellDataEntry
{
uint32 ID; // 0
uint32 SpellID[MAX_OVERRIDE_SPELL]; // 1-10
- //uint32 Flags; // 11
- //char* PlayerActionbarFileDataID; // 12
+ uint32 Flags; // 11
+ uint32 PlayerActionbarFileDataID; // 12
};
struct PhaseGroupEntry
@@ -272,7 +272,7 @@ struct PhaseGroupEntry
struct SpellAuraRestrictionsEntry
{
- //uint32 ID; // 0
+ uint32 ID; // 0
uint32 CasterAuraState; // 1
uint32 TargetAuraState; // 2
uint32 ExcludeCasterAuraState; // 3
@@ -285,12 +285,12 @@ struct SpellAuraRestrictionsEntry
struct SpellCastingRequirementsEntry
{
- //uint32 ID; // 0
+ uint32 ID; // 0
uint32 FacingCasterFlags; // 1
- //uint32 MinFactionID; // 1
- //uint32 MinReputation; // 3
+ uint32 MinFactionID; // 1
+ uint32 MinReputation; // 3
uint32 RequiredAreasID; // 4
- //uint32 RequiredAuraVision; // 5
+ uint32 RequiredAuraVision; // 5
uint32 RequiresSpellFocus; // 6
};
@@ -335,7 +335,7 @@ struct SpellMiscEntry
uint32 SpellIconID; // 21
uint32 ActiveIconID; // 22
uint32 SchoolMask; // 23
- //float Unk; // 24
+ float MultistrikeSpeedMod; // 24
};
struct SpellPowerEntry
@@ -347,13 +347,14 @@ struct SpellPowerEntry
uint32 ManaCost; // 4
uint32 ManaCostPerLevel; // 5
uint32 ManaCostPerSecond; // 6
- //uint32 Unk4; // 7 (All 0 except one spell: 22570)
- //uint32 Unk5; // 8
- //uint32 Unk6; // 9
+ 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
- //uint32 Unk9; // 13
+ float HealthCostPercentage; // 13
};
#define MAX_SPELL_REAGENTS 8
@@ -363,19 +364,18 @@ struct SpellReagentsEntry
uint32 ID; // 0
int32 Reagent[MAX_SPELL_REAGENTS]; // 1-8
uint32 ReagentCount[MAX_SPELL_REAGENTS]; // 9-16
- //uint32 Unk1; // 17
- //uint32 Unk2; // 18
+ uint32 CurrencyID; // 17
+ uint32 CurrencyCount; // 18
};
struct SpellRuneCostEntry
{
uint32 ID; // 0
- uint32 RuneCost[3]; // 1-3 (0=blood, 1=frost, 2=unholy)
- //uint32 Unk; // 4 (All 0 except for 2 ids: 2510, 2748)
- uint32 RunePowerGain; // 5
+ 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; }
- bool NoRunicPowerGain() const { return RunePowerGain == 0; }
+ bool NoRuneCost() const { return RuneCost[0] == 0 && RuneCost[1] == 0 && RuneCost[2] == 0 && RuneCost[3] == 0; }
+ bool NoRunicPowerGain() const { return RunicPower == 0; }
};
#define MAX_SPELL_TOTEMS 2
@@ -383,7 +383,7 @@ struct SpellRuneCostEntry
struct SpellTotemsEntry
{
uint32 ID; // 0
- uint32 TotemCategory[MAX_SPELL_TOTEMS]; // 1
+ uint32 RequiredTotemCategoryID[MAX_SPELL_TOTEMS]; // 1
uint32 Totem[MAX_SPELL_TOTEMS]; // 2
};
@@ -396,7 +396,7 @@ struct TaxiNodesEntry
uint32 MountCreatureID[2]; // 6-7
uint32 ConditionID; // 8
uint32 Flags; // 9
- float MapOffset[2]; // 10-11
+ DBCPosition2D MapOffset; // 10-11
};
struct TaxiPathEntry
diff --git a/src/server/game/DataStores/DB2fmt.h b/src/server/game/DataStores/DB2fmt.h
index 84b69ef03b4..ba088b2cbb1 100644
--- a/src/server/game/DataStores/DB2fmt.h
+++ b/src/server/game/DataStores/DB2fmt.h
@@ -18,34 +18,34 @@
#ifndef TRINITY_DB2SFRM_H
#define TRINITY_DB2SFRM_H
-char const BroadcastTextEntryfmt[] = "nissiiiiiiiii";
-char const CurvePointEntryfmt[] = "niiff";
-char const HolidaysEntryfmt[] = "niiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiixxsiix";
-char const Itemfmt[] = "niiiiiiii";
-char const ItemAppearanceEntryfmt[] = "nii";
-char const ItemBonusEntryfmt[] = "niiiii";
-char const ItemBonusTreeNodeEntryfmt[] = "niiii";
-char const ItemCurrencyCostfmt[] = "xn";
-char const ItemExtendedCostEntryfmt[] = "niiiiiiiiiiiiiiiiiiiiiiiiiiiii";
-char const ItemEffectEntryfmt[] = "niiiiiiii";
-char const ItemModifiedAppearanceEntryfmt[] = "niiiii";
-char const ItemSparsefmt[] = "niiiiffiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiffffffffffiiifisssssiiiiiiiiiiiiiiiiiiifiiifiii";
-char const ItemXBonusTreeEntryfmt[] = "nii";
-char const KeyChainfmt[] = "nbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb";
-char const Mountfmt[] = "niiisssiii";
-char const OverrideSpellDataEntryfmt[] = "niiiiiiiiiixx";
-char const PhaseGroupEntryfmt[] = "nii";
-char const SpellAuraRestrictionsEntryfmt[] = "diiiiiiii";
-char const SpellCastingRequirementsEntryfmt[] = "dixxixi";
-char const SpellClassOptionsEntryfmt[] = "niiiiii";
-char const SpellLearnSpellEntryfmt[] = "niii";
-char const SpellMiscEntryfmt[] = "niiiiiiiiiiiiiiiiifiiiiix";
-char const SpellPowerEntryfmt[] = "niiiiiixxxffix";
-char const SpellReagentsEntryfmt[] = "niiiiiiiiiiiiiiiixx";
-char const SpellRuneCostEntryfmt[] = "niiixi";
-char const SpellTotemsEntryfmt[] = "niiii";
-char const TaxiNodesEntryfmt[] = "nifffsiiiiff";
-char const TaxiPathEntryfmt[] = "niii";
-char const TaxiPathNodeEntryfmt[] = "niiifffiiii";
+char const BroadcastTextFormat[] = "nissiiiiiiiii";
+char const CurvePointFormat[] = "niiff";
+char const HolidaysEntryFormat[] = "niiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiisiii";
+char const ItemFormat[] = "niiiiiiii";
+char const ItemAppearanceFormat[] = "nii";
+char const ItemBonusFormat[] = "niiiii";
+char const ItemBonusTreeNodeFormat[] = "niiii";
+char const ItemCurrencyCostFormat[] = "in";
+char const ItemExtendedCostFormat[] = "niiiiiiiiiiiiiiiiiiiiiiiiiiiii";
+char const ItemEffectFormat[] = "niiiiiiii";
+char const ItemModifiedAppearanceFormat[] = "niiiii";
+char const ItemSparseFormat[] = "niiiiffiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiffffffffffiiifisssssiiiiiiiiiiiiiiiiiiifiiifiii";
+char const ItemXBonusTreeFormat[] = "nii";
+char const KeyChainFormat[] = "nbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb";
+char const MountFormat[] = "niiisssiii";
+char const OverrideSpellDataFormat[] = "niiiiiiiiiiii";
+char const PhaseGroupFormat[] = "nii";
+char const SpellAuraRestrictionsFormat[] = "niiiiiiii";
+char const SpellCastingRequirementsFormat[] = "niiiiii";
+char const SpellClassOptionsFormat[] = "niiiiii";
+char const SpellLearnSpellFormat[] = "niii";
+char const SpellMiscFormat[] = "niiiiiiiiiiiiiiiiifiiiiif";
+char const SpellPowerFormat[] = "niiiiiiiiiffif";
+char const SpellReagentsFormat[] = "niiiiiiiiiiiiiiiiii";
+char const SpellRuneCostFormat[] = "niiiii";
+char const SpellTotemsFormat[] = "niiii";
+char const TaxiNodesFormat[] = "nifffsiiiiff";
+char const TaxiPathFormat[] = "niii";
+char const TaxiPathNodeFormat[] = "niiifffiiii";
#endif
diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h
index f6612fca298..7832ace476d 100644
--- a/src/server/game/DataStores/DBCfmt.h
+++ b/src/server/game/DataStores/DBCfmt.h
@@ -154,7 +154,6 @@ char const SpellRadiusfmt[] = "nxfff";
char const SpellRangefmt[] = "nffffixx";
char const SpellScalingEntryfmt[] = "niiiifiii";
char const SpellTargetRestrictionsEntryfmt[] = "niiffiiii";
-char const SpellPowerEntryfmt[] = "diiiiixf";
char const SpellInterruptsEntryfmt[] = "diiiiiii";
char const SpellEquippedItemsEntryfmt[] = "diiiii";
char const SpellAuraOptionsEntryfmt[] = "niiiiiiii";
diff --git a/src/server/game/Handlers/QueryHandler.cpp b/src/server/game/Handlers/QueryHandler.cpp
index 6883ec13aac..2addf293986 100644
--- a/src/server/game/Handlers/QueryHandler.cpp
+++ b/src/server/game/Handlers/QueryHandler.cpp
@@ -410,9 +410,8 @@ void WorldSession::HandleDBQueryBulk(WorldPackets::Query::DBQueryBulk& packet)
if (store->HasRecord(rec.RecordID))
{
response.RecordID = rec.RecordID;
- response.Locale = GetSessionDbcLocale();
response.Timestamp = sDB2Manager.GetHotfixDate(rec.RecordID, packet.TableHash);
- response.Data = store;
+ store->WriteRecord(rec.RecordID, GetSessionDbcLocale(), response.Data);
}
else
{
diff --git a/src/server/game/Movement/Waypoints/Path.h b/src/server/game/Movement/Waypoints/Path.h
index bb8abc37eb3..844089cf393 100644
--- a/src/server/game/Movement/Waypoints/Path.h
+++ b/src/server/game/Movement/Waypoints/Path.h
@@ -28,8 +28,8 @@ struct PathNode
PathNode(float _x, float _y, float _z): x(_x), y(_y), z(_z) { }
float x, y, z;
};
-template<typename PathElem, typename PathNode = PathElem>
+template<typename PathElem, typename PathNode = PathElem>
class Path
{
public:
@@ -37,7 +37,7 @@ class Path
bool empty() const { return i_nodes.empty(); }
void resize(unsigned int sz) { i_nodes.resize(sz); }
void clear() { i_nodes.clear(); }
- void erase(uint32 idx) { i_nodes.erase(i_nodes.begin()+idx); }
+ void erase(uint32 idx) { i_nodes.erase(i_nodes.begin() + idx); }
void crop(unsigned int start, unsigned int end)
{
while (start && !i_nodes.empty())
@@ -56,10 +56,10 @@ class Path
float GetTotalLength(uint32 start, uint32 end) const
{
float len = 0.0f;
- for (uint32 idx=start+1; idx < end; ++idx)
+ for (uint32 idx = start + 1; idx < end; ++idx)
{
PathNode const& node = i_nodes[idx];
- PathNode const& prev = i_nodes[idx-1];
+ PathNode const& prev = i_nodes[idx - 1];
float xd = node.x - prev.x;
float yd = node.y - prev.y;
float zd = node.z - prev.z;
@@ -76,7 +76,7 @@ class Path
if (curnode > 0)
{
- PathNode const& node = i_nodes[curnode-1];
+ PathNode const& node = i_nodes[curnode - 1];
float xd = x - node.x;
float yd = y - node.y;
float zd = z - node.z;
@@ -95,6 +95,4 @@ class Path
std::deque<PathElem> i_nodes;
};
-typedef Path<PathNode> SimplePath;
-
#endif
diff --git a/src/server/game/Server/Packets/QueryPackets.cpp b/src/server/game/Server/Packets/QueryPackets.cpp
index 83c91fc7d2a..b2c192ce1bb 100644
--- a/src/server/game/Server/Packets/QueryPackets.cpp
+++ b/src/server/game/Server/Packets/QueryPackets.cpp
@@ -267,14 +267,8 @@ WorldPacket const* WorldPackets::Query::DBReply::Write()
_worldPacket << TableHash;
_worldPacket << RecordID;
_worldPacket << Timestamp;
-
- size_t sizePos = _worldPacket.wpos();
- _worldPacket << int32(0); // size of next block
-
- if (Data)
- Data->WriteRecord(RecordID, Locale, _worldPacket);
-
- _worldPacket.put<int32>(sizePos, _worldPacket.wpos() - sizePos - sizeof(int32));
+ _worldPacket << uint32(Data.size());
+ _worldPacket.append(Data);
return &_worldPacket;
}
diff --git a/src/server/game/Server/Packets/QueryPackets.h b/src/server/game/Server/Packets/QueryPackets.h
index 97648385a50..56c8b6521bc 100644
--- a/src/server/game/Server/Packets/QueryPackets.h
+++ b/src/server/game/Server/Packets/QueryPackets.h
@@ -20,7 +20,6 @@
#include "Packet.h"
#include "Creature.h"
-#include "DB2Stores.h"
#include "NPCHandler.h"
#include "G3D/Vector3.h"
@@ -200,10 +199,7 @@ namespace WorldPackets
uint32 TableHash = 0;
uint32 Timestamp = 0;
int32 RecordID = 0;
-
- // These are not sent directly
- uint32 Locale = 0;
- DB2StorageBase const* Data = nullptr;
+ ByteBuffer Data;
};
class HotfixNotifyBlob final : public ServerPacket
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index ed7ba3b788c..44012185f11 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -4525,14 +4525,14 @@ SpellCastResult Spell::CheckRuneCost(uint32 runeCostID)
int32 runeCost[NUM_RUNE_TYPES]; // blood, frost, unholy, death
- for (uint32 i = 0; i < RUNE_DEATH; ++i)
+ for (uint32 i = 0; i < NUM_RUNE_TYPES; ++i)
{
runeCost[i] = src->RuneCost[i];
if (Player* modOwner = m_caster->GetSpellModOwner())
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_COST, runeCost[i], this);
}
- runeCost[RUNE_DEATH] = MAX_RUNES; // calculated later
+ runeCost[RUNE_DEATH] += MAX_RUNES;
for (uint32 i = 0; i < MAX_RUNES; ++i)
{
@@ -4565,15 +4565,13 @@ void Spell::TakeRunePower(bool didHit)
int32 runeCost[NUM_RUNE_TYPES]; // blood, frost, unholy, death
- for (uint32 i = 0; i < RUNE_DEATH; ++i)
+ for (uint32 i = 0; i < NUM_RUNE_TYPES; ++i)
{
runeCost[i] = runeCostData->RuneCost[i];
if (Player* modOwner = m_caster->GetSpellModOwner())
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_COST, runeCost[i], this);
}
- runeCost[RUNE_DEATH] = 0; // calculated later
-
for (uint32 i = 0; i < MAX_RUNES; ++i)
{
RuneType rune = player->GetCurrentRune(i);
@@ -4585,7 +4583,7 @@ void Spell::TakeRunePower(bool didHit)
}
}
- runeCost[RUNE_DEATH] = runeCost[RUNE_BLOOD] + runeCost[RUNE_UNHOLY] + runeCost[RUNE_FROST];
+ runeCost[RUNE_DEATH] += runeCost[RUNE_BLOOD] + runeCost[RUNE_UNHOLY] + runeCost[RUNE_FROST];
if (runeCost[RUNE_DEATH] > 0)
{
@@ -4610,7 +4608,7 @@ void Spell::TakeRunePower(bool didHit)
// you can gain some runic power when use runes
if (didHit)
- if (int32 rp = int32(runeCostData->RunePowerGain * sWorld->getRate(RATE_POWER_RUNICPOWER_INCOME)))
+ if (int32 rp = int32(runeCostData->RunicPower * sWorld->getRate(RATE_POWER_RUNICPOWER_INCOME)))
player->ModifyPower(POWER_RUNIC_POWER, int32(rp));
}
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 46b7c2f92e4..14fcef182a0 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -1114,7 +1114,7 @@ SpellInfo::SpellInfo(SpellEntry const* spellEntry, SpellEffectEntryMap const& ef
// SpellTotemsEntry
SpellTotemsEntry const* _totem = GetSpellTotems();
for (uint8 i = 0; i < 2; ++i)
- TotemCategory[i] = _totem ? _totem->TotemCategory[i] : 0;
+ TotemCategory[i] = _totem ? _totem->RequiredTotemCategoryID[i] : 0;
for (uint8 i = 0; i < 2; ++i)
Totem[i] = _totem ? _totem->Totem[i] : 0;
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp
index 0e4f430b322..236bd4cc6db 100644
--- a/src/server/game/World/World.cpp
+++ b/src/server/game/World/World.cpp
@@ -1456,6 +1456,12 @@ void World::SetInitialWorldSettings()
LoadDBCStores(m_dataPath);
sDB2Manager.LoadStores(m_dataPath);
+ TC_LOG_INFO("misc", "Loading hotfix info...");
+ sDB2Manager.LoadHotfixData();
+
+ // Close hotfix database - it is only used during DB2 loading
+ HotfixDatabase.Close();
+
sSpellMgr->LoadPetFamilySpellsStore();
TC_LOG_INFO("server.loading", "Loading SpellInfo store...");
@@ -1958,9 +1964,6 @@ void World::SetInitialWorldSettings()
LoadCharacterInfoStore();
- TC_LOG_INFO("misc", "Loading hotfix info...");
- sDB2Manager.LoadHotfixData();
-
TC_LOG_INFO("server.loading", "Loading race and class expansion requirements...");
sObjectMgr->LoadRaceAndClassExpansionRequirements();
diff --git a/src/server/shared/DataStores/DB2StorageLoader.cpp b/src/server/shared/DataStores/DB2StorageLoader.cpp
index 6878a3b9b87..67bf3008ca2 100644
--- a/src/server/shared/DataStores/DB2StorageLoader.cpp
+++ b/src/server/shared/DataStores/DB2StorageLoader.cpp
@@ -169,14 +169,14 @@ bool DB2FileLoader::Load(const char *filename, const char *fmt)
for (uint32 i = 1; i < fieldCount; i++)
{
fieldsOffset[i] = fieldsOffset[i - 1];
- if (fmt[i - 1] == 'b' || fmt[i - 1] == 'X')
+ if (fmt[i - 1] == 'b')
fieldsOffset[i] += 1;
else
fieldsOffset[i] += 4;
}
- data = new unsigned char[recordSize*recordCount+stringSize];
- stringTable = data + recordSize*recordCount;
+ data = new unsigned char[recordSize * recordCount + stringSize];
+ stringTable = data + recordSize * recordCount;
if (fread(data, recordSize * recordCount + stringSize, 1, f) != 1)
{
@@ -368,10 +368,6 @@ char* DB2FileLoader::AutoProduceStringsArrayHolders(const char* format, char* da
offset += sizeof(char*);
break;
}
- case FT_NA:
- case FT_NA_BYTE:
- case FT_SORT:
- break;
default:
ASSERT(false, "unknown format character %c", format[x]);
}
@@ -434,7 +430,7 @@ char* DB2DatabaseLoader::Load(const char* format, int32 preparedStatement, uint3
return nullptr;
uint32 const fieldCount = strlen(format);
- if (fieldCount + 1 /*VerifiedBuild*/ != result->GetFieldCount())
+ if (fieldCount != result->GetFieldCount())
return nullptr;
// get struct size and index pos
@@ -569,7 +565,9 @@ char* DB2DatabaseLoader::Load(const char* format, int32 preparedStatement, uint3
void DB2DatabaseLoader::LoadStrings(const char* format, int32 preparedStatement, uint32 locale, char**& indexTable, std::list<char*>& stringPool)
{
- PreparedQueryResult result = HotfixDatabase.Query(HotfixDatabase.GetPreparedStatement(preparedStatement));
+ PreparedStatement* stmt = HotfixDatabase.GetPreparedStatement(preparedStatement);
+ stmt->setString(0, localeNames[locale]);
+ PreparedQueryResult result = HotfixDatabase.Query(stmt);
if (!result)
return;
diff --git a/src/server/shared/DataStores/DB2Store.h b/src/server/shared/DataStores/DB2Store.h
index 48c9ed3c12a..c45a25689cc 100644
--- a/src/server/shared/DataStores/DB2Store.h
+++ b/src/server/shared/DataStores/DB2Store.h
@@ -28,142 +28,125 @@ class DB2StorageBase
public:
virtual ~DB2StorageBase() { }
- uint32 GetHash() const { return tableHash; }
+ uint32 GetHash() const { return _tableHash; }
virtual bool HasRecord(uint32 id) const = 0;
virtual void WriteRecord(uint32 id, uint32 locale, ByteBuffer& buffer) const = 0;
+ virtual void EraseRecord(uint32 id) = 0;
+
protected:
- uint32 tableHash;
+ uint32 _tableHash;
};
template<class T>
-class DB2Storage;
-
-template<class T>
-bool DB2StorageHasEntry(DB2Storage<T> const& store, uint32 id)
-{
- return store.LookupEntry(id) != NULL;
-}
-
-template<class T>
-void WriteDB2RecordToPacket(DB2Storage<T> const& store, uint32 id, uint32 locale, ByteBuffer& buffer)
-{
- uint8 const* entry = (uint8 const*)store.LookupEntry(id);
- ASSERT(entry);
-
- std::string format = store.GetFormat();
- for (uint32 i = 0; i < format.length(); ++i)
- {
- switch (format[i])
- {
- case FT_IND:
- case FT_INT:
- buffer << *(uint32*)entry;
- entry += 4;
- break;
- case FT_FLOAT:
- buffer << *(float*)entry;
- entry += 4;
- break;
- case FT_BYTE:
- buffer << *(uint8*)entry;
- entry += 1;
- break;
- case FT_STRING:
- {
- LocalizedString* locStr = *(LocalizedString**)entry;
- if (locStr->Str[locale][0] == '\0')
- locale = 0;
-
- char const* str = locStr->Str[locale];
- size_t len = strlen(str);
- buffer << uint16(len);
- buffer.WriteString(str, len);
- entry += sizeof(char*);
- break;
- }
- case FT_NA:
- case FT_SORT:
- buffer << uint32(0);
- break;
- case FT_NA_BYTE:
- buffer << uint8(0);
- break;
- }
- }
-}
-
-template<class T>
class DB2Storage : public DB2StorageBase
{
typedef std::list<char*> StringPoolList;
- typedef bool(*EntryChecker)(DB2Storage<T> const&, uint32);
- typedef void(*PacketWriter)(DB2Storage<T> const&, uint32, uint32, ByteBuffer&);
public:
- DB2Storage(char const* f, int32 preparedStmtIndex = -1, EntryChecker checkEntry = nullptr, PacketWriter writePacket = nullptr)
- : nCount(0), fieldCount(0), fmt(f), m_dataTable(nullptr), m_dataTableEx(nullptr), _hotfixStatement(preparedStmtIndex)
+ DB2Storage(char const* f, int32 preparedStmtIndex = -1)
+ : _indexTableSize(0), _fieldCount(0), _format(f), _dataTable(nullptr), _dataTableEx(nullptr), _hotfixStatement(preparedStmtIndex)
{
- indexTable.asT = NULL;
- CheckEntry = checkEntry ? checkEntry : (EntryChecker)&DB2StorageHasEntry<T>;
- WritePacket = writePacket ? writePacket : (PacketWriter)&WriteDB2RecordToPacket<T>;
+ _indexTable.AsT = NULL;
}
~DB2Storage() { Clear(); }
- bool HasRecord(uint32 id) const { return CheckEntry(*this, id); }
- T const* LookupEntry(uint32 id) const { return (id >= nCount) ? NULL : indexTable.asT[id]; }
- uint32 GetNumRows() const { return nCount; }
- char const* GetFormat() const { return fmt; }
- uint32 GetFieldCount() const { return fieldCount; }
- void WriteRecord(uint32 id, uint32 locale, ByteBuffer& buffer) const
+ bool HasRecord(uint32 id) const override { return id < _indexTableSize && _indexTable.AsT[id] != nullptr; }
+ void WriteRecord(uint32 id, uint32 locale, ByteBuffer& buffer) const override
{
- WritePacket(*this, id, locale, buffer);
+ ASSERT(id < _indexTableSize);
+ char const* entry = _indexTable.AsChar[id];
+ ASSERT(entry);
+
+ std::size_t fields = strlen(_format);
+ for (uint32 i = 0; i < fields; ++i)
+ {
+ switch (_format[i])
+ {
+ case FT_IND:
+ case FT_INT:
+ buffer << *(uint32*)entry;
+ entry += 4;
+ break;
+ case FT_FLOAT:
+ buffer << *(float*)entry;
+ entry += 4;
+ break;
+ case FT_BYTE:
+ buffer << *(uint8*)entry;
+ entry += 1;
+ break;
+ case FT_STRING:
+ {
+ LocalizedString* locStr = *(LocalizedString**)entry;
+ if (locStr->Str[locale][0] == '\0')
+ locale = 0;
+
+ char const* str = locStr->Str[locale];
+ std::size_t len = strlen(str);
+ buffer << uint16(len ? len + 1 : 0);
+ if (len)
+ {
+ buffer.append(str, len);
+ buffer << uint8(0);
+ }
+ entry += sizeof(LocalizedString*);
+ break;
+ }
+ }
+ }
}
+ void EraseRecord(uint32 id) override { if (id < _indexTableSize) _indexTable.AsT[id] = nullptr; }
+
+ T const* LookupEntry(uint32 id) const { return (id >= _indexTableSize) ? nullptr : _indexTable.AsT[id]; }
+ uint32 GetNumRows() const { return _indexTableSize; }
+ char const* GetFormat() const { return _format; }
+ uint32 GetFieldCount() const { return _fieldCount; }
bool Load(char const* fn, uint32 locale)
{
DB2FileLoader db2;
// Check if load was successful, only then continue
- if (!db2.Load(fn, fmt))
+ if (!db2.Load(fn, _format))
return false;
- fieldCount = db2.GetCols();
- tableHash = db2.GetHash();
+ _fieldCount = db2.GetCols();
+ _tableHash = db2.GetHash();
// load raw non-string data
- m_dataTable = reinterpret_cast<T*>(db2.AutoProduceData(fmt, nCount, indexTable.asChar));
+ _dataTable = reinterpret_cast<T*>(db2.AutoProduceData(_format, _indexTableSize, _indexTable.AsChar));
// create string holders for loaded string fields
- if (char* stringHolders = db2.AutoProduceStringsArrayHolders(fmt, (char*)m_dataTable))
+ if (char* stringHolders = db2.AutoProduceStringsArrayHolders(_format, (char*)_dataTable))
{
- m_stringPoolList.push_back(stringHolders);
+ _stringPoolList.push_back(stringHolders);
// load strings from db2 data
- if (char* stringBlock = db2.AutoProduceStrings(fmt, (char*)m_dataTable, locale))
- m_stringPoolList.push_back(stringBlock);
+ if (char* stringBlock = db2.AutoProduceStrings(_format, (char*)_dataTable, locale))
+ _stringPoolList.push_back(stringBlock);
}
// error in db2 file at loading if NULL
- return indexTable.asT != NULL;
+ return _indexTable.AsT != NULL;
}
bool LoadStringsFrom(char const* fn, uint32 locale)
{
// DB2 must be already loaded using Load
- if (!indexTable.asT)
+ if (!_indexTable.AsT)
return false;
DB2FileLoader db2;
// Check if load was successful, only then continue
- if (!db2.Load(fn, fmt))
+ if (!db2.Load(fn, _format))
return false;
// load strings from another locale db2 data
- if (DB2FileLoader::GetFormatStringFieldCount(fmt))
- if (char* stringBlock = db2.AutoProduceStrings(fmt, (char*)m_dataTable, locale))
- m_stringPoolList.push_back(stringBlock);
+ if (DB2FileLoader::GetFormatStringFieldCount(_format))
+ if (char* stringBlock = db2.AutoProduceStrings(_format, (char*)_dataTable, locale))
+ _stringPoolList.push_back(stringBlock);
return true;
}
@@ -173,11 +156,11 @@ public:
return;
char* extraStringHolders = nullptr;
- if (char* dataTable = DB2DatabaseLoader().Load(fmt, _hotfixStatement, nCount, indexTable.asChar, extraStringHolders, m_stringPoolList))
- m_dataTableEx = reinterpret_cast<T*>(dataTable);
+ if (char* dataTable = DB2DatabaseLoader().Load(_format, _hotfixStatement, _indexTableSize, _indexTable.AsChar, extraStringHolders, _stringPoolList))
+ _dataTableEx = reinterpret_cast<T*>(dataTable);
if (extraStringHolders)
- m_stringPoolList.push_back(extraStringHolders);
+ _stringPoolList.push_back(extraStringHolders);
}
void LoadStringsFromDB(uint32 locale)
@@ -185,50 +168,47 @@ public:
if (_hotfixStatement == -1)
return;
- if (!DB2FileLoader::GetFormatStringFieldCount(fmt))
+ if (!DB2FileLoader::GetFormatStringFieldCount(_format))
return;
- DB2DatabaseLoader().LoadStrings(fmt, _hotfixStatement + locale, locale, indexTable.asChar, m_stringPoolList);
+ DB2DatabaseLoader().LoadStrings(_format, _hotfixStatement + 1, locale, _indexTable.AsChar, _stringPoolList);
}
void Clear()
{
- if (!indexTable.asT)
+ if (!_indexTable.AsT)
return;
- delete[] reinterpret_cast<char*>(indexTable.asT);
- indexTable.asT = nullptr;
+ delete[] reinterpret_cast<char*>(_indexTable.AsT);
+ _indexTable.AsT = nullptr;
- delete[] reinterpret_cast<char*>(m_dataTable);
- m_dataTable = nullptr;
+ delete[] reinterpret_cast<char*>(_dataTable);
+ _dataTable = nullptr;
- delete[] reinterpret_cast<char*>(m_dataTableEx);
- m_dataTableEx = nullptr;
+ delete[] reinterpret_cast<char*>(_dataTableEx);
+ _dataTableEx = nullptr;
- while (!m_stringPoolList.empty())
+ while (!_stringPoolList.empty())
{
- delete[] m_stringPoolList.front();
- m_stringPoolList.pop_front();
+ delete[] _stringPoolList.front();
+ _stringPoolList.pop_front();
}
- nCount = 0;
+ _indexTableSize = 0;
}
- EntryChecker CheckEntry;
- PacketWriter WritePacket;
-
private:
- uint32 nCount;
- uint32 fieldCount;
- char const* fmt;
+ uint32 _indexTableSize;
+ uint32 _fieldCount;
+ char const* _format;
union
{
- T** asT;
- char** asChar;
- } indexTable;
- T* m_dataTable;
- T* m_dataTableEx;
- StringPoolList m_stringPoolList;
+ T** AsT;
+ char** AsChar;
+ } _indexTable;
+ T* _dataTable;
+ T* _dataTableEx;
+ StringPoolList _stringPoolList;
int32 _hotfixStatement;
};
diff --git a/src/server/shared/Database/Implementation/HotfixDatabase.cpp b/src/server/shared/Database/Implementation/HotfixDatabase.cpp
index 2003433ec40..559ddd18b1e 100644
--- a/src/server/shared/Database/Implementation/HotfixDatabase.cpp
+++ b/src/server/shared/Database/Implementation/HotfixDatabase.cpp
@@ -16,31 +16,11 @@
*/
#include "HotfixDatabase.h"
-#include "Util.h"
-
-/*
- Hotfix database statements are constructed in a special way
- Each db2 storage that contains localized string data
- must declare a prepared statement for each locale in the same order as
- locales are defined (enforced during compilation)
-
- '@' character is replaced with locale index for PrepareStatement call
-*/
// Force locale statments to appear exactly in locale declaration order, right after normal data fetch statement
-#define PREPARE_LOCALE_STMT(stmtBase, loc, sql, con) \
- static_assert(stmtBase + loc == stmtBase##_##loc, "Invalid prepared statement index for " STRINGIZE(stmtBase##_##loc)); \
- PrepareLocaleStatement(stmtBase##_##loc, loc, sql, con);
-
-#define PREPARE_LOCALE_STMTS(stmtBase, sql, con) \
- PREPARE_LOCALE_STMT(stmtBase, LOCALE_koKR, sql, con) \
- PREPARE_LOCALE_STMT(stmtBase, LOCALE_frFR, sql, con) \
- PREPARE_LOCALE_STMT(stmtBase, LOCALE_deDE, sql, con) \
- PREPARE_LOCALE_STMT(stmtBase, LOCALE_zhCN, sql, con) \
- PREPARE_LOCALE_STMT(stmtBase, LOCALE_zhTW, sql, con) \
- PREPARE_LOCALE_STMT(stmtBase, LOCALE_esES, sql, con) \
- PREPARE_LOCALE_STMT(stmtBase, LOCALE_esMX, sql, con) \
- PREPARE_LOCALE_STMT(stmtBase, LOCALE_ruRU, sql, con)
+#define PREPARE_LOCALE_STMT(stmtBase, sql, con) \
+ static_assert(stmtBase + 1 == stmtBase##_LOCALE, "Invalid prepared statement index for " #stmtBase "_LOCALE"); \
+ PrepareStatement(stmtBase##_LOCALE, sql, con);
void HotfixDatabaseConnection::DoPrepareStatements()
{
@@ -48,20 +28,132 @@ void HotfixDatabaseConnection::DoPrepareStatements()
m_stmts.resize(MAX_HOTFIXDATABASE_STATEMENTS);
// BroadcastText.db2
- PrepareStatement(HOTFIX_SEL_BROADCAST_TEXT, "SELECT * FROM broadcast_text ORDER BY ID DESC", CONNECTION_SYNCH);
- PREPARE_LOCALE_STMTS(HOTFIX_SEL_BROADCAST_TEXT, "SELECT ID, MaleText_loc@, FemaleText_loc@ FROM locales_broadcast_text", 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);
- // TaxiPathNode.db2
- PrepareStatement(HOTFIX_SEL_TAXI_PATH_NODE, "SELECT * FROM taxi_path_node ORDER BY ID DESC", CONNECTION_SYNCH);
-}
+ // CurvePoint.db2
+ PrepareStatement(HOTFIX_SEL_CURVE_POINT, "SELECT ID, CurveID, `Index`, X, Y FROM curve_point ORDER BY ID DESC", CONNECTION_SYNCH);
-void HotfixDatabaseConnection::PrepareLocaleStatement(uint32 index, uint32 localeIndex, const char* sql, ConnectionFlags flags)
-{
- Tokenizer tokens(sql, '@');
- std::ostringstream stmt;
- stmt << tokens[0];
- for (std::size_t i = 1; i < tokens.size(); ++i)
- stmt << localeIndex << tokens[i];
+ // 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);
+ PREPARE_LOCALE_STMT(HOTFIX_SEL_HOLIDAYS, "SELECT ID, TextureFilename_lang FROM holidays_locale WHERE locale = ?", CONNECTION_SYNCH);
+
+ // ItemAppearance.db2
+ PrepareStatement(HOTFIX_SEL_ITEM_APPEARANCE, "SELECT ID, DisplayID, IconFileDataID FROM item_appearance ORDER BY ID DESC", CONNECTION_SYNCH);
+
+ // ItemBonus.db2
+ 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);
+
+ // ItemCurrencyCost.db2
+ PrepareStatement(HOTFIX_SEL_ITEM_CURRENCY_COST, "SELECT ID, ItemID FROM item_currency_cost ORDER BY ItemID 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);
+
+ // Item.db2
+ 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, RequiredHonorPoints, RequiredArenaPoints, 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 FROM item_extended_cost ORDER BY ID DESC", 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);
+
+ // Item-sparse.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, "
+ "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);
+
+ // ItemXBonusTree.db2
+ PrepareStatement(HOTFIX_SEL_ITEM_X_BONUS_TREE, "SELECT ID, ItemID, BonusTreeID FROM item_x_bonus_tree ORDER BY ID DESC", CONNECTION_SYNCH);
- PrepareStatement(index, stmt.str().c_str(), flags);
+ // 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);
+
+ // 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);
+
+ // 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);
+
+ // PhaseGroup.db2
+ PrepareStatement(HOTFIX_SEL_PHASE_GROUP, "SELECT ID, PhaseID, PhaseGroupID FROM phase_group ORDER BY ID DESC", 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);
+
+ // 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);
+
+ // 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);
+
+ // 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);
+
+ 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);
+
+ // 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);
+
+ // 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);
+
+ // SpellTotems.db2
+ PrepareStatement(HOTFIX_SEL_SPELL_TOTEMS, "SELECT ID, RequiredTotemCategoryID1, RequiredTotemCategoryID2, Totem1, Totem2 FROM spell_totems ORDER BY ID DESC", CONNECTION_SYNCH);
+
+ // TaxiNodes.db2
+ PrepareStatement(HOTFIX_SEL_TAXI_NODES, "SELECT ID, MapID, PosX, PosY, PosZ, Name, MountCreatureID1, MountCreatureID2, ConditionID, "
+ "Flags, MapOffsetX, MapOffsetY FROM taxi_nodes ORDER BY ID DESC", CONNECTION_SYNCH);
+ PREPARE_LOCALE_STMT(HOTFIX_SEL_TAXI_NODES, "SELECT ID, Name_lang FROM taxi_nodes_locale WHERE locale = ?", CONNECTION_SYNCH);
+
+ // TaxiPath.db2
+ 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);
}
diff --git a/src/server/shared/Database/Implementation/HotfixDatabase.h b/src/server/shared/Database/Implementation/HotfixDatabase.h
index 37234277838..5ea7cc481aa 100644
--- a/src/server/shared/Database/Implementation/HotfixDatabase.h
+++ b/src/server/shared/Database/Implementation/HotfixDatabase.h
@@ -30,9 +30,6 @@ class HotfixDatabaseConnection : public MySQLConnection
//- Loads database type specific prepared statements
void DoPrepareStatements() override;
-
- private:
- void PrepareLocaleStatement(uint32 index, uint32 localeIndex, const char* sql, ConnectionFlags flags);
};
typedef DatabaseWorkerPool<HotfixDatabaseConnection> HotfixDatabaseWorkerPool;
@@ -43,21 +40,71 @@ enum HotfixDatabaseStatements
{DB}_{SEL/INS/UPD/DEL/REP}_{Summary of data changed}
When updating more than one field, consider looking at the calling function
name for a suiting suffix.
-
- DB2 locale loading statements must have the name of base statement with locale enum value name suffix
*/
HOTFIX_SEL_BROADCAST_TEXT,
- HOTFIX_SEL_BROADCAST_TEXT_LOCALE_koKR,
- HOTFIX_SEL_BROADCAST_TEXT_LOCALE_frFR,
- HOTFIX_SEL_BROADCAST_TEXT_LOCALE_deDE,
- HOTFIX_SEL_BROADCAST_TEXT_LOCALE_zhCN,
- HOTFIX_SEL_BROADCAST_TEXT_LOCALE_zhTW,
- HOTFIX_SEL_BROADCAST_TEXT_LOCALE_esES,
- HOTFIX_SEL_BROADCAST_TEXT_LOCALE_esMX,
- HOTFIX_SEL_BROADCAST_TEXT_LOCALE_ruRU,
+ HOTFIX_SEL_BROADCAST_TEXT_LOCALE,
+
+ HOTFIX_SEL_CURVE_POINT,
+
+ HOTFIX_SEL_HOLIDAYS,
+ HOTFIX_SEL_HOLIDAYS_LOCALE,
+
+ HOTFIX_SEL_ITEM_APPEARANCE,
+
+ HOTFIX_SEL_ITEM_BONUS,
+
+ HOTFIX_SEL_ITEM_BONUS_TREE_NODE,
+
+ HOTFIX_SEL_ITEM_CURRENCY_COST,
+
+ HOTFIX_SEL_ITEM_EFFECT,
+
+ HOTFIX_SEL_ITEM,
+
+ HOTFIX_SEL_ITEM_EXTENDED_COST,
+
+ HOTFIX_SEL_ITEM_MODIFIED_APPEARANCE,
+
+ HOTFIX_SEL_ITEM_SPARSE,
+ HOTFIX_SEL_ITEM_SPARSE_LOCALE,
+
+ HOTFIX_SEL_ITEM_X_BONUS_TREE,
+
+ HOTFIX_SEL_KEY_CHAIN,
+
+ HOTFIX_SEL_MOUNT,
+ HOTFIX_SEL_MOUNT_LOCALE,
+
+ HOTFIX_SEL_OVERRIDE_SPELL_DATA,
+
+ HOTFIX_SEL_PHASE_GROUP,
+
+ HOTFIX_SEL_SPELL_AURA_RESTRICTIONS,
+
+ HOTFIX_SEL_SPELL_CASTING_REQUIREMENTS,
+
+ HOTFIX_SEL_SPELL_CLASS_OPTIONS,
+
+ HOTFIX_SEL_SPELL_LEARN_SPELL,
+
+ HOTFIX_SEL_SPELL_MISC,
+
+ HOTFIX_SEL_SPELL_POWER,
+
+ HOTFIX_SEL_SPELL_REAGENTS,
+
+ HOTFIX_SEL_SPELL_RUNE_COST,
+
+ HOTFIX_SEL_SPELL_TOTEMS,
+
+ HOTFIX_SEL_TAXI_NODES,
+ HOTFIX_SEL_TAXI_NODES_LOCALE,
+
+ HOTFIX_SEL_TAXI_PATH,
HOTFIX_SEL_TAXI_PATH_NODE,
+
MAX_HOTFIXDATABASE_STATEMENTS
};