Skip to content

Commit 271e97d

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents ce99215 + 63a95de commit 271e97d

9 files changed

Lines changed: 157 additions & 22 deletions

File tree

FFXIVClientStructs/FFXIV/Client/Game/Event/EventHandler.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using FFXIVClientStructs.FFXIV.Client.Game.Object;
22
using FFXIVClientStructs.FFXIV.Client.UI.Arrays;
3+
using FFXIVClientStructs.FFXIV.Common.Component.Excel;
34
using FFXIVClientStructs.FFXIV.Common.Lua;
45
using FFXIVClientStructs.FFXIV.Component.Text;
56

@@ -20,8 +21,16 @@ public unsafe partial struct EventHandler {
2021
[FieldOffset(0x88)] public SceneFlag SceneFlags;
2122

2223
[FieldOffset(0x94)] public LuaStatus LuaStatus;
23-
24-
[FieldOffset(0xC8)] private Utf8String UnkString0;
24+
[FieldOffset(0x98)] private ExcelSheetWaiter* UnkExcelSheetWaiter1;
25+
[FieldOffset(0xA0)] private ExcelSheet* UnkExcelSheet1;
26+
[FieldOffset(0xA8)] private ExcelSheetWaiter* UnkExcelSheetWaiter2;
27+
[FieldOffset(0xB0)] private ExcelSheet* UnkExcelSheet2;
28+
[FieldOffset(0xB8)] private ExcelSheetWaiter* UnkExcelSheetWaiter3;
29+
[FieldOffset(0xC0)] private ExcelSheet* UnkExcelSheet3;
30+
[FieldOffset(0xC8)] private Utf8String UnkSheetName; // sheet set to UnkExcelSheet3, for FormatStringCallback?
31+
32+
[FieldOffset(0x158)] private ExcelSheetWaiter* UnkExcelSheetWaiter4;
33+
[FieldOffset(0x160)] private ExcelSheet* UnkExcelSheet4; // TripleTriadCard, XBMBattleDetailAction
2534

2635
[VirtualFunction(0)]
2736
public partial EventHandler* Dtor(byte freeFlags);

FFXIVClientStructs/FFXIV/Client/UI/Agent/AgentHUD.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public unsafe partial struct Status {
154154
[FieldOffset(0xD)] public byte StatusIndex;
155155

156156
[MemberFunction("E8 ?? ?? ?? ?? 6B DD 2B")]
157-
public partial uint ProcessStatuses(int maxIndex, int entityId1, int entityId2, StatusManager* statusManager, PlayerState* playerState, char unk1, char unk2, char unk3, nint unk4, int unk5);
157+
public partial uint ProcessStatuses(int maxIndex, int entityId1, int entityId2, StatusManager* statusManager, PlayerState* playerState, char unk1, char unk2, char unk3, nint unk4, int unk5); // TODO: use bool instead of char
158158
}
159159

160160
[StructLayout(LayoutKind.Explicit, Size = 0xC, Pack = 0x4)]

FFXIVClientStructs/FFXIV/Client/UI/Info/InfoProxyCommonList.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@ public unsafe partial struct InfoProxyCommonList {
1717
[FieldOffset(0xA1)] public byte StringArrayIndex;
1818
[FieldOffset(0xA2)] public ushort DataSize;
1919
[FieldOffset(0xA4)] public ushort DictSize;
20-
[FieldOffset(0xA6)] private ushort UnkA6; //10 * DataSize
21-
[FieldOffset(0xA8)] private ushort UnkA8; //10 * DataSize
20+
[FieldOffset(0xA6)] public ushort NumberArrayEntryCountIndex; //10 * DataSize
21+
[FieldOffset(0xA8)] private ushort NumberArrayEntryCountIndex2; //10 * DataSize
22+
[FieldOffset(0xAA)] public ushort StringArrayGroupsCountIndex; // Addon#1696
2223
[FieldOffset(0xB0)] public CharacterData* CharData;
2324
[FieldOffset(0xB8)] public CharacterIndex* IndexData;
2425
[FieldOffset(0xC0)] public DisplayGroup FilterGroup;
25-
[FieldOffset(0xC4)] public byte MoveSelector; // 0x9 Not Selected or 0xB Selected
26+
[FieldOffset(0xC4)] public byte MoveSelector; // TODO: uint // 0x9 Not Selected or 0xB Selected
2627
[FieldOffset(0xCA)] public Sorting SortGroup;
2728
//[FieldOffset(0xAC)] private uint UnkAC; // Some kind of flag mask for OnlineStatus check InfoProxyCommonlist_vf14
2829

@@ -70,7 +71,7 @@ public partial struct CharacterData {
7071
[FieldOffset(0x20)] public uint ExtraFlags;
7172
// 4 bytes empty
7273
// 4 bytes unknown
73-
[FieldOffset(0x24)] public byte Sort;
74+
[FieldOffset(0x24)] public byte Sort; // TODO: ushort
7475
// 1 byte
7576
[FieldOffset(0x26)] public ushort CurrentWorld;
7677
[FieldOffset(0x28)] public ushort HomeWorld;

FFXIVClientStructs/FFXIV/Common/Component/Excel/ExcelLanguage.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
namespace FFXIVClientStructs.FFXIV.Common.Component.Excel;
22

3+
// Common::Component::Excel::ExcelLanguage
34
public enum ExcelLanguage {
45
None,
56
Japanese, // ja

FFXIVClientStructs/FFXIV/Common/Component/Excel/ExcelModule.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@ namespace FFXIVClientStructs.FFXIV.Common.Component.Excel;
66
[Inherits<ExcelResourceListener>]
77
[StructLayout(LayoutKind.Explicit, Size = 0x810)]
88
public unsafe partial struct ExcelModule {
9+
[FieldOffset(0x2C)] public ExcelLanguage Language;
10+
911
[FieldOffset(0x7A8)] public ExcelSheet** SheetsByIndex;
1012
}
Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,52 @@
1+
using FFXIVClientStructs.FFXIV.Component.Excel;
2+
13
namespace FFXIVClientStructs.FFXIV.Common.Component.Excel;
24

35
// Common::Component::Excel::ExcelSheet
46
// Common::Component::Excel::LinkList<Common::Component::Excel::ExcelSheet>
7+
[GenerateInterop]
58
[StructLayout(LayoutKind.Explicit, Size = 0x100)]
6-
public unsafe struct ExcelSheet {
9+
public unsafe partial struct ExcelSheet {
710
[FieldOffset(0x00), CExporterBaseType] public LinkList<ExcelSheet> Base;
811
[FieldOffset(0x18)] public ExcelLanguage Language;
912
[FieldOffset(0x20)] public CStringPointer SheetName; // 32 Bytes
1013
[FieldOffset(0x30)] public uint RowCount;
1114
[FieldOffset(0x38)] public ColumnInfo* ColumnDefinitions;
1215
[FieldOffset(0x40)] public uint DataOffset;
13-
//[FieldOffset(0x44)] public uint DataOffset2;
16+
[FieldOffset(0x44)] public uint RowLength; // in bytes
1417

1518
//[FieldOffset(0x70)] public LinkList<ExcelPage> ExcelPages;
19+
// 0x88 LinkList for subrows?
20+
21+
[FieldOffset(0xA8)] private uint CachedAllocatedRowCount; // not sure how it's cached yet. use the function which falls back to calling the function on RowResolver
1622

17-
//[FieldOffset(0xB0)] public IExcelPageRowResolver* RowResolver;
23+
[FieldOffset(0xB0)] public IExcelPageRowResolver* RowResolver;
1824

1925
[FieldOffset(0xD0)] public ExcelVariant Variant;
2026
[FieldOffset(0xD4)] public ushort ColumnCount;
27+
[FieldOffset(0xD6)] public short StartColumn; // initialized with -1. then, if -1, set to the current index in a loop over ColumnDefinitions. so technically always 0 unless there are no columns
2128

22-
[FieldOffset(0xD8)] public ushort Version; //?
29+
[FieldOffset(0xD8)] public ushort Version;
2330
[FieldOffset(0xDA)] public ushort SheetIndex;
2431

32+
[FieldOffset(0xF8)] public uint WaiterCount;
33+
34+
[MemberFunction("E8 ?? ?? ?? ?? 8B D0 BD")]
35+
public partial uint GetAllocatedRowCount();
36+
37+
[MemberFunction("E8 ?? ?? ?? ?? 48 8B 4F ?? 49 89 44 0E")]
38+
public partial IExcelRowWrapper* GetRowByDescriptor(ExcelRowDescriptor* descriptor, uint* outErrorCode = null);
39+
40+
[MemberFunction("E8 ?? ?? ?? ?? 8B D3 48 8B F8")]
41+
public partial IExcelRowWrapper* GetRowById(uint rowId, uint* outErrorCode = null);
42+
2543
public Span<ColumnInfo> ColumnDefinitionSpan => new(ColumnDefinitions, ColumnCount);
2644

27-
[StructLayout(LayoutKind.Sequential, Pack = 1)]
45+
[StructLayout(LayoutKind.Explicit, Size = 0x06)]
2846
public struct ColumnInfo {
29-
public ushort Type;
30-
public ushort Index;
31-
public ushort Offset;
47+
[FieldOffset(0x00), CExporterIgnore] private ExcelColumnType ColumnType;
48+
[FieldOffset(0x00)] public ushort Type; // TODO: use ExcelColumnType
49+
[FieldOffset(0x02)] public ushort Index;
50+
[FieldOffset(0x04)] public ushort Offset;
3251
}
3352
}

FFXIVClientStructs/FFXIV/Component/Excel/ExcelRow.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
using FFXIVClientStructs.FFXIV.Common.Component.Excel;
2+
13
namespace FFXIVClientStructs.FFXIV.Component.Excel;
24

35
// Component::Excel::ExcelRow
46
[GenerateInterop]
57
[StructLayout(LayoutKind.Explicit, Size = 0x10)]
68
public unsafe partial struct ExcelRow {
7-
[FieldOffset(0)] public void* Data;
9+
[FieldOffset(0x00)] public void* Data;
10+
[FieldOffset(0x08)] public ExcelSheet* Sheet;
811

912
[MemberFunction("E8 ?? ?? ?? ?? 0F BF 08")]
1013
public partial void* GetColumnPtr(uint columnIndex);
@@ -16,5 +19,8 @@ public unsafe partial struct ExcelRow {
1619
public static partial void* ResolveStringColumnIndirection(void* columnPtr);
1720

1821
[MemberFunction("E8 ?? ?? ?? ?? 33 FF 33 C9")]
22+
public partial CStringPointer GetColumnString(uint columnIndex);
23+
24+
[MemberFunction("E8 ?? ?? ?? ?? 33 FF 33 C9"), Obsolete("Use GetColumnString with columnIndex 0", true)]
1925
public partial CStringPointer GetFirstColumnAsString();
2026
}

ida/data.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4118,6 +4118,9 @@ classes:
41184118
funcs:
41194119
0x14207E8A0: ctor
41204120
0x14207FB20: ExcelSheetContainerFromData
4121+
0x14207FF50: GetLanguage
4122+
0x14207FFA0: GetSheetByIndex
4123+
0x14207FFC0: GetSheetByName
41214124
Common::Component::Environment::AllocatorInterface:
41224125
vtbls:
41234126
- ea: 0x14216D4E0
@@ -4694,7 +4697,22 @@ classes:
46944697
base: Common::Component::Excel::LinkList<Common::Component::Excel::ExcelSheet>
46954698
funcs:
46964699
0x14207B380: ctor
4700+
0x14207BB40: CopyFrom
46974701
0x14207CAE0: AddWaiter
4702+
0x14207D270: ClearAllocatedRows
4703+
0x14207D290: GetColumnIndex
4704+
0x14207DD00: GetAllocatedRowCount
4705+
0x14207DD20: GetStartColumn
4706+
0x14207DD30: GetSubRowByDescriptor
4707+
0x14207DE70: GetRowById
4708+
0x14207DFB0: GetColumnStringByDescriptor
4709+
0x14207E1C0: GetRowByDescriptor
4710+
0x14207E360: GetSheetName
4711+
0x14207E370: GetColumnOffset
4712+
0x14207E420: GetColumnIndex2
4713+
0x14207E430: GetColumnType
4714+
0x14207E450: GetColumnTypeLength
4715+
0x14207E460: GetWaiterCount
46984716
0x14207E7D0: RemoveWaiter
46994717
Component::Excel::ExcelPage:
47004718
funcs:
@@ -4749,7 +4767,8 @@ classes:
47494767
0x14207AB70: IsColumnRsv # (ExcelRow* this, size_t nColumnIndex) -> bool
47504768
0x14207A130: CalculateStringColumnHash # static (char* pStringOffsetBytes)
47514769
0x14207A470: ResolveStringColumnIndirection # static (char* pStringOffsetBytes)
4752-
0x14207AAE0: GetFirstColumnAsString
4770+
0x14207AAE0: GetColumnString
4771+
0x14207AB60: HasData
47534772
Component::Excel::ExcelRowDescriptor:
47544773
# size 0x08+
47554774
# 0x00: nRowId: int
@@ -15950,6 +15969,7 @@ classes:
1595015969
Client::Game::CallbackSheetWaiter<Client::Game::UI::QuestTodoList>:
1595115970
vtbls:
1595215971
- ea: 0x1421BA0A0
15972+
base: Common::Component::Excel::ExcelSheetWaiter
1595315973
Client::Game::Event::DailyQuestMap:
1595415974
funcs:
1595515975
0x140E05DC0: ctor

ida/ffxiv_structs.yml

Lines changed: 82 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)