aboutsummaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/extractor_common/ExtractorDB2LoadInfo.h28
-rw-r--r--src/tools/map_extractor/loadlib/DBFilesClientList.h43
-rw-r--r--src/tools/vmap4_extractor/gameobject_extract.cpp23
3 files changed, 64 insertions, 30 deletions
diff --git a/src/tools/extractor_common/ExtractorDB2LoadInfo.h b/src/tools/extractor_common/ExtractorDB2LoadInfo.h
index 54ff44fd989..63020e25f58 100644
--- a/src/tools/extractor_common/ExtractorDB2LoadInfo.h
+++ b/src/tools/extractor_common/ExtractorDB2LoadInfo.h
@@ -32,7 +32,7 @@ struct CinematicCameraLoadInfo
{ FT_INT, 1, false },
};
- static constexpr DB2Meta MetaInstance{ 1294214, -1, 5, 5, 0x4B3DF171, MetaFields, -1 };
+ static constexpr DB2Meta MetaInstance{ 1294214, -1, 5, 5, 0x8BFD752B, MetaFields, -1 };
static constexpr DB2FieldMeta Fields[8] =
{
@@ -51,7 +51,7 @@ struct CinematicCameraLoadInfo
struct GameobjectDisplayInfoLoadInfo
{
- static constexpr DB2MetaField MetaFields[8] =
+ static constexpr DB2MetaField MetaFields[9] =
{
{ FT_FLOAT, 6, true },
{ FT_INT, 1, true },
@@ -61,11 +61,12 @@ struct GameobjectDisplayInfoLoadInfo
{ FT_INT, 1, true },
{ FT_INT, 1, true },
{ FT_INT, 1, true },
+ { FT_SHORT, 1, false },
};
- static constexpr DB2Meta MetaInstance{ 1266277, -1, 8, 8, 0x7F774625, MetaFields, -1 };
+ static constexpr DB2Meta MetaInstance{ 1266277, -1, 9, 9, 0xD85414D1, MetaFields, -1 };
- static constexpr DB2FieldMeta Fields[14] =
+ static constexpr DB2FieldMeta Fields[15] =
{
{ false, FT_INT, "ID" },
{ false, FT_FLOAT, "GeoBoxMinX" },
@@ -81,9 +82,10 @@ struct GameobjectDisplayInfoLoadInfo
{ true, FT_INT, "AlternateDisplayType" },
{ true, FT_INT, "ClientCreatureDisplayInfoID" },
{ true, FT_INT, "ClientItemID" },
+ { false, FT_SHORT, "Unknown1100" },
};
- static constexpr DB2FileLoadInfo Instance{ Fields, 14, &MetaInstance };
+ static constexpr DB2FileLoadInfo Instance{ Fields, 15, &MetaInstance };
};
struct LiquidMaterialLoadInfo
@@ -94,7 +96,7 @@ struct LiquidMaterialLoadInfo
{ FT_BYTE, 1, true },
};
- static constexpr DB2Meta MetaInstance{ 1132538, -1, 2, 2, 0x2CFFEA40, MetaFields, -1 };
+ static constexpr DB2Meta MetaInstance{ 1132538, -1, 2, 2, 0x01033D2A, MetaFields, -1 };
static constexpr DB2FieldMeta Fields[3] =
{
@@ -117,7 +119,7 @@ struct LiquidObjectLoadInfo
{ FT_BYTE, 1, false },
};
- static constexpr DB2Meta MetaInstance{ 1308058, -1, 5, 5, 0x6CAEB8A1, MetaFields, -1 };
+ static constexpr DB2Meta MetaInstance{ 1308058, -1, 5, 5, 0xCB0D39E8, MetaFields, -1 };
static constexpr DB2FieldMeta Fields[6] =
{
@@ -159,7 +161,7 @@ struct LiquidTypeLoadInfo
{ FT_FLOAT, 4, true },
};
- static constexpr DB2Meta MetaInstance{ 1371380, -1, 21, 21, 0xAFFFC9E0, MetaFields, -1 };
+ static constexpr DB2Meta MetaInstance{ 1371380, -1, 21, 21, 0x95DB15B6, MetaFields, -1 };
static constexpr DB2FieldMeta Fields[56] =
{
@@ -226,7 +228,7 @@ struct LiquidTypeLoadInfo
struct MapLoadInfo
{
- static constexpr DB2MetaField MetaFields[24] =
+ static constexpr DB2MetaField MetaFields[25] =
{
{ FT_STRING_NOT_LOCALIZED, 1, true },
{ FT_STRING, 1, true },
@@ -251,12 +253,13 @@ struct MapLoadInfo
{ FT_INT, 1, true },
{ FT_INT, 1, true },
{ FT_INT, 1, true },
+ { FT_INT, 1, true },
{ FT_INT, 3, true },
};
- static constexpr DB2Meta MetaInstance{ 1349477, -1, 24, 24, 0x15542FE8, MetaFields, -1 };
+ static constexpr DB2Meta MetaInstance{ 1349477, -1, 25, 25, 0xE0196C63, MetaFields, -1 };
- static constexpr DB2FieldMeta Fields[28] =
+ static constexpr DB2FieldMeta Fields[29] =
{
{ false, FT_INT, "ID" },
{ false, FT_STRING_NOT_LOCALIZED, "Directory" },
@@ -283,12 +286,13 @@ struct MapLoadInfo
{ true, FT_INT, "ZmpFileDataID" },
{ true, FT_INT, "WdtFileDataID" },
{ true, FT_INT, "NavigationMaxDistance" },
+ { true, FT_INT, "PreloadFileDataID" },
{ true, FT_INT, "Flags1" },
{ true, FT_INT, "Flags2" },
{ true, FT_INT, "Flags3" },
};
- static constexpr DB2FileLoadInfo Instance{ Fields, 28, &MetaInstance };
+ static constexpr DB2FileLoadInfo Instance{ Fields, 29, &MetaInstance };
};
#endif // ExtractorDB2LoadInfo_h__
diff --git a/src/tools/map_extractor/loadlib/DBFilesClientList.h b/src/tools/map_extractor/loadlib/DBFilesClientList.h
index 6312cee7da3..4876ba6ed17 100644
--- a/src/tools/map_extractor/loadlib/DBFilesClientList.h
+++ b/src/tools/map_extractor/loadlib/DBFilesClientList.h
@@ -95,6 +95,7 @@ DB2FileInfo const DBFilesClientList[] =
{ 2446322, "AzeriteTierUnlockSet.db2" },
{ 2564314, "AzeriteUnlockMapping.db2" },
{ 1284819, "BankBagSlotPrices.db2" },
+ { 5242411, "BankTab.db2" },
{ 1373459, "BannedAddons.db2" },
{ 1237437, "BarberShopStyle.db2" },
{ 2499852, "BarrageEffect.db2" },
@@ -110,13 +111,12 @@ DB2FileInfo const DBFilesClientList[] =
{ 841622, "BattlePetSpecies.db2" },
{ 801581, "BattlePetSpeciesState.db2" },
{ 801582, "BattlePetSpeciesXAbility.db2" },
- { 3669304, "BattlePetSpeciesXCovenant.db2" },
{ 801583, "BattlePetState.db2" },
{ 801584, "BattlePetVisual.db2" },
{ 1360265, "BattlemasterList.db2" },
+ { 5916746, "BattlemasterListXMap.db2" },
{ 5549327, "BattlepayCurrency.db2" },
{ 1525607, "BeamEffect.db2" },
- { 3491563, "BeckonTrigger.db2" },
{ 1467254, "BoneWindModifierModel.db2" },
{ 1416756, "BoneWindModifiers.db2" },
{ 1983274, "BonusRoll.db2" },
@@ -145,9 +145,7 @@ DB2FileInfo const DBFilesClientList[] =
{ 972425, "CharShipment.db2" },
{ 972405, "CharShipmentContainer.db2" },
{ 3055696, "CharStartKit.db2" },
- { 1237591, "CharStartOutfit.db2" },
{ 1349054, "CharTitles.db2" },
- { 1028733, "CharacterFaceBoneSet.db2" },
{ 1369752, "CharacterFacialHairStyles.db2" },
{ 1344281, "CharacterLoadout.db2" },
{ 1302846, "CharacterLoadoutItem.db2" },
@@ -200,6 +198,7 @@ DB2FileInfo const DBFilesClientList[] =
{ 1294214, "CinematicCamera.db2" },
{ 1134583, "CinematicSequences.db2" },
{ 1939843, "ClientSceneEffect.db2" },
+ { 5874295, "ClientSettings.db2" },
{ 1465903, "CloakDampening.db2" },
{ 2175218, "CloneEffect.db2" },
{ 5152111, "CollectableSourceEncounter.db2" },
@@ -218,6 +217,7 @@ DB2FileInfo const DBFilesClientList[] =
{ 1278239, "ComponentTextureFileData.db2" },
{ 5211412, "ConditionalChrModel.db2" },
{ 3501965, "ConditionalContentTuning.db2" },
+ { 5525474, "ConditionalCreatureModelData.db2" },
{ 5345180, "ConditionalItemAppearance.db2" },
{ 1709409, "ConfigurationWarning.db2" },
{ 5742435, "ContentPush.db2" },
@@ -239,6 +239,7 @@ DB2FileInfo const DBFilesClientList[] =
{ 4373537, "CraftingDifficultyQuality.db2" },
{ 4529122, "CraftingOrder.db2" },
{ 4688652, "CraftingOrderHouse.db2" },
+ { 5875491, "CraftingOrderXLabel.db2" },
{ 4373538, "CraftingQuality.db2" },
{ 4541803, "CraftingReagentEffect.db2" },
{ 4382197, "CraftingReagentQuality.db2" },
@@ -280,6 +281,8 @@ DB2FileInfo const DBFilesClientList[] =
{ 1278176, "DecalProperties.db2" },
{ 1279100, "DeclinedWord.db2" },
{ 1279099, "DeclinedWordCases.db2" },
+ { 5920079, "DelvesSeason.db2" },
+ { 5920080, "DelvesSeasonXSpell.db2" },
{ 1122116, "DestructibleModelData.db2" },
{ 922722, "DeviceBlacklist.db2" },
{ 1352127, "Difficulty.db2" },
@@ -314,7 +317,6 @@ DB2FileInfo const DBFilesClientList[] =
{ 1278178, "GMSurveyQuestions.db2" },
{ 1283020, "GMSurveySurveys.db2" },
{ 2922072, "GameClockDebug.db2" },
- { 5008306, "GameMode.db2" },
{ 3565753, "GameObjectAnimGroupMember.db2" },
{ 1266737, "GameObjectArtKit.db2" },
{ 1302847, "GameObjectDiffAnimMap.db2" },
@@ -395,6 +397,8 @@ DB2FileInfo const DBFilesClientList[] =
{ 948496, "GlyphRequiredSpec.db2" },
{ 4278503, "GossipNPCOption.db2" },
{ 4335720, "GossipNPCOptionDisplayInfo.db2" },
+ { 5746391, "GossipOptionXUIWidgetSet.db2" },
+ { 5902977, "GossipUIDisplayInfoCondition.db2" },
{ 4407361, "GossipXGarrTalentTrees.db2" },
{ 3622253, "GossipXUIDisplayInfo.db2" },
{ 2433582, "GradientEffect.db2" },
@@ -466,7 +470,6 @@ DB2FileInfo const DBFilesClientList[] =
{ 4050937, "ItemDisplayInfoModelMatRes.db2" },
{ 969941, "ItemEffect.db2" },
{ 801681, "ItemExtendedCost.db2" },
- { 2358574, "ItemFallbackVisual.db2" },
{ 5152256, "ItemFixup.db2" },
{ 5475699, "ItemFixupAction.db2" },
{ 5015219, "ItemGroupIlvlScalingEntry.db2" },
@@ -526,6 +529,8 @@ DB2FileInfo const DBFilesClientList[] =
{ 1375579, "Light.db2" },
{ 1375580, "LightData.db2" },
{ 1334669, "LightParams.db2" },
+ { 5350588, "LightParamsLightShaft.db2" },
+ { 5350589, "LightShaft.db2" },
{ 1308501, "LightSkybox.db2" },
{ 4680119, "LightWorldShadow.db2" },
{ 2003383, "Lightning.db2" },
@@ -534,7 +539,6 @@ DB2FileInfo const DBFilesClientList[] =
{ 1371380, "LiquidType.db2" },
{ 2261065, "LiquidTypeXTexture.db2" },
{ 4276965, "LivingWorldObjectTemplate.db2" },
- { 4276966, "LivingWorldObjectTemplateModel.db2" },
{ 2478235, "LoadingScreenSkin.db2" },
{ 1302239, "LoadingScreenTaxiSplines.db2" },
{ 1266541, "LoadingScreens.db2" },
@@ -554,7 +558,6 @@ DB2FileInfo const DBFilesClientList[] =
{ 1375801, "ManifestInterfaceData.db2" },
{ 1375804, "ManifestInterfaceItemIcon.db2" },
{ 1267335, "ManifestInterfaceTOCData.db2" },
- { 1375802, "ManifestMP3.db2" },
{ 1349477, "Map.db2" },
{ 1597466, "MapCelestialBody.db2" },
{ 801709, "MapChallengeMode.db2" },
@@ -575,7 +578,7 @@ DB2FileInfo const DBFilesClientList[] =
{ 5393274, "ModelSoundAnimEntry.db2" },
{ 5393275, "ModelSoundEntry.db2" },
{ 5393276, "ModelSoundOverride.db2" },
- { 5512584, "ModelSoundOverrideName.db2" },
+ { 5682517, "ModelSoundSettings.db2" },
{ 5393277, "ModelSoundTagEntry.db2" },
{ 3386486, "ModifiedCraftingCategory.db2" },
{ 4530643, "ModifiedCraftingItem.db2" },
@@ -600,6 +603,12 @@ DB2FileInfo const DBFilesClientList[] =
{ 2123783, "MythicPlusSeasonRewardLevels.db2" },
{ 4067473, "MythicPlusSeasonTrackedAffix.db2" },
{ 4521365, "MythicPlusSeasonTrackedMap.db2" },
+ { 5875492, "NPCCraftingOrderCustomer.db2" },
+ { 5875493, "NPCCraftingOrderCustomerXLabel.db2" },
+ { 5875494, "NPCCraftingOrderSet.db2" },
+ { 5875495, "NPCCraftingOrderSetXCraftOrder.db2" },
+ { 5875496, "NPCCraftingOrderSetXCustomer.db2" },
+ { 5912882, "NPCCraftingOrderSetXTreasure.db2" },
{ 1340661, "NPCModelItemSlotDisplayInfo.db2" },
{ 1282621, "NPCSounds.db2" },
{ 1122117, "NameGen.db2" },
@@ -652,9 +661,14 @@ DB2FileInfo const DBFilesClientList[] =
{ 1267336, "PhaseShiftZoneSounds.db2" },
{ 987581, "PhaseXPhaseGroup.db2" },
{ 5152358, "PingType.db2" },
+ { 5922429, "PlayerCompanionInfo.db2" },
{ 1045411, "PlayerCondition.db2" },
+ { 5715394, "PlayerDataElementAccount.db2" },
+ { 5715395, "PlayerDataElementCharacter.db2" },
{ 5426706, "PlayerDataFlagAccount.db2" },
{ 5426708, "PlayerDataFlagCharacter.db2" },
+ { 5346849, "PlayerInteractionInfo.db2" },
+ { 5735564, "PointLightConditionMap.db2" },
{ 1251523, "Positioner.db2" },
{ 1251506, "PositionerState.db2" },
{ 1251533, "PositionerStateEntry.db2" },
@@ -668,6 +682,7 @@ DB2FileInfo const DBFilesClientList[] =
{ 4508544, "Profession.db2" },
{ 4505297, "ProfessionEffect.db2" },
{ 4556715, "ProfessionEffectType.db2" },
+ { 5662322, "ProfessionExpansion.db2" },
{ 4452078, "ProfessionPropPoints.db2" },
{ 4623413, "ProfessionRating.db2" },
{ 4505298, "ProfessionTrait.db2" },
@@ -684,8 +699,10 @@ DB2FileInfo const DBFilesClientList[] =
{ 1891534, "PvpTalentCategory.db2" },
{ 1950197, "PvpTalentSlotUnlock.db2" },
{ 2066871, "PvpTier.db2" },
+ { 5917361, "QuestDrivenScenario.db2" },
{ 1282622, "QuestFactionReward.db2" },
{ 1343388, "QuestFeedbackEffect.db2" },
+ { 5905413, "QuestHub.db2" },
{ 1120960, "QuestInfo.db2" },
{ 5202058, "QuestLabel.db2" },
{ 973430, "QuestLine.db2" },
@@ -817,7 +834,6 @@ DB2FileInfo const DBFilesClientList[] =
{ 1001907, "SpellLearnSpell.db2" },
{ 1140079, "SpellLevels.db2" },
{ 1014438, "SpellMechanic.db2" },
- { 3549053, "SpellMemorizeCost.db2" },
{ 1003144, "SpellMisc.db2" },
{ 897956, "SpellMissile.db2" },
{ 897955, "SpellMissileMotion.db2" },
@@ -856,6 +872,7 @@ DB2FileInfo const DBFilesClientList[] =
{ 3607312, "SpellVisualScreenEffect.db2" },
{ 1724949, "SpellXDescriptionVariables.db2" },
{ 1101657, "SpellXSpellVisual.db2" },
+ { 5735565, "SpotLightConditionMap.db2" },
{ 1604265, "StartupFiles.db2" },
{ 1375805, "Startup_Strings.db2" },
{ 1140758, "Stationery.db2" },
@@ -878,6 +895,7 @@ DB2FileInfo const DBFilesClientList[] =
{ 1301101, "TradeSkillCategory.db2" },
{ 1329070, "TradeSkillItem.db2" },
{ 4543085, "TraitCond.db2" },
+ { 5890759, "TraitCondAccountElement.db2" },
{ 4420295, "TraitCost.db2" },
{ 4524216, "TraitCurrency.db2" },
{ 4539393, "TraitCurrencySource.db2" },
@@ -895,6 +913,7 @@ DB2FileInfo const DBFilesClientList[] =
{ 4543092, "TraitNodeXTraitCond.db2" },
{ 4420303, "TraitNodeXTraitCost.db2" },
{ 4420304, "TraitNodeXTraitNodeEntry.db2" },
+ { 5534447, "TraitSubTree.db2" },
{ 4635649, "TraitSystem.db2" },
{ 4420305, "TraitTree.db2" },
{ 4669507, "TraitTreeLoadout.db2" },
@@ -982,6 +1001,10 @@ DB2FileInfo const DBFilesClientList[] =
{ 3587230, "VolumeFogCondition.db2" },
{ 1355528, "WMOAreaTable.db2" },
{ 1323241, "WMOMinimapTexture.db2" },
+ { 5736126, "WarbandScene.db2" },
+ { 5754555, "WarbandSceneAnimation.db2" },
+ { 5736130, "WarbandScenePlacement.db2" },
+ { 5756286, "WarbandScenePlcmntAnimOverride.db2" },
{ 2565222, "WaterfallData.db2" },
{ 2565258, "WaypointEdge.db2" },
{ 2565265, "WaypointNode.db2" },
diff --git a/src/tools/vmap4_extractor/gameobject_extract.cpp b/src/tools/vmap4_extractor/gameobject_extract.cpp
index 7cd77764609..9b6188304d7 100644
--- a/src/tools/vmap4_extractor/gameobject_extract.cpp
+++ b/src/tools/vmap4_extractor/gameobject_extract.cpp
@@ -26,6 +26,7 @@
#include <CascLib.h>
#include <algorithm>
#include <cstdio>
+#include "advstd.h"
bool ExtractSingleModel(std::string& fname)
{
@@ -60,15 +61,16 @@ bool ExtractSingleModel(std::string& fname)
extern std::shared_ptr<CASC::Storage> CascStorage;
-bool GetHeaderMagic(std::string const& fileName, uint32* magic)
+bool GetHeaderMagic(std::string const& fileName, std::array<char, 4>* magic)
{
- *magic = 0;
+ *magic = { };
std::unique_ptr<CASC::File> file(CascStorage->OpenFile(fileName.c_str(), CASC_LOCALE_ALL_WOW));
if (!file)
return false;
+ uint32 bytesToRead = uint32(magic->size() * sizeof(std::remove_pointer_t<decltype(magic)>::value_type));
uint32 bytesRead = 0;
- if (!file->ReadFile(magic, 4, &bytesRead) || bytesRead != 4)
+ if (!file->ReadFile(magic->data(), bytesToRead, &bytesRead) || bytesRead != bytesToRead)
return false;
return true;
@@ -115,16 +117,21 @@ void ExtractGameobjectModels()
std::string fileName = Trinity::StringFormat("FILE{:08X}.xxx", fileId);
bool result = false;
- uint32 header;
- if (!GetHeaderMagic(fileName, &header))
+ std::array<char, 4> headerRaw;
+ if (!GetHeaderMagic(fileName, &headerRaw))
continue;
- if (!memcmp(&header, "REVM", 4))
+ std::string_view header(headerRaw.data(), headerRaw.size());
+ if (header == "REVM")
result = ExtractSingleWmo(fileName);
- else if (!memcmp(&header, "MD20", 4) || !memcmp(&header, "MD21", 4))
+ else if (header == "MD20" || header == "MD21")
result = ExtractSingleModel(fileName);
+ else if (header == "BLP2")
+ continue; // broken db2 data
else
- ABORT_MSG("%s header: %d - %c%c%c%c", fileName.c_str(), header, (header >> 24) & 0xFF, (header >> 16) & 0xFF, (header >> 8) & 0xFF, header & 0xFF);
+ ABORT_MSG("%s header: 0x%X%X%X%X - " STRING_VIEW_FMT, fileName.c_str(),
+ uint32(headerRaw[3]), uint32(headerRaw[2]), uint32(headerRaw[1]), uint32(headerRaw[0]),
+ STRING_VIEW_FMT_ARG(header));
if (result)
{