ExteriorComponent db2 load fix
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
DROP TABLE IF EXISTS `exterior_component`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `exterior_component` (
|
||||
`Name` text,
|
||||
`Position1` float NOT NULL DEFAULT '0',
|
||||
`Position2` float NOT NULL DEFAULT '0',
|
||||
`Position3` float NOT NULL DEFAULT '0',
|
||||
`ID` int unsigned NOT NULL DEFAULT '0',
|
||||
`Size` tinyint unsigned NOT NULL DEFAULT '0',
|
||||
`HouseExteriorWmoDataID` int NOT NULL DEFAULT '0',
|
||||
`ParentComponentID` int NOT NULL DEFAULT '0',
|
||||
`ModelFileDataID` int NOT NULL DEFAULT '0',
|
||||
`Flags` int NOT NULL DEFAULT '0',
|
||||
`Field_12_0_0_63534_007` tinyint unsigned NOT NULL DEFAULT '0',
|
||||
`Type` tinyint unsigned NOT NULL DEFAULT '0',
|
||||
`Field_12_0_0_63534_009` int NOT NULL DEFAULT '0',
|
||||
`GameObjectID` int NOT NULL DEFAULT '0',
|
||||
`Field_11_2_7_64044_011` int NOT NULL DEFAULT '0',
|
||||
`ItemID` int NOT NULL DEFAULT '0',
|
||||
`VerifiedBuild` int NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`ID`,`VerifiedBuild`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `exterior_component`
|
||||
--
|
||||
|
||||
LOCK TABLES `exterior_component` WRITE;
|
||||
/*!40000 ALTER TABLE `exterior_component` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `exterior_component` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `exterior_component_locale`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `exterior_component_locale`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `exterior_component_locale` (
|
||||
`ID` int unsigned NOT NULL DEFAULT '0',
|
||||
`locale` varchar(4) NOT NULL,
|
||||
`Name_lang` text,
|
||||
`VerifiedBuild` int NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`ID`,`locale`,`VerifiedBuild`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
|
||||
/*!50500 PARTITION BY LIST COLUMNS(locale)
|
||||
(PARTITION deDE VALUES IN ('deDE') ENGINE = InnoDB,
|
||||
PARTITION esES VALUES IN ('esES') ENGINE = InnoDB,
|
||||
PARTITION esMX VALUES IN ('esMX') ENGINE = InnoDB,
|
||||
PARTITION frFR VALUES IN ('frFR') ENGINE = InnoDB,
|
||||
PARTITION itIT VALUES IN ('itIT') ENGINE = InnoDB,
|
||||
PARTITION koKR VALUES IN ('koKR') ENGINE = InnoDB,
|
||||
PARTITION ptBR VALUES IN ('ptBR') ENGINE = InnoDB,
|
||||
PARTITION ruRU VALUES IN ('ruRU') ENGINE = InnoDB,
|
||||
PARTITION zhCN VALUES IN ('zhCN') ENGINE = InnoDB,
|
||||
PARTITION zhTW VALUES IN ('zhTW') ENGINE = InnoDB) */;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `exterior_component_locale`
|
||||
--
|
||||
|
||||
LOCK TABLES `exterior_component_locale` WRITE;
|
||||
/*!40000 ALTER TABLE `exterior_component_locale` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `exterior_component_locale` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
@@ -684,18 +684,13 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
" WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_EXPECTED_STAT_MOD, "SELECT MAX(ID) + 1 FROM expected_stat_mod", CONNECTION_SYNCH);
|
||||
|
||||
// ExteriorComponent.db2 ? 12.0.5 layout (LayoutHash 0x53EA0925, 14 fields).
|
||||
// Column order matches DB2LoadInfo::ExteriorComponentLoadInfo. The previous
|
||||
// SELECT used the older WoW-build column set (FileDataID/ConditionID/HookID/
|
||||
// Slot/SortOrder/ComponentGroupID/UiTextureKitID/ExteriorComponentTypeID),
|
||||
// which mysql_stmt_prepare() rejected once the SQL schema was refreshed in
|
||||
// 2026_04_29_00_hotfixes.sql ("Unknown column 'FileDataID' in 'field list'").
|
||||
PrepareStatement(HOTFIX_SEL_EXTERIOR_COMPONENT, "SELECT Name, PositionX, PositionY, PositionZ, ID, Size, "
|
||||
"ParentComponentID, ModelFileDataID, Flags, Field_7, Type, Field_9, GameObjectID, Field_11, ItemID, "
|
||||
"HouseExteriorWmoDataID FROM exterior_component"
|
||||
" WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
// ExteriorComponent.db2
|
||||
PrepareStatement(HOTFIX_SEL_EXTERIOR_COMPONENT, "SELECT Name, Position1, Position2, Position3, ID, Size, HouseExteriorWmoDataID, "
|
||||
"ParentComponentID, ModelFileDataID, Flags, Field_12_0_0_63534_007, Type, Field_12_0_0_63534_009, GameObjectID, Field_11_2_7_64044_011, "
|
||||
"ItemID FROM exterior_component WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_EXTERIOR_COMPONENT, "SELECT MAX(ID) + 1 FROM exterior_component", CONNECTION_SYNCH);
|
||||
PREPARE_LOCALE_STMT(HOTFIX_SEL_EXTERIOR_COMPONENT, "SELECT ID, Name_lang FROM exterior_component_locale WHERE (`VerifiedBuild` > 0) = ? AND locale = ?", CONNECTION_SYNCH);
|
||||
PREPARE_LOCALE_STMT(HOTFIX_SEL_EXTERIOR_COMPONENT, "SELECT ID, Name_lang FROM exterior_component_locale WHERE (`VerifiedBuild` > 0) = ?"
|
||||
" AND locale = ?", CONNECTION_SYNCH);
|
||||
|
||||
// ExteriorComponentExitPoint.db2
|
||||
PrepareStatement(HOTFIX_SEL_EXTERIOR_COMPONENT_EXIT_POINT, "SELECT PositionX, PositionY, PositionZ, RotationX, RotationY, RotationZ, ID, "
|
||||
|
||||
@@ -2042,27 +2042,24 @@ struct ExpectedStatModLoadInfo
|
||||
|
||||
struct ExteriorComponentLoadInfo
|
||||
{
|
||||
// Field order must match metadata (IndexField=2, ID is 3rd meta field).
|
||||
// 12.0.5 added Field_12 (signed INT) ? Meta grew from 13 to 14 entries,
|
||||
// FileFieldCount 12?13, ParentIndexField 12?13, LayoutHash 0x027A2F44?0x53EA0925.
|
||||
static constexpr DB2FieldMeta Fields[16] =
|
||||
{
|
||||
{ .IsSigned = false, .Type = FT_STRING, .Name = "Name" },
|
||||
{ .IsSigned = false, .Type = FT_FLOAT, .Name = "PositionX" },
|
||||
{ .IsSigned = false, .Type = FT_FLOAT, .Name = "PositionY" },
|
||||
{ .IsSigned = false, .Type = FT_FLOAT, .Name = "PositionZ" },
|
||||
{ .IsSigned = false, .Type = FT_INT, .Name = "ID" },
|
||||
{ .IsSigned = false, .Type = FT_BYTE, .Name = "Size" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "ParentComponentID" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "ModelFileDataID" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "Flags" },
|
||||
{ .IsSigned = false, .Type = FT_BYTE, .Name = "Field_7" },
|
||||
{ .IsSigned = false, .Type = FT_BYTE, .Name = "Type" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "Field_9" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "GameObjectID" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "Field_11" },
|
||||
{ .IsSigned = true, .Type = FT_INT, .Name = "ItemID" }, // NEW in 12.0.5 ? per WoWDBDefs: references Item.ID
|
||||
{ .IsSigned = false, .Type = FT_INT, .Name = "HouseExteriorWmoDataID" }, // ParentIndexField - must be unsigned
|
||||
{.IsSigned = false, .Type = FT_STRING, .Name = "Name" },
|
||||
{.IsSigned = false, .Type = FT_FLOAT, .Name = "Position1" },
|
||||
{.IsSigned = false, .Type = FT_FLOAT, .Name = "Position2" },
|
||||
{.IsSigned = false, .Type = FT_FLOAT, .Name = "Position3" },
|
||||
{.IsSigned = false, .Type = FT_INT, .Name = "ID" },
|
||||
{.IsSigned = false, .Type = FT_BYTE, .Name = "Size" },
|
||||
{.IsSigned = false, .Type = FT_INT, .Name = "HouseExteriorWmoDataID" },
|
||||
{.IsSigned = true, .Type = FT_INT, .Name = "ParentComponentID" },
|
||||
{.IsSigned = true, .Type = FT_INT, .Name = "ModelFileDataID" },
|
||||
{.IsSigned = true, .Type = FT_INT, .Name = "Flags" },
|
||||
{.IsSigned = false, .Type = FT_BYTE, .Name = "Field_12_0_0_63534_007" },
|
||||
{.IsSigned = false, .Type = FT_BYTE, .Name = "Type" },
|
||||
{.IsSigned = true, .Type = FT_INT, .Name = "Field_12_0_0_63534_009" },
|
||||
{.IsSigned = true, .Type = FT_INT, .Name = "GameObjectID" },
|
||||
{.IsSigned = true, .Type = FT_INT, .Name = "Field_11_2_7_64044_011" },
|
||||
{.IsSigned = true, .Type = FT_INT, .Name = "ItemID" },
|
||||
};
|
||||
|
||||
static constexpr DB2LoadInfo Instance{ Fields, 16, &ExteriorComponentMeta::Instance, HOTFIX_SEL_EXTERIOR_COMPONENT };
|
||||
|
||||
@@ -964,7 +964,7 @@ uint32 DB2Manager::LoadStores(std::string const& dataPath, LocaleConstant defaul
|
||||
LOAD_DB2(sEmotesTextSoundStore);
|
||||
LOAD_DB2(sExpectedStatStore);
|
||||
LOAD_DB2(sExpectedStatModStore);
|
||||
//LOAD_DB2(sExteriorComponentStore); todo
|
||||
LOAD_DB2(sExteriorComponentStore);
|
||||
LOAD_DB2(sExteriorComponentExitPointStore);
|
||||
LOAD_DB2(sExteriorComponentGroupStore);
|
||||
LOAD_DB2(sExteriorComponentGroupXHookStore);
|
||||
|
||||
@@ -1747,17 +1747,17 @@ struct ExteriorComponentEntry
|
||||
LocalizedString Name;
|
||||
std::array<float, 3> Position;
|
||||
uint32 ID;
|
||||
uint8 Size; // Meta[3] BYTE: WoWDBDefs "Size"
|
||||
int32 ParentComponentID; // Meta[4] INT: references another ExteriorComponent (0 for defaults)
|
||||
int32 ModelFileDataID; // Meta[5] INT: model FileDataID
|
||||
int32 Flags; // Meta[6] INT: 0x1=IsDefaultFixture, 0x2=UnlockedByDefault
|
||||
uint8 Field_7; // Meta[7] BYTE: unknown (always 1)
|
||||
uint8 Type; // Meta[8] BYTE: references ExteriorComponentType
|
||||
int32 Field_9; // Meta[9] INT: unknown
|
||||
int32 GameObjectID; // Meta[10] INT: references GameObjects
|
||||
int32 Field_11; // Meta[11] INT: unknown (WoWDBDefs name: Field_11_2_7_64044_011)
|
||||
int32 ItemID; // Meta[12] INT: NEW in 12.0.5 ? references Item.ID (allows the exterior component to be sold/earned as an item, like HouseDecor.ItemID)
|
||||
uint32 HouseExteriorWmoDataID; // ParentIndexField - must be unsigned
|
||||
uint8 Size;
|
||||
int32 HouseExteriorWmoDataID;
|
||||
int32 ParentComponentID;
|
||||
int32 ModelFileDataID;
|
||||
int32 Flags;
|
||||
uint8 Field_12_0_0_63534_007;
|
||||
uint8 Type;
|
||||
int32 Field_12_0_0_63534_009;
|
||||
int32 GameObjectID;
|
||||
int32 Field_11_2_7_64044_011;
|
||||
int32 ItemID; // ParentIndexField - must be unsigned
|
||||
};
|
||||
|
||||
struct ExteriorComponentExitPointEntry
|
||||
|
||||
Reference in New Issue
Block a user