Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AgentHelpers #1308

Merged
merged 1 commit into from
Feb 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -5257,6 +5257,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 @@ -7667,7 +7677,7 @@ classes:
35: GetInfoModule
36: GetUIModuleHelpers
37: GetAgentModule
38: GetUIModuleAgentModulePtr
38: GetAgentHelpers
39: GetUI3DModule
42: GetEmoteHistoryModule
43: GetMinionListModule
Expand Down