Skip to content

Commit

Permalink
Merge pull request aers#847 from Haselnussbomber/update-agentlobby
Browse files Browse the repository at this point in the history
Update AgentLobby
  • Loading branch information
pohky authored Apr 24, 2024
2 parents f4e5bdc + fc0fcee commit c8e0ee6
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 6 deletions.
48 changes: 42 additions & 6 deletions FFXIVClientStructs/FFXIV/Client/UI/Agent/AgentLobby.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using FFXIVClientStructs.FFXIV.Client.System.String;
using FFXIVClientStructs.FFXIV.Component.Excel;
using FFXIVClientStructs.FFXIV.Component.GUI;
using FFXIVClientStructs.FFXIV.Component.Text;

namespace FFXIVClientStructs.FFXIV.Client.UI.Agent;

Expand All @@ -15,28 +16,55 @@ public unsafe partial struct AgentLobby {

[FieldOffset(0x40)] public LobbyData LobbyData; // for lack of a better name
[FieldOffset(0xA00)] public UIModule* UIModule;
[FieldOffset(0xA08)] internal nint TitleScreenMoviePtr;

[FieldOffset(0xA30)] public uint AccountExpansion;
[FieldOffset(0xA34)] public bool ShowFreeTrialLogo;

[FieldOffset(0xA38)] public uint TitleScreenExpansion;
[FieldOffset(0xA3C)] public bool ShowOriginalLogo; // pre-relaunch

[FieldOffset(0xA40)] public ExcelSheet* ErrorSheet;
[FieldOffset(0xA48)] public ExcelSheet* LobbySheet;
//[FieldOffset(0xA50)] public NetworkModuleProxy* NetworkModuleProxy;
[FieldOffset(0xA50)] public NetworkModuleProxy* NetworkModuleProxy;
[FieldOffset(0xA58)] public StdDeque<TextParameter> LobbyTextParameters;
[FixedSizeArray<Utf8String>(13)]
[FieldOffset(0xA80)] public fixed byte Utf8StringsData[0x68 * 13];

[FieldOffset(0x10E0)] public sbyte ServiceAccountIndex;
[FieldOffset(0x10E1)] public sbyte SelectedCharacterIndex; // index in CharaSelectCharacterList
[FieldOffset(0x10E8)] public ulong SelectedCharacterContentId;
[Obsolete("Renamed to HoveredCharacterIndex")]
[FieldOffset(0x10E1)] public sbyte SelectedCharacterIndex;
[FieldOffset(0x10E1)] public sbyte HoveredCharacterIndex; // index in CharaSelectCharacterList
[FieldOffset(0x10E8)] public ulong HoveredCharacterContentId;
[FieldOffset(0x10F0)] public byte DataCenter;

[FieldOffset(0x10F2)] public short WorldIndex; // index in CurrentDataCenterWorlds
[FieldOffset(0x10F4)] public ushort WorldId;

[FieldOffset(0x10F8)] public uint DialogAddonId;
[FieldOffset(0x10FC)] public uint DialogAddonId2;
[FieldOffset(0x1100)] public uint LobbyScreenTextAddonId;

[Obsolete("Invalid type: this field is a byte, not a bool. Use LobbyUpdateStage.")] // used for a switch in AgentLobby_Update
[FieldOffset(0x1104)] public bool RequestedDataReady;
[FieldOffset(0x1104)] public byte LobbyUpdateStage;

[FieldOffset(0x1107)] public byte LobbyUIStage;

[FieldOffset(0x1110)] public uint IdleTime;

[FieldOffset(0x1138)] public ulong SelectedCharacterContentId;
[FieldOffset(0x1140)] public bool IsLoggedIn;

[FieldOffset(0x1228)] public bool TemporaryLocked; // "Please wait and try logging in later."

[FieldOffset(0x1240)] public long RequestContentId;
[FieldOffset(0x1248)] public byte RequestCharaterIndex;
[FieldOffset(0x1DA4)] public bool HasShownCharacterNotFound; // "The character you last logged out with in this play environment could not be found on the current data center."

[MemberFunction("E8 ?? ?? ?? ?? 48 8D 8F ?? ?? ?? ?? 41 8B D6")]
public readonly partial void UpdateLobbyUIStage();

[MemberFunction("E8 ?? ?? ?? ?? 84 C0 74 07 C6 86 ?? ?? ?? ?? ?? 48 8B 8C 24")]
public readonly partial void UpdateCharaSelectDisplay(sbyte index, bool a2);

Expand Down Expand Up @@ -95,6 +123,7 @@ public unsafe struct LobbySubscriptionInfo // name probably totally wrong

[FieldOffset(0x30)] public uint TotalDaysSubscribed;
[FieldOffset(0x34)] public uint DaysRemaining;
[FieldOffset(0x38)] public uint DaysUntilNextVeteranRank;
}

[StructLayout(LayoutKind.Explicit, Size = 0x6F8)]
Expand All @@ -117,15 +146,22 @@ public unsafe partial struct CharaSelectCharacterEntry {

[MemberFunction("0F B6 41 ?? 84 05 ?? ?? ?? ?? 0F 94 C0")]
public partial bool IsNotLocked();

[MemberFunction("E8 ?? ?? ?? ?? 84 C0 75 0F 48 8B CB")]
public partial bool IsInDifferentRegion();
}

// see "E8 ?? ?? ?? ?? 44 0F B6 43 ?? 8D 57 7E"
public enum CharaSelectCharacterEntryLoginFlags : byte {
None = 0,
Locked = 1, // Lobby#64: "You cannot select this character with your current account."
NameChangeRequired = 2, // Lobby#26: "A name change is required to log in with this character."
ExpansionMissing = 4, // Lobby#68: "To log in with this character you must first install <ExVersion>."

DCTraveling = 16 // Lobby#1175: "This character is currently visiting the <value> data center."
[Obsolete("Renamed to MissingExVersionForLogin")]
ExpansionMissing = 4,
MissingExVersionForLogin = 4, // Lobby#68: "To log in with this character you must first install <ExVersion>."
MissingExVersionForCharacterEdit = 8, // Lobby#69: "To edit this character's race, sex, or appearance you must first install <ExVersion>."
DCTraveling = 16,// Lobby#1175: "This character is currently visiting the <value> data center."
Unk32 = 32, // unsure. sidebar should change to Lobby#1153 "TRAVELED TO" and might print LogMessage#5800 "Unable to execute command. Character is currently visiting the <string(lstr1)> data center."
}

[StructLayout(LayoutKind.Explicit, Size = 0x58)]
Expand Down
3 changes: 3 additions & 0 deletions FFXIVClientStructs/FFXIV/Component/GUI/AtkModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using FFXIVClientStructs.FFXIV.Client.System.Input.SoftKeyboards;
using FFXIVClientStructs.FFXIV.Client.System.String;
using FFXIVClientStructs.FFXIV.Client.UI;
using FFXIVClientStructs.FFXIV.Component.Excel;

namespace FFXIVClientStructs.FFXIV.Component.GUI;

Expand All @@ -12,6 +13,8 @@ public unsafe partial struct AtkModule {
[FieldOffset(0x0), CExportIgnore] public void* vtbl;
[FieldOffset(0x8)] public AtkExternalInterface AtkExternalInterface;

[FieldOffset(0x20)] public ExcelSheet* AddonSheet;

[FieldOffset(0x128)] public AtkStage* AtkStage;
[FieldOffset(0x130)] internal nint Resources;

Expand Down
44 changes: 44 additions & 0 deletions ida/data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3028,9 +3028,12 @@ classes:
0x1400B6660: OpenAddon
0x1400B6AB0: OpenAddonByAgent
0x1400B6DE0: OpenYesNo
0x1400B70F0: OpenSelectOk
0x1400B7050: OpenSelectOk2
0x1400CA390: OnUpdate_Nameplates
0x1400CB840: IncRefNumberArrayData
0x1400CB890: IncRefStringArrayData
0x1400CF0A0: GetStaticAddonName
0x1400DACD0: UpdateBattleCharaNameplates
0x1400DBB20: UpdateNpcNameplates
0x1400DDE90: IsUIVisible
Expand Down Expand Up @@ -3968,19 +3971,59 @@ classes:
base: Application::Network::LobbyClient::LobbyRequestCallback
funcs:
0x14023C3F0: ctor
Component::GUI::AtkMessageBoxManager::AtkMessageBoxEvent:
vtbls:
- ea: 0x1419DF580
Application::Network::LogoutCallbackInterface:
vtbls:
- ea: 0x1419DF588
vfuncs:
1: OnLogout
Application::Network::ZoneLoginCallbackInterface:
vtbls:
- ea: 0x1419DF598
vfuncs:
1: OnZoneLogin
Client::UI::Agent::AgentLobby:
vtbls:
- ea: 0x1419DF508
base: Client::UI::Agent::AgentInterface
funcs:
0x140255960: ctor
0x140255E00: Finalize
0x140259C60: UpdateLobbyUIStage
0x14025A6A0: UpdateCharaSelectDisplay
0x14025BEF0: SetDataCenter
0x14025FB20: OpenTitleDCWorldMap
0x14025FCC0: OpenTitleConnectDialog
0x140262790: OpenLoginWaitDialog
0x140262D80: OpenLobbyScreenText
0x140263620: CloseDialog
0x140264150: ShowCharacterNotFoundWarning
0x140264330: GetLobbyText
0x14031A960: SetupLobbyCamera
Client::UI::Agent::AgentLobby::LobbyData:
funcs:
0x140241A00: GetCharacterEntryByIndex
Client::UI::Agent::AgentLobby::LobbySubscriptionInfo:
funcs:
0x14161A230: GetDaysUntilNextVeteranRank
0x14161A240: GetDaysRemaining
0x14161A250: GetVeteranRewardRank
0x14161A260: GetTotalDaysSubscribed
Client::UI::Agent::AgentLobby::CharaSelectCharacterEntry:
funcs:
0x14023BED0: IsAnyRetainerNameChangeRequired
0x14023C040: IsInDifferentRegion
0x14161A2F0: IsNotLocked
0x14161A340: IsMissingExVersionForCharacterEdit
0x14161A350: IsDCTraveling
0x14161A370: IsUnk32
0x14161A380: IsMissingExVersionForLogin
0x14161A3D0: IsNameChangeRequired
Client::UI::Agent::AgentLobby::CharaSelectRetainerInfo:
funcs:
0x14161A3E0: IsNameChangeRequired
Client::UI::Agent::AgentCursor:
vtbls:
- ea: 0x1419DFD08
Expand Down Expand Up @@ -5318,6 +5361,7 @@ classes:
10: GetStringArrayData
11: GetExtendArrayData
17: SetHandlerFunction
21: CloseAddon
26: IsAddonReady
39: SetUIVisibility
58: Update
Expand Down

0 comments on commit c8e0ee6

Please sign in to comment.