aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/DataStores/DBCEnums.h2
-rw-r--r--src/tools/extractor_common/ExtractorDB2LoadInfo.h481
-rw-r--r--src/tools/map_extractor/System.cpp20
-rw-r--r--src/tools/mmaps_generator/PathGenerator.cpp4
-rw-r--r--src/tools/vmap4_extractor/gameobject_extract.cpp4
-rw-r--r--src/tools/vmap4_extractor/vmapexport.cpp4
6 files changed, 257 insertions, 258 deletions
diff --git a/src/server/game/DataStores/DBCEnums.h b/src/server/game/DataStores/DBCEnums.h
index 6da7623ccd5..df040e5efe2 100644
--- a/src/server/game/DataStores/DBCEnums.h
+++ b/src/server/game/DataStores/DBCEnums.h
@@ -1535,7 +1535,7 @@ enum class ModifierTreeType : int32
PlayerAuraWithLabelStackCountEqualOrGreaterThan = 335, // Player has at least {#Stacks} stacks of aura "{Label}"
PlayerAuraWithLabelStackCountEqual = 336, // Target has exactly {#Stacks} stacks of aura with label "{Label}"
PlayerAuraWithLabelStackCountEqualOrLessThan = 337, // Player has at most {#Stacks} stacks of aura "{Label}"
- PlayerIsInCrossFactionGroup = 338, // PlayeOr is in a cross faction group
+ PlayerIsInCrossFactionGroup = 338, // Player is in a cross faction group
PlayerHasTraitNodeEntryInActiveConfig = 340, // Player has {TraitNodeEntry} node in currently active config
PlayerHasTraitNodeEntryInActiveConfigRankGreaterOrEqualThan = 341, // Player has at least {#Rank} for {TraitNodeEntry} node in currently active config
diff --git a/src/tools/extractor_common/ExtractorDB2LoadInfo.h b/src/tools/extractor_common/ExtractorDB2LoadInfo.h
index 39bec07c9a0..dddeb7927a7 100644
--- a/src/tools/extractor_common/ExtractorDB2LoadInfo.h
+++ b/src/tools/extractor_common/ExtractorDB2LoadInfo.h
@@ -20,276 +20,275 @@
#include "DB2FileLoader.h"
#include "DB2Meta.h"
-#include <array>
struct CinematicCameraLoadInfo
{
- static DB2FileLoadInfo const* Instance()
+ static constexpr DB2MetaField MetaFields[5] =
{
- static DB2FieldMeta const loadedFields[] =
- {
- { false, FT_INT, "ID" },
- { false, FT_FLOAT, "OriginX" },
- { false, FT_FLOAT, "OriginY" },
- { false, FT_FLOAT, "OriginZ" },
- { false, FT_INT, "SoundID" },
- { false, FT_FLOAT, "OriginFacing" },
- { false, FT_INT, "FileDataID" },
- { false, FT_INT, "ConversationID" },
- };
- static DB2MetaField const fields[5] =
- {
- { FT_FLOAT, 3, true },
- { FT_INT, 1, false },
- { FT_FLOAT, 1, true },
- { FT_INT, 1, false },
- { FT_INT, 1, false },
- };
- static DB2Meta meta(1294214, -1, 5, 5, 0x4B3DF171, fields, -1);
- static DB2FileLoadInfo const loadInfo(&loadedFields[0], std::size(loadedFields), &meta);
- return &loadInfo;
- }
+ { FT_FLOAT, 3, true },
+ { FT_INT, 1, false },
+ { FT_FLOAT, 1, true },
+ { FT_INT, 1, false },
+ { FT_INT, 1, false },
+ };
+
+ static constexpr DB2Meta MetaInstance{ 1294214, -1, 5, 5, 0x4B3DF171, MetaFields, -1 };
+
+ static constexpr DB2FieldMeta Fields[8] =
+ {
+ { false, FT_INT, "ID" },
+ { false, FT_FLOAT, "OriginX" },
+ { false, FT_FLOAT, "OriginY" },
+ { false, FT_FLOAT, "OriginZ" },
+ { false, FT_INT, "SoundID" },
+ { false, FT_FLOAT, "OriginFacing" },
+ { false, FT_INT, "FileDataID" },
+ { false, FT_INT, "ConversationID" },
+ };
+
+ static constexpr DB2FileLoadInfo Instance{ Fields, 8, & MetaInstance };
};
struct GameobjectDisplayInfoLoadInfo
{
- static DB2FileLoadInfo const* Instance()
+ static constexpr DB2MetaField MetaFields[8] =
+ {
+ { FT_FLOAT, 6, true },
+ { FT_INT, 1, true },
+ { FT_SHORT, 1, true },
+ { FT_FLOAT, 1, true },
+ { FT_FLOAT, 1, true },
+ { FT_INT, 1, true },
+ { FT_INT, 1, true },
+ { FT_INT, 1, true },
+ };
+
+ static constexpr DB2Meta MetaInstance{ 1266277, -1, 8, 8, 0x7F774625, MetaFields, -1 };
+
+ static constexpr DB2FieldMeta Fields[14] =
{
- static DB2FieldMeta const loadedFields[] =
- {
- { false, FT_INT, "ID" },
- { false, FT_FLOAT, "GeoBoxMinX" },
- { false, FT_FLOAT, "GeoBoxMinY" },
- { false, FT_FLOAT, "GeoBoxMinZ" },
- { false, FT_FLOAT, "GeoBoxMaxX" },
- { false, FT_FLOAT, "GeoBoxMaxY" },
- { false, FT_FLOAT, "GeoBoxMaxZ" },
- { true, FT_INT, "FileDataID" },
- { true, FT_SHORT, "ObjectEffectPackageID" },
- { false, FT_FLOAT, "OverrideLootEffectScale" },
- { false, FT_FLOAT, "OverrideNameScale" },
- };
- static DB2MetaField const fields[5] =
- {
- { FT_FLOAT, 6, true },
- { FT_INT, 1, true },
- { FT_SHORT, 1, true },
- { FT_FLOAT, 1, true },
- { FT_FLOAT, 1, true },
- };
- static DB2Meta meta(1266277, -1, 5, 5, 0x7E33A93F, fields, -1);
- static DB2FileLoadInfo const loadInfo(&loadedFields[0], std::size(loadedFields), &meta);
- return &loadInfo;
- }
+ { false, FT_INT, "ID" },
+ { false, FT_FLOAT, "GeoBoxMinX" },
+ { false, FT_FLOAT, "GeoBoxMinY" },
+ { false, FT_FLOAT, "GeoBoxMinZ" },
+ { false, FT_FLOAT, "GeoBoxMaxX" },
+ { false, FT_FLOAT, "GeoBoxMaxY" },
+ { false, FT_FLOAT, "GeoBoxMaxZ" },
+ { true, FT_INT, "FileDataID" },
+ { true, FT_SHORT, "ObjectEffectPackageID" },
+ { false, FT_FLOAT, "OverrideLootEffectScale" },
+ { false, FT_FLOAT, "OverrideNameScale" },
+ { true, FT_INT, "AlternateDisplayType" },
+ { true, FT_INT, "ClientCreatureDisplayInfoID" },
+ { true, FT_INT, "ClientItemID" },
+ };
+
+ static constexpr DB2FileLoadInfo Instance{ Fields, 14, &MetaInstance };
};
struct LiquidMaterialLoadInfo
{
- static DB2FileLoadInfo const* Instance()
+ static constexpr DB2MetaField MetaFields[2] =
+ {
+ { FT_BYTE, 1, true },
+ { FT_BYTE, 1, true },
+ };
+
+ static constexpr DB2Meta MetaInstance{ 1132538, -1, 2, 2, 0x2CFFEA40, MetaFields, -1 };
+
+ static constexpr DB2FieldMeta Fields[3] =
{
- static DB2FieldMeta const loadedFields[] =
- {
- { false, FT_INT, "ID" },
- { true, FT_BYTE, "Flags" },
- { true, FT_BYTE, "LVF" },
- };
- static DB2MetaField const fields[2] =
- {
- { FT_BYTE, 1, true },
- { FT_BYTE, 1, true },
- };
- static DB2Meta meta(1132538, -1, 2, 2, 0x2CFFEA40, fields, -1);
- static DB2FileLoadInfo const loadInfo(&loadedFields[0], std::size(loadedFields), &meta);
- return &loadInfo;
- }
+ { false, FT_INT, "ID" },
+ { true, FT_BYTE, "Flags" },
+ { true, FT_BYTE, "LVF" },
+ };
+
+ static constexpr DB2FileLoadInfo Instance{ Fields, 3, &MetaInstance };
};
struct LiquidObjectLoadInfo
{
- static DB2FileLoadInfo const* Instance()
+ static constexpr DB2MetaField MetaFields[5] =
{
- static DB2FieldMeta const loadedFields[] =
- {
- { false, FT_INT, "ID" },
- { false, FT_FLOAT, "FlowDirection" },
- { false, FT_FLOAT, "FlowSpeed" },
- { true, FT_SHORT, "LiquidTypeID" },
- { false, FT_BYTE, "Fishable" },
- { false, FT_BYTE, "Reflection" },
- };
- static DB2MetaField const fields[5] =
- {
- { FT_FLOAT, 1, true },
- { FT_FLOAT, 1, true },
- { FT_SHORT, 1, true },
- { FT_BYTE, 1, false },
- { FT_BYTE, 1, false },
- };
- static DB2Meta meta(1308058, -1, 5, 5, 0x6CAEB8A1, fields, -1);
- static DB2FileLoadInfo const loadInfo(&loadedFields[0], std::size(loadedFields), &meta);
- return &loadInfo;
- }
+ { FT_FLOAT, 1, true },
+ { FT_FLOAT, 1, true },
+ { FT_SHORT, 1, true },
+ { FT_BYTE, 1, false },
+ { FT_BYTE, 1, false },
+ };
+
+ static constexpr DB2Meta MetaInstance{ 1308058, -1, 5, 5, 0x6CAEB8A1, MetaFields, -1 };
+
+ static constexpr DB2FieldMeta Fields[6] =
+ {
+ { false, FT_INT, "ID" },
+ { false, FT_FLOAT, "FlowDirection" },
+ { false, FT_FLOAT, "FlowSpeed" },
+ { true, FT_SHORT, "LiquidTypeID" },
+ { false, FT_BYTE, "Fishable" },
+ { false, FT_BYTE, "Reflection" },
+ };
+
+ static constexpr DB2FileLoadInfo Instance{ Fields, 3, & MetaInstance };
};
struct LiquidTypeLoadInfo
{
- static DB2FileLoadInfo const* Instance()
+ static constexpr DB2MetaField MetaFields[21] =
+ {
+ { FT_STRING_NOT_LOCALIZED, 1, true },
+ { FT_STRING_NOT_LOCALIZED, 6, true },
+ { FT_SHORT, 1, false },
+ { FT_BYTE, 1, false },
+ { FT_INT, 1, false },
+ { FT_INT, 1, false },
+ { FT_FLOAT, 1, true },
+ { FT_FLOAT, 1, true },
+ { FT_FLOAT, 1, true },
+ { FT_FLOAT, 1, true },
+ { FT_SHORT, 1, false },
+ { FT_FLOAT, 1, true },
+ { FT_BYTE, 1, false },
+ { FT_BYTE, 1, false },
+ { FT_BYTE, 1, false },
+ { FT_INT, 1, true },
+ { FT_BYTE, 6, false },
+ { FT_INT, 2, true },
+ { FT_FLOAT, 18, true },
+ { FT_INT, 4, false },
+ { FT_FLOAT, 4, true },
+ };
+
+ static constexpr DB2Meta MetaInstance{ 1371380, -1, 21, 21, 0xAFFFC9E0, MetaFields, -1 };
+
+ static constexpr DB2FieldMeta Fields[56] =
{
- static DB2FieldMeta const loadedFields[] =
- {
- { false, FT_INT, "ID" },
- { false, FT_STRING_NOT_LOCALIZED, "Name" },
- { false, FT_STRING_NOT_LOCALIZED, "Texture1" },
- { false, FT_STRING_NOT_LOCALIZED, "Texture2" },
- { false, FT_STRING_NOT_LOCALIZED, "Texture3" },
- { false, FT_STRING_NOT_LOCALIZED, "Texture4" },
- { false, FT_STRING_NOT_LOCALIZED, "Texture5" },
- { false, FT_STRING_NOT_LOCALIZED, "Texture6" },
- { false, FT_SHORT, "Flags" },
- { false, FT_BYTE, "SoundBank" },
- { false, FT_INT, "SoundID" },
- { false, FT_INT, "SpellID" },
- { false, FT_FLOAT, "MaxDarkenDepth" },
- { false, FT_FLOAT, "FogDarkenIntensity" },
- { false, FT_FLOAT, "AmbDarkenIntensity" },
- { false, FT_FLOAT, "DirDarkenIntensity" },
- { false, FT_SHORT, "LightID" },
- { false, FT_FLOAT, "ParticleScale" },
- { false, FT_BYTE, "ParticleMovement" },
- { false, FT_BYTE, "ParticleTexSlots" },
- { false, FT_BYTE, "MaterialID" },
- { true, FT_INT, "MinimapStaticCol" },
- { false, FT_BYTE, "FrameCountTexture1" },
- { false, FT_BYTE, "FrameCountTexture2" },
- { false, FT_BYTE, "FrameCountTexture3" },
- { false, FT_BYTE, "FrameCountTexture4" },
- { false, FT_BYTE, "FrameCountTexture5" },
- { false, FT_BYTE, "FrameCountTexture6" },
- { true, FT_INT, "Color1" },
- { true, FT_INT, "Color2" },
- { false, FT_FLOAT, "Float1" },
- { false, FT_FLOAT, "Float2" },
- { false, FT_FLOAT, "Float3" },
- { false, FT_FLOAT, "Float4" },
- { false, FT_FLOAT, "Float5" },
- { false, FT_FLOAT, "Float6" },
- { false, FT_FLOAT, "Float7" },
- { false, FT_FLOAT, "Float8" },
- { false, FT_FLOAT, "Float9" },
- { false, FT_FLOAT, "Float10" },
- { false, FT_FLOAT, "Float11" },
- { false, FT_FLOAT, "Float12" },
- { false, FT_FLOAT, "Float13" },
- { false, FT_FLOAT, "Float14" },
- { false, FT_FLOAT, "Float15" },
- { false, FT_FLOAT, "Float16" },
- { false, FT_FLOAT, "Float17" },
- { false, FT_FLOAT, "Float18" },
- { false, FT_INT, "Int1" },
- { false, FT_INT, "Int2" },
- { false, FT_INT, "Int3" },
- { false, FT_INT, "Int4" },
- { false, FT_FLOAT, "Coefficient1" },
- { false, FT_FLOAT, "Coefficient2" },
- { false, FT_FLOAT, "Coefficient3" },
- { false, FT_FLOAT, "Coefficient4" },
- };
- static DB2MetaField const fields[21] =
- {
- { FT_STRING_NOT_LOCALIZED, 1, true },
- { FT_STRING_NOT_LOCALIZED, 6, true },
- { FT_SHORT, 1, false },
- { FT_BYTE, 1, false },
- { FT_INT, 1, false },
- { FT_INT, 1, false },
- { FT_FLOAT, 1, true },
- { FT_FLOAT, 1, true },
- { FT_FLOAT, 1, true },
- { FT_FLOAT, 1, true },
- { FT_SHORT, 1, false },
- { FT_FLOAT, 1, true },
- { FT_BYTE, 1, false },
- { FT_BYTE, 1, false },
- { FT_BYTE, 1, false },
- { FT_INT, 1, true },
- { FT_BYTE, 6, false },
- { FT_INT, 2, true },
- { FT_FLOAT, 18, true },
- { FT_INT, 4, false },
- { FT_FLOAT, 4, true },
- };
- static DB2Meta meta(1371380, -1, 21, 21, 0xAFFFC9E0, fields, -1);
- static DB2FileLoadInfo const loadInfo(&loadedFields[0], std::size(loadedFields), &meta);
- return &loadInfo;
- }
+ { false, FT_INT, "ID" },
+ { false, FT_STRING_NOT_LOCALIZED, "Name" },
+ { false, FT_STRING_NOT_LOCALIZED, "Texture1" },
+ { false, FT_STRING_NOT_LOCALIZED, "Texture2" },
+ { false, FT_STRING_NOT_LOCALIZED, "Texture3" },
+ { false, FT_STRING_NOT_LOCALIZED, "Texture4" },
+ { false, FT_STRING_NOT_LOCALIZED, "Texture5" },
+ { false, FT_STRING_NOT_LOCALIZED, "Texture6" },
+ { false, FT_SHORT, "Flags" },
+ { false, FT_BYTE, "SoundBank" },
+ { false, FT_INT, "SoundID" },
+ { false, FT_INT, "SpellID" },
+ { false, FT_FLOAT, "MaxDarkenDepth" },
+ { false, FT_FLOAT, "FogDarkenIntensity" },
+ { false, FT_FLOAT, "AmbDarkenIntensity" },
+ { false, FT_FLOAT, "DirDarkenIntensity" },
+ { false, FT_SHORT, "LightID" },
+ { false, FT_FLOAT, "ParticleScale" },
+ { false, FT_BYTE, "ParticleMovement" },
+ { false, FT_BYTE, "ParticleTexSlots" },
+ { false, FT_BYTE, "MaterialID" },
+ { true, FT_INT, "MinimapStaticCol" },
+ { false, FT_BYTE, "FrameCountTexture1" },
+ { false, FT_BYTE, "FrameCountTexture2" },
+ { false, FT_BYTE, "FrameCountTexture3" },
+ { false, FT_BYTE, "FrameCountTexture4" },
+ { false, FT_BYTE, "FrameCountTexture5" },
+ { false, FT_BYTE, "FrameCountTexture6" },
+ { true, FT_INT, "Color1" },
+ { true, FT_INT, "Color2" },
+ { false, FT_FLOAT, "Float1" },
+ { false, FT_FLOAT, "Float2" },
+ { false, FT_FLOAT, "Float3" },
+ { false, FT_FLOAT, "Float4" },
+ { false, FT_FLOAT, "Float5" },
+ { false, FT_FLOAT, "Float6" },
+ { false, FT_FLOAT, "Float7" },
+ { false, FT_FLOAT, "Float8" },
+ { false, FT_FLOAT, "Float9" },
+ { false, FT_FLOAT, "Float10" },
+ { false, FT_FLOAT, "Float11" },
+ { false, FT_FLOAT, "Float12" },
+ { false, FT_FLOAT, "Float13" },
+ { false, FT_FLOAT, "Float14" },
+ { false, FT_FLOAT, "Float15" },
+ { false, FT_FLOAT, "Float16" },
+ { false, FT_FLOAT, "Float17" },
+ { false, FT_FLOAT, "Float18" },
+ { false, FT_INT, "Int1" },
+ { false, FT_INT, "Int2" },
+ { false, FT_INT, "Int3" },
+ { false, FT_INT, "Int4" },
+ { false, FT_FLOAT, "Coefficient1" },
+ { false, FT_FLOAT, "Coefficient2" },
+ { false, FT_FLOAT, "Coefficient3" },
+ { false, FT_FLOAT, "Coefficient4" },
+ };
+
+ static constexpr DB2FileLoadInfo Instance{ Fields, 56, &MetaInstance };
};
struct MapLoadInfo
{
- static DB2FileLoadInfo const* Instance()
+ static constexpr DB2MetaField MetaFields[24] =
+ {
+ { FT_STRING_NOT_LOCALIZED, 1, true },
+ { FT_STRING, 1, true },
+ { FT_STRING, 1, true },
+ { FT_STRING, 1, true },
+ { FT_STRING, 1, true },
+ { FT_STRING, 1, true },
+ { FT_FLOAT, 2, true },
+ { FT_BYTE, 1, false },
+ { FT_BYTE, 1, true },
+ { FT_BYTE, 1, false },
+ { FT_SHORT, 1, false },
+ { FT_SHORT, 1, true },
+ { FT_SHORT, 1, true },
+ { FT_SHORT, 1, true },
+ { FT_SHORT, 1, true },
+ { FT_BYTE, 1, false },
+ { FT_FLOAT, 1, true },
+ { FT_SHORT, 1, true },
+ { FT_BYTE, 1, false },
+ { FT_SHORT, 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, 0x43E626E4, MetaFields, -1 };
+
+ static constexpr DB2FieldMeta Fields[28] =
{
- static DB2FieldMeta const loadedFields[] =
- {
- { false, FT_INT, "ID" },
- { false, FT_STRING_NOT_LOCALIZED, "Directory" },
- { false, FT_STRING, "MapName" },
- { false, FT_STRING, "MapDescription0" },
- { false, FT_STRING, "MapDescription1" },
- { false, FT_STRING, "PvpShortDescription" },
- { false, FT_STRING, "PvpLongDescription" },
- { false, FT_FLOAT, "CorpseX" },
- { false, FT_FLOAT, "CorpseY" },
- { false, FT_BYTE, "MapType" },
- { true, FT_BYTE, "InstanceType" },
- { false, FT_BYTE, "ExpansionID" },
- { false, FT_SHORT, "AreaTableID" },
- { true, FT_SHORT, "LoadingScreenID" },
- { true, FT_SHORT, "TimeOfDayOverride" },
- { true, FT_SHORT, "ParentMapID" },
- { true, FT_SHORT, "CosmeticParentMapID" },
- { false, FT_BYTE, "TimeOffset" },
- { false, FT_FLOAT, "MinimapIconScale" },
- { true, FT_SHORT, "CorpseMapID" },
- { false, FT_BYTE, "MaxPlayers" },
- { true, FT_SHORT, "WindSettingsID" },
- { true, FT_INT, "ZmpFileDataID" },
- { true, FT_INT, "WdtFileDataID" },
- { true, FT_INT, "NavigationMaxDistance" },
- { true, FT_INT, "Flags1" },
- { true, FT_INT, "Flags2" },
- { true, FT_INT, "Flags3" },
- };
- static DB2MetaField const fields[24] =
- {
- { FT_STRING_NOT_LOCALIZED, 1, true },
- { FT_STRING, 1, true },
- { FT_STRING, 1, true },
- { FT_STRING, 1, true },
- { FT_STRING, 1, true },
- { FT_STRING, 1, true },
- { FT_FLOAT, 2, true },
- { FT_BYTE, 1, false },
- { FT_BYTE, 1, true },
- { FT_BYTE, 1, false },
- { FT_SHORT, 1, false },
- { FT_SHORT, 1, true },
- { FT_SHORT, 1, true },
- { FT_SHORT, 1, true },
- { FT_SHORT, 1, true },
- { FT_BYTE, 1, false },
- { FT_FLOAT, 1, true },
- { FT_SHORT, 1, true },
- { FT_BYTE, 1, false },
- { FT_SHORT, 1, true },
- { FT_INT, 1, true },
- { FT_INT, 1, true },
- { FT_INT, 1, true },
- { FT_INT, 3, true },
- };
- static DB2Meta meta(1349477, -1, 24, 24, 0x43E626E4, fields, -1);
- static DB2FileLoadInfo const loadInfo(&loadedFields[0], std::size(loadedFields), &meta);
- return &loadInfo;
- }
+ { false, FT_INT, "ID" },
+ { false, FT_STRING_NOT_LOCALIZED, "Directory" },
+ { false, FT_STRING, "MapName" },
+ { false, FT_STRING, "MapDescription0" },
+ { false, FT_STRING, "MapDescription1" },
+ { false, FT_STRING, "PvpShortDescription" },
+ { false, FT_STRING, "PvpLongDescription" },
+ { false, FT_FLOAT, "CorpseX" },
+ { false, FT_FLOAT, "CorpseY" },
+ { false, FT_BYTE, "MapType" },
+ { true, FT_BYTE, "InstanceType" },
+ { false, FT_BYTE, "ExpansionID" },
+ { false, FT_SHORT, "AreaTableID" },
+ { true, FT_SHORT, "LoadingScreenID" },
+ { true, FT_SHORT, "TimeOfDayOverride" },
+ { true, FT_SHORT, "ParentMapID" },
+ { true, FT_SHORT, "CosmeticParentMapID" },
+ { false, FT_BYTE, "TimeOffset" },
+ { false, FT_FLOAT, "MinimapIconScale" },
+ { true, FT_SHORT, "CorpseMapID" },
+ { false, FT_BYTE, "MaxPlayers" },
+ { true, FT_SHORT, "WindSettingsID" },
+ { true, FT_INT, "ZmpFileDataID" },
+ { true, FT_INT, "WdtFileDataID" },
+ { true, FT_INT, "NavigationMaxDistance" },
+ { true, FT_INT, "Flags1" },
+ { true, FT_INT, "Flags2" },
+ { true, FT_INT, "Flags3" },
+ };
+
+ static constexpr DB2FileLoadInfo Instance{ Fields, 28, &MetaInstance };
};
#endif // ExtractorDB2LoadInfo_h__
diff --git a/src/tools/map_extractor/System.cpp b/src/tools/map_extractor/System.cpp
index 6257e4c6ff2..ee57b149825 100644
--- a/src/tools/map_extractor/System.cpp
+++ b/src/tools/map_extractor/System.cpp
@@ -270,9 +270,9 @@ void ReadMapDBC()
{
printf("Read Map.db2 file...\n");
- DB2CascFileSource source(CascStorage, MapLoadInfo::Instance()->Meta->FileDataId);
+ DB2CascFileSource source(CascStorage, MapLoadInfo::Instance.Meta->FileDataId);
DB2FileLoader db2;
- TryLoadDB2("Map.db2", &source, &db2, MapLoadInfo::Instance());
+ TryLoadDB2("Map.db2", &source, &db2, &MapLoadInfo::Instance);
map_ids.reserve(db2.GetRecordCount());
std::unordered_map<uint32, std::size_t> idToIndex;
@@ -315,9 +315,9 @@ void ReadLiquidMaterialTable()
{
printf("Read LiquidMaterial.db2 file...\n");
- DB2CascFileSource source(CascStorage, LiquidMaterialLoadInfo::Instance()->Meta->FileDataId);
+ DB2CascFileSource source(CascStorage, LiquidMaterialLoadInfo::Instance.Meta->FileDataId);
DB2FileLoader db2;
- TryLoadDB2("LiquidMaterial.db2", &source, &db2, LiquidMaterialLoadInfo::Instance());
+ TryLoadDB2("LiquidMaterial.db2", &source, &db2, &LiquidMaterialLoadInfo::Instance);
for (uint32 x = 0; x < db2.GetRecordCount(); ++x)
{
@@ -339,9 +339,9 @@ void ReadLiquidObjectTable()
{
printf("Read LiquidObject.db2 file...\n");
- DB2CascFileSource source(CascStorage, LiquidObjectLoadInfo::Instance()->Meta->FileDataId);
+ DB2CascFileSource source(CascStorage, LiquidObjectLoadInfo::Instance.Meta->FileDataId);
DB2FileLoader db2;
- TryLoadDB2("LiquidObject.db2", &source, &db2, LiquidObjectLoadInfo::Instance());
+ TryLoadDB2("LiquidObject.db2", &source, &db2, &LiquidObjectLoadInfo::Instance);
for (uint32 x = 0; x < db2.GetRecordCount(); ++x)
{
@@ -363,9 +363,9 @@ void ReadLiquidTypeTable()
{
printf("Read LiquidType.db2 file...\n");
- DB2CascFileSource source(CascStorage, LiquidTypeLoadInfo::Instance()->Meta->FileDataId);
+ DB2CascFileSource source(CascStorage, LiquidTypeLoadInfo::Instance.Meta->FileDataId);
DB2FileLoader db2;
- TryLoadDB2("LiquidType.db2", &source, &db2, LiquidTypeLoadInfo::Instance());
+ TryLoadDB2("LiquidType.db2", &source, &db2, &LiquidTypeLoadInfo::Instance);
for (uint32 x = 0; x < db2.GetRecordCount(); ++x)
{
@@ -388,9 +388,9 @@ bool ReadCinematicCameraDBC()
{
printf("Read CinematicCamera.db2 file...\n");
- DB2CascFileSource source(CascStorage, CinematicCameraLoadInfo::Instance()->Meta->FileDataId);
+ DB2CascFileSource source(CascStorage, CinematicCameraLoadInfo::Instance.Meta->FileDataId);
DB2FileLoader db2;
- TryLoadDB2("CinematicCamera.db2", &source, &db2, CinematicCameraLoadInfo::Instance());
+ TryLoadDB2("CinematicCamera.db2", &source, &db2, &CinematicCameraLoadInfo::Instance);
// get camera file list from DB2
for (size_t i = 0; i < db2.GetRecordCount(); ++i)
diff --git a/src/tools/mmaps_generator/PathGenerator.cpp b/src/tools/mmaps_generator/PathGenerator.cpp
index 9f7afb54048..59c087a514f 100644
--- a/src/tools/mmaps_generator/PathGenerator.cpp
+++ b/src/tools/mmaps_generator/PathGenerator.cpp
@@ -330,7 +330,7 @@ std::unordered_map<uint32, uint8> LoadLiquid(std::string const& locale, bool sil
DB2FileSystemSource liquidTypeSource((boost::filesystem::path("dbc") / locale / "LiquidType.db2").string());
try
{
- liquidDb2.Load(&liquidTypeSource, LiquidTypeLoadInfo::Instance());
+ liquidDb2.Load(&liquidTypeSource, &LiquidTypeLoadInfo::Instance);
for (uint32 x = 0; x < liquidDb2.GetRecordCount(); ++x)
{
DB2Record record = liquidDb2.GetRecord(x);
@@ -358,7 +358,7 @@ std::unordered_map<uint32, std::vector<uint32>> LoadMap(std::string const& local
DB2FileSystemSource mapSource((boost::filesystem::path("dbc") / locale / "Map.db2").string());
try
{
- mapDb2.Load(&mapSource, MapLoadInfo::Instance());
+ mapDb2.Load(&mapSource, &MapLoadInfo::Instance);
for (uint32 x = 0; x < mapDb2.GetRecordCount(); ++x)
{
DB2Record record = mapDb2.GetRecord(x);
diff --git a/src/tools/vmap4_extractor/gameobject_extract.cpp b/src/tools/vmap4_extractor/gameobject_extract.cpp
index a553301ee6c..78d95ff2669 100644
--- a/src/tools/vmap4_extractor/gameobject_extract.cpp
+++ b/src/tools/vmap4_extractor/gameobject_extract.cpp
@@ -78,11 +78,11 @@ void ExtractGameobjectModels()
{
printf("Extracting GameObject models...\n");
- DB2CascFileSource source(CascStorage, GameobjectDisplayInfoLoadInfo::Instance()->Meta->FileDataId);
+ DB2CascFileSource source(CascStorage, GameobjectDisplayInfoLoadInfo::Instance.Meta->FileDataId);
DB2FileLoader db2;
try
{
- db2.Load(&source, GameobjectDisplayInfoLoadInfo::Instance());
+ db2.Load(&source, &GameobjectDisplayInfoLoadInfo::Instance);
}
catch (std::exception const& e)
{
diff --git a/src/tools/vmap4_extractor/vmapexport.cpp b/src/tools/vmap4_extractor/vmapexport.cpp
index b839ee4d5e7..ef54f40d49f 100644
--- a/src/tools/vmap4_extractor/vmapexport.cpp
+++ b/src/tools/vmap4_extractor/vmapexport.cpp
@@ -524,11 +524,11 @@ int main(int argc, char ** argv)
{
printf("Read Map.dbc file... ");
- DB2CascFileSource source(CascStorage, MapLoadInfo::Instance()->Meta->FileDataId);
+ DB2CascFileSource source(CascStorage, MapLoadInfo::Instance.Meta->FileDataId);
DB2FileLoader db2;
try
{
- db2.Load(&source, MapLoadInfo::Instance());
+ db2.Load(&source, &MapLoadInfo::Instance);
}
catch (std::exception const& e)
{