From 2aaf543e61bf8dfe6dc8cc7c81aae8b6ff422227 Mon Sep 17 00:00:00 2001 From: gromchek Date: Sun, 26 Oct 2025 20:13:15 +0300 Subject: [PATCH 1/2] feat(profile): CCharacterComponent struct --- .../include/character/CCharacterComponent.h | 81 ++++++++ profile/3.3.5a-windows-386/include/main.h | 2 + .../include/map/CMapDoodadDef.h | 4 +- .../include/map/CMapEntity.h | 2 +- profile/3.3.5a-windows-386/x64dbg/types.json | 192 +++++++++++++++++- 5 files changed, 275 insertions(+), 6 deletions(-) create mode 100644 profile/3.3.5a-windows-386/include/character/CCharacterComponent.h diff --git a/profile/3.3.5a-windows-386/include/character/CCharacterComponent.h b/profile/3.3.5a-windows-386/include/character/CCharacterComponent.h new file mode 100644 index 0000000..01c9128 --- /dev/null +++ b/profile/3.3.5a-windows-386/include/character/CCharacterComponent.h @@ -0,0 +1,81 @@ +#ifndef CCHARACTERCOMPONENT_H +#define CCHARACTERCOMPONENT_H + +DECLARE_STRUCT(CCharacterComponent); +DECLARE_STRUCT(ComponentData); +DECLARE_STRUCT(ItemDisplay); + +#include "system/types.h" +#include "texture/texture.h" +#include "tempest/vector.h" +#include "m2/model.h" + +struct ComponentData +{ + int32_t raceID; + int32_t sexID; + int32_t classID; + int32_t hairColorID; + int32_t skinID; + int32_t faceID; + int32_t facialHairStyleID; + int32_t hairStyleID; + CM2Model* m2Model; + uint32_t flags; + char npcBackedTexturePath[260]; + uint32_t geosets[19]; + CTexture* characterBaseSkin; +}; + +struct ItemDisplay +{ + void* texture[7]; + uint32_t displayID[7]; + uint32_t displayFlag; +}; + +struct CCharacterComponent +{ + int32_t unk_000; + int32_t unk_004; + int32_t flags; + int32_t sections; + uint32_t objectIndex; + EGxTexFormat texFormat; + ComponentData componentData; + + // 0 - use in CreateRequest AL/AU/FO/HA/HL/HU/LL/LU/TL funcs ; use display info index 0, 1, 2, 3, 4, 5, 6, 7 + // 3 - use in CreateRequestHL func + // 4 - use in CreateRequestHU func + // 6 - use in CreateRequestHL func + // 7 - use in CreateRequestHU func + // 10 - use in CreateRequestHL func + // 11 - use in CreateRequestHU func + // 12 - use in CreateRequestLU func + // 13 - use in CreateRequestTU func + void* m_textureVariation[15]; + + // 0 - shirt/chest display + // 1 - chest/wrist/arms display + // 2 - arms display + // 3 - shirt/chest/tabard display + // 4 - shirt/chest/tabard display + // 5 - legs/belt display + // 6 - legs/feet display + // 7 - feet display + ItemDisplay itemDisplayInfo[10]; + + uint32_t itemModels[11]; + + int32_t unk_454; + int32_t unk_458; + int32_t unk_45C; + int32_t unk_460; + + uint32_t unkArray[50]; + + int32_t unk_52C; +}; + + +#endif \ No newline at end of file diff --git a/profile/3.3.5a-windows-386/include/main.h b/profile/3.3.5a-windows-386/include/main.h index 5ee800b..2085328 100644 --- a/profile/3.3.5a-windows-386/include/main.h +++ b/profile/3.3.5a-windows-386/include/main.h @@ -92,6 +92,8 @@ #include "map/CMapEntity.h" #include "map/CMapBaseObjLink.h" +#include "character/CCharacterComponent.h" + #include "net/message.h" #include "nvapi/nvapi.h" diff --git a/profile/3.3.5a-windows-386/include/map/CMapDoodadDef.h b/profile/3.3.5a-windows-386/include/map/CMapDoodadDef.h index e710b8f..05c7d48 100644 --- a/profile/3.3.5a-windows-386/include/map/CMapDoodadDef.h +++ b/profile/3.3.5a-windows-386/include/map/CMapDoodadDef.h @@ -40,7 +40,7 @@ struct CMapDoodadDef void* unk_m2Model_034; //0x34 C3Vector vec1; float unk_044; //0x44 - CAaBox bbox; + CAaBox bboxStaticEntity; C3Vector vec2; C3Vector position; float scale; //0x78 @@ -64,7 +64,7 @@ struct CMapDoodadDef int32_t unk_0B4; //0xB4 int32_t unk_0B8; //0xB8 int32_t unk_0BC; //0xBC - CAaBox bbox; + CAaBox bboxDoodadDef; C44Matrix mat; C44Matrix identity; int32_t unk_158; //0x158 sound diff --git a/profile/3.3.5a-windows-386/include/map/CMapEntity.h b/profile/3.3.5a-windows-386/include/map/CMapEntity.h index ddbd7eb..9da8f42 100644 --- a/profile/3.3.5a-windows-386/include/map/CMapEntity.h +++ b/profile/3.3.5a-windows-386/include/map/CMapEntity.h @@ -42,7 +42,7 @@ struct CMapEntity void* unk_m2Model_034; //0x34 C3Vector vec1; float unk_044; //0x44 - CAaBox bbox; + CAaBox bboxStaticEntity; C3Vector vec2; C3Vector position; float scale; //0x78 diff --git a/profile/3.3.5a-windows-386/x64dbg/types.json b/profile/3.3.5a-windows-386/x64dbg/types.json index b04d15e..94075df 100644 --- a/profile/3.3.5a-windows-386/x64dbg/types.json +++ b/profile/3.3.5a-windows-386/x64dbg/types.json @@ -9540,6 +9540,79 @@ } ] }, + { + "name": "ComponentData", + "size": 380, + "members": [ + { + "type": "int32_t", + "name": "raceID", + "offset": 0 + }, + { + "type": "int32_t", + "name": "sexID", + "offset": 4 + }, + { + "type": "int32_t", + "name": "classID", + "offset": 8 + }, + { + "type": "int32_t", + "name": "hairColorID", + "offset": 12 + }, + { + "type": "int32_t", + "name": "skinID", + "offset": 16 + }, + { + "type": "int32_t", + "name": "faceID", + "offset": 20 + }, + { + "type": "int32_t", + "name": "facialHairStyleID", + "offset": 24 + }, + { + "type": "int32_t", + "name": "hairStyleID", + "offset": 28 + }, + { + "type": "CM2Model*", + "name": "m2Model", + "offset": 32 + }, + { + "type": "uint32_t", + "name": "flags", + "offset": 36 + }, + { + "type": "char", + "name": "npcBackedTexturePath", + "arrsize": 260, + "offset": 40 + }, + { + "type": "uint32_t", + "name": "geosets", + "arrsize": 19, + "offset": 300 + }, + { + "type": "CTexture*", + "name": "characterBaseSkin", + "offset": 376 + } + ] + }, { "name": "CpuHardware", "size": 24, @@ -20282,6 +20355,29 @@ } ] }, + { + "name": "ItemDisplay", + "size": 60, + "members": [ + { + "type": "void*", + "name": "texture", + "arrsize": 7, + "offset": 0 + }, + { + "type": "uint32_t", + "name": "displayID", + "arrsize": 7, + "offset": 28 + }, + { + "type": "uint32_t", + "name": "displayFlag", + "offset": 56 + } + ] + }, { "name": "ItemDisplayInfoRec", "size": 100, @@ -34417,6 +34513,96 @@ } ] }, + { + "name": "CCharacterComponent", + "size": 1328, + "members": [ + { + "type": "int32_t", + "name": "unk_000", + "offset": 0 + }, + { + "type": "int32_t", + "name": "unk_004", + "offset": 4 + }, + { + "type": "int32_t", + "name": "flags", + "offset": 8 + }, + { + "type": "int32_t", + "name": "sections", + "offset": 12 + }, + { + "type": "uint32_t", + "name": "objectIndex", + "offset": 16 + }, + { + "type": "EGxTexFormat", + "name": "texFormat", + "offset": 20 + }, + { + "type": "ComponentData", + "name": "componentData", + "offset": 24 + }, + { + "type": "void*", + "name": "m_textureVariation", + "arrsize": 15, + "offset": 404 + }, + { + "type": "ItemDisplay", + "name": "itemDisplayInfo", + "arrsize": 10, + "offset": 464 + }, + { + "type": "uint32_t", + "name": "itemModels", + "arrsize": 11, + "offset": 1064 + }, + { + "type": "int32_t", + "name": "unk_454", + "offset": 1108 + }, + { + "type": "int32_t", + "name": "unk_458", + "offset": 1112 + }, + { + "type": "int32_t", + "name": "unk_45C", + "offset": 1116 + }, + { + "type": "int32_t", + "name": "unk_460", + "offset": 1120 + }, + { + "type": "uint32_t", + "name": "unkArray", + "arrsize": 50, + "offset": 1124 + }, + { + "type": "int32_t", + "name": "unk_52C", + "offset": 1324 + } + ] + }, { "name": "EVENT_DATA_KEY", "size": 24, @@ -51922,7 +52108,7 @@ }, { "type": "CAaBox", - "name": "bbox", + "name": "bboxStaticEntity", "offset": 72 }, { @@ -52027,7 +52213,7 @@ }, { "type": "CAaBox", - "name": "bbox", + "name": "bboxDoodadDef", "offset": 192 }, { @@ -53437,7 +53623,7 @@ }, { "type": "CAaBox", - "name": "bbox", + "name": "bboxStaticEntity", "offset": 72 }, { From 9e800fc5cc814298f370a0bd0841232031164f4c Mon Sep 17 00:00:00 2001 From: gromchek Date: Sun, 26 Oct 2025 20:32:07 +0300 Subject: [PATCH 2/2] feat(profile): fix CCharacterComponent struct --- .../include/character/CCharacterComponent.h | 21 ++++++++++--------- profile/3.3.5a-windows-386/x64dbg/types.json | 14 ++++++------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/profile/3.3.5a-windows-386/include/character/CCharacterComponent.h b/profile/3.3.5a-windows-386/include/character/CCharacterComponent.h index 01c9128..c51a349 100644 --- a/profile/3.3.5a-windows-386/include/character/CCharacterComponent.h +++ b/profile/3.3.5a-windows-386/include/character/CCharacterComponent.h @@ -22,9 +22,8 @@ struct ComponentData int32_t hairStyleID; CM2Model* m2Model; uint32_t flags; - char npcBackedTexturePath[260]; - uint32_t geosets[19]; - CTexture* characterBaseSkin; + char npcBakedTexturePath[260]; + uint32_t geosets[19]; }; struct ItemDisplay @@ -43,8 +42,10 @@ struct CCharacterComponent uint32_t objectIndex; EGxTexFormat texFormat; ComponentData componentData; - - // 0 - use in CreateRequest AL/AU/FO/HA/HL/HU/LL/LU/TL funcs ; use display info index 0, 1, 2, 3, 4, 5, 6, 7 + + CTexture* characterBaseSkin; + + // 0 - use in CreateRequest AL/AU/FO/HA/HL/HU/LL/LU/TL funcs ; use display info index 0, 1, 2, 3, 4, 5, 6, 7 // 3 - use in CreateRequestHL func // 4 - use in CreateRequestHU func // 6 - use in CreateRequestHL func @@ -54,7 +55,7 @@ struct CCharacterComponent // 12 - use in CreateRequestLU func // 13 - use in CreateRequestTU func void* m_textureVariation[15]; - + // 0 - shirt/chest display // 1 - chest/wrist/arms display // 2 - arms display @@ -63,16 +64,16 @@ struct CCharacterComponent // 5 - legs/belt display // 6 - legs/feet display // 7 - feet display - ItemDisplay itemDisplayInfo[10]; - - uint32_t itemModels[11]; + ItemDisplay itemDisplayInfo[10]; + + uint32_t itemModels[11]; int32_t unk_454; int32_t unk_458; int32_t unk_45C; int32_t unk_460; - uint32_t unkArray[50]; + uint32_t unkArray[50]; int32_t unk_52C; }; diff --git a/profile/3.3.5a-windows-386/x64dbg/types.json b/profile/3.3.5a-windows-386/x64dbg/types.json index 94075df..dd43d0d 100644 --- a/profile/3.3.5a-windows-386/x64dbg/types.json +++ b/profile/3.3.5a-windows-386/x64dbg/types.json @@ -9542,7 +9542,7 @@ }, { "name": "ComponentData", - "size": 380, + "size": 376, "members": [ { "type": "int32_t", @@ -9596,7 +9596,7 @@ }, { "type": "char", - "name": "npcBackedTexturePath", + "name": "npcBakedTexturePath", "arrsize": 260, "offset": 40 }, @@ -9605,11 +9605,6 @@ "name": "geosets", "arrsize": 19, "offset": 300 - }, - { - "type": "CTexture*", - "name": "characterBaseSkin", - "offset": 376 } ] }, @@ -34552,6 +34547,11 @@ "name": "componentData", "offset": 24 }, + { + "type": "CTexture*", + "name": "characterBaseSkin", + "offset": 400 + }, { "type": "void*", "name": "m_textureVariation",