Skip to content

Commit

Permalink
Add AgentHelpers (#1308)
Browse files Browse the repository at this point in the history
  • Loading branch information
Haselnussbomber authored Feb 15, 2025
1 parent bd9bbae commit 0ff3c0f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
15 changes: 13 additions & 2 deletions FFXIVClientStructs/FFXIV/Client/UI/Agent/AgentModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,29 @@ public unsafe partial struct AgentModule {
[FieldOffset(0x18)] public float FrameDelta;

[FieldOffset(0x20), FixedSizeArray] internal FixedSizeArray452<Pointer<AgentInterface>> _agents;
[FieldOffset(0xE40)] public UIModuleAgentModulePtrStruct UIModuleAgentModulePtr;
[FieldOffset(0xE40), Obsolete("Renamed to AgentHelpers")] public UIModuleAgentModulePtrStruct UIModuleAgentModulePtr;
[FieldOffset(0xE40)] public AgentHelpers AgentHelpers;

[MemberFunction("E8 ?? ?? ?? ?? 83 7B 48 00")]
public partial AgentInterface* GetAgentByInternalId(AgentId agentId);

[StructLayout(LayoutKind.Explicit, Size = 0x10)]
public unsafe struct UIModuleAgentModulePtrStruct {
public unsafe struct UIModuleAgentModulePtrStruct { // TODO: remove
[FieldOffset(0x0)] public UIModule* UIModule;
[FieldOffset(0x8)] public AgentModule* AgentModule;
}
}

[GenerateInterop]
[StructLayout(LayoutKind.Explicit, Size = 0x10)]
public unsafe partial struct AgentHelpers {
[FieldOffset(0x0)] public UIModule* UIModule;
[FieldOffset(0x8)] public AgentModule* AgentModule;

[MemberFunction("E8 ?? ?? ?? ?? 8B B7 ?? ?? ?? ?? 45 33 FF")]
public partial void HideBlockingCharaViewAgents(uint clientObjectIndex, AgentId allowedAgent);
}

public enum AgentId : uint {
Lobby = 0,
CharaMake = 1,
Expand Down
4 changes: 3 additions & 1 deletion FFXIVClientStructs/FFXIV/Client/UI/UIModuleInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ public unsafe partial struct UIModuleInterface {
[VirtualFunction(35)] public partial InfoModule* GetInfoModule();
[VirtualFunction(36)] public partial UIModuleHelpers* GetUIModuleHelpers();
[VirtualFunction(37)] public partial AgentModule* GetAgentModule();
[VirtualFunction(38)] public partial AgentModule.UIModuleAgentModulePtrStruct* GetUIModuleAgentModulePtr();
[VirtualFunction(38), Obsolete("Renamed to GetAgentHelpers")] public partial AgentModule.UIModuleAgentModulePtrStruct* GetUIModuleAgentModulePtr();
[VirtualFunction(38)] public partial AgentHelpers* GetAgentHelpers();
[VirtualFunction(39)] public partial UI3DModule* GetUI3DModule();
// [VirtualFunction(40)] public partial Vf40Struct* GetVf40Struct();
// [VirtualFunction(41)] public partial Vf41Struct* GetVf40Struct();
Expand Down Expand Up @@ -172,6 +173,7 @@ public enum UIModulePacketType {
ClassJobChange = 2,
LevelChange = 3,
ShowLogMessage = 4,
Login = 6,
Logout = 7,
CloseLogoutDialog = 8,
StartLogoutCountdown = 9,
Expand Down
12 changes: 11 additions & 1 deletion ida/data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5280,6 +5280,16 @@ classes:
0x14024E0B0: PropagateGameEvent
0x14024E310: PropagateLevelChange
0x14024E370: PropagateClassJobChange
Client::UI::Agent::AgentHelpers:
funcs:
0x140246840: SearchForRecipesUsingItem
0x140246860: ShowDescription
0x140246880: HideDescription
0x1402468A0: ViewArchiveItem
0x1402468C0: OpenMiragePrismPrismSetPreviewForItemId
0x1402468E0: IsItemPartOfMirageStoreSet
0x1402468F0: HandleFittingShopUpdatePacket
0x140246910: HideBlockingCharaViewAgents
Client::UI::Agent::AgentEventFade:
vtbls:
- ea: 0x141F38F50
Expand Down Expand Up @@ -7708,7 +7718,7 @@ classes:
35: GetInfoModule
36: GetUIModuleHelpers
37: GetAgentModule
38: GetUIModuleAgentModulePtr
38: GetAgentHelpers
39: GetUI3DModule
42: GetEmoteHistoryModule
43: GetMinionListModule
Expand Down

0 comments on commit 0ff3c0f

Please sign in to comment.