diff --git a/FFXIVClientStructs/FFXIV/Client/UI/Arrays/PartyListStringArray.cs b/FFXIVClientStructs/FFXIV/Client/UI/Arrays/PartyListStringArray.cs new file mode 100644 index 0000000000..93f6ee94fb --- /dev/null +++ b/FFXIVClientStructs/FFXIV/Client/UI/Arrays/PartyListStringArray.cs @@ -0,0 +1,51 @@ +using FFXIVClientStructs.FFXIV.Component.GUI; + +namespace FFXIVClientStructs.FFXIV.Client.UI.Arrays; + +[GenerateInterop] +[StructLayout(LayoutKind.Explicit, Size = 397 * 8)] +public unsafe partial struct PartyListStringArray { + public static PartyListStringArray* Instance() { + var stringArray = AtkStage.Instance()->GetStringArrayData(StringArrayType.PartyList); + return stringArray == null ? null : (PartyListStringArray*)stringArray->StringArray; + } + + [FieldOffset(0 * 8), FixedSizeArray, CExporterIgnore] internal FixedSizeArray397 _data; + + [FieldOffset(0 * 8)] public CStringPointer EmnityMarker; + + [FieldOffset(3 * 8)] public CStringPointer ChocoboRemainingTime; + [FieldOffset(4 * 8)] public CStringPointer PartyType; + [FieldOffset(5 * 8)] public CStringPointer ExpBonusPercentage; + + [FieldOffset(6 * 8), FixedSizeArray, CExporterIgnore] internal FixedSizeArray8 _partyMembers; + + [FieldOffset(191 * 8), FixedSizeArray, CExporterIgnore] internal FixedSizeArray7 _trustMembers; + + [FieldOffset(352 * 8), FixedSizeArray, CExporterIgnore] internal FixedSizeArray8 _pets; + + [GenerateInterop] + [StructLayout(LayoutKind.Explicit, Size = 23 * 8)] + public partial struct PartyListMemberStringArray { + [FieldOffset(0 * 8), FixedSizeArray, CExporterIgnore] internal FixedSizeArray23 _data; + + [FieldOffset(0 * 8)] public CStringPointer PartyIndex; + [FieldOffset(1 * 8)] public CStringPointer MemberNameAndLevel; + [FieldOffset(2 * 8)] public CStringPointer CurrentCast; + + [FieldOffset(3 * 8), FixedSizeArray, CExporterIgnore] internal FixedSizeArray10 _statusTimesLeft; + [FieldOffset(13 * 8), FixedSizeArray, CExporterIgnore] internal FixedSizeArray10 _statusTooltips; + } + + [GenerateInterop] + [StructLayout(LayoutKind.Explicit, Size = 22 * 8)] + public partial struct PartyListPetStringArray { + [FieldOffset(0 * 8), FixedSizeArray, CExporterIgnore] internal FixedSizeArray22 _data; + + [FieldOffset(0 * 8)] public CStringPointer PetNameAndLevel; + [FieldOffset(1 * 8)] public CStringPointer CurrentCast; + + [FieldOffset(2 * 8), FixedSizeArray, CExporterIgnore] internal FixedSizeArray10 _statusTimesLeft; + [FieldOffset(12 * 8), FixedSizeArray, CExporterIgnore] internal FixedSizeArray10 _statusTooltips; + } +} diff --git a/FFXIVClientStructs/FFXIV/Client/UI/Arrays/PvPMKSNumberArray.cs b/FFXIVClientStructs/FFXIV/Client/UI/Arrays/PvPMKSNumberArray.cs new file mode 100644 index 0000000000..a297220f26 --- /dev/null +++ b/FFXIVClientStructs/FFXIV/Client/UI/Arrays/PvPMKSNumberArray.cs @@ -0,0 +1,111 @@ +using FFXIVClientStructs.FFXIV.Component.GUI; + +namespace FFXIVClientStructs.FFXIV.Client.UI.Arrays; + +[GenerateInterop] +[StructLayout(LayoutKind.Explicit, Size = 604 * 4)] +public unsafe partial struct PvPMKSNumberArray { + public static PvPMKSNumberArray* Instance() { + var numberArray = AtkStage.Instance()->GetNumberArrayData(NumberArrayType.PvPMKS); + return numberArray == null ? null : (PvPMKSNumberArray*)numberArray->IntArray; + } + + [FieldOffset(0), FixedSizeArray, CExporterIgnore] internal FixedSizeArray604 _data; + + /// + /// In Seconds. + /// + [FieldOffset(0 * 4)] public int TimeRemaining; + [FieldOffset(1 * 4)] public bool IsInOvertime; + /// + /// Range 0 - 1000 + /// + [FieldOffset(2 * 4)] public int OvertimeBarFillPercentage; + + // I think has something to do with, ranked or casual or premade + [FieldOffset(3 * 4)] private int Unk3; + // I think has to do with what team you are on. + [FieldOffset(4 * 4)] private int Unk4; + + /// + /// Range -1000 - 1000 + /// + [FieldOffset(6 * 4)] public int CrystalPushPercentage; + + [FieldOffset(7 * 4)] public CrystalGaugeType CrystalGaugeMode; + /// + /// Your own target entityId + /// + [FieldOffset(8 * 4)] public uint TargetEntityId; + [FieldOffset(9 * 4)] private uint UnkEntityId; + + /// + /// Holds all the UI data for team Umbra + /// + [FieldOffset(10 * 4)] public PvPMKSTeamNumberArray UmbraTeam; + /// + /// Holds all the UI data for team Astra + /// + [FieldOffset(306 * 4)] public PvPMKSTeamNumberArray AstraTeam; + + [GenerateInterop] + [StructLayout(LayoutKind.Explicit, Size = 297 * 4)] + public partial struct PvPMKSTeamNumberArray { + [FieldOffset(0), FixedSizeArray, CExporterIgnore] internal FixedSizeArray297 _data; + + [FieldOffset(0 * 4)] public uint CrystalPushPercentage; + [FieldOffset(1 * 4)] public uint Unk1; + [FieldOffset(2 * 4)] public uint MidPointCapPercentage; + [FieldOffset(5 * 4)] public uint AmountOfPlayersOnPoint; + + [FieldOffset(17 * 4), FixedSizeArray] internal FixedSizeArray5 _teamMembers; + + [GenerateInterop] + [StructLayout(LayoutKind.Explicit, Size = 56 * 4)] + public partial struct PvpMKSTeamMemberNumberArray { + [FieldOffset(0), FixedSizeArray, CExporterIgnore] internal FixedSizeArray56 _data; + + [FieldOffset(0 * 4)] public uint EntityId; + [FieldOffset(1 * 4)] public bool IsTargetable; + [FieldOffset(2 * 4)] private uint Unk2; // I think these are flags or colours. + [FieldOffset(3 * 4)] private uint Unk3; // I think these are flags or colours. + [FieldOffset(4 * 4)] public uint JobIconId; + [FieldOffset(5 * 4)] public uint MarkerIconId; + [FieldOffset(6 * 4)] public uint CurrentHp; + [FieldOffset(7 * 4)] public uint MaxHp; + /// + /// Range 0 - 200 + /// + [FieldOffset(8 * 4)] public uint ShieldPercentage; + [FieldOffset(9 * 4)] public uint CurrentMana; + [FieldOffset(10 * 4)] public uint MaxMana; + /// + /// Range 0 - 100 + /// + [FieldOffset(11 * 4)] public uint LimitBreakChargePercentage; + /// + /// Range 0 - 100 + /// + [FieldOffset(12 * 4)] public uint CastBarPercentage; + /// + /// In seconds + /// + [FieldOffset(13 * 4)] public uint RespawnTimeRemaining; + [FieldOffset(14 * 4)] public uint StatusCount; + [FieldOffset(15 * 4), FixedSizeArray] internal FixedSizeArray10 _statusIds; + [FieldOffset(25 * 4), FixedSizeArray] internal FixedSizeArray10 _statusStackCounts; + [FieldOffset(35 * 4), FixedSizeArray] internal FixedSizeArray10 _statusIconIds; + [FieldOffset(45 * 4), FixedSizeArray] internal FixedSizeArray10 _statusDispellables; + } + } + + public enum CrystalGaugeType { + CrystalLocked = 0, + CrystalUncontested = 1, + CrystalUmbraExclusiveContest = 2, + CrystalUmbraCappingMidwayPoint = 3, + CrystalAstraExclusiveContest = 4, + CrystalAstraCappingMidwayPoint = 5, + CrystalEquallyContested = 6, + } +} diff --git a/FFXIVClientStructs/FFXIV/Client/UI/Arrays/PvPMKSStringArray.cs b/FFXIVClientStructs/FFXIV/Client/UI/Arrays/PvPMKSStringArray.cs new file mode 100644 index 0000000000..482c860593 --- /dev/null +++ b/FFXIVClientStructs/FFXIV/Client/UI/Arrays/PvPMKSStringArray.cs @@ -0,0 +1,34 @@ +using FFXIVClientStructs.FFXIV.Component.GUI; + +namespace FFXIVClientStructs.FFXIV.Client.UI.Arrays; + +[GenerateInterop] +[StructLayout(LayoutKind.Explicit, Size = 131 * 8)] +public unsafe partial struct PvPMKSStringArray { + public static PvPMKSStringArray* Instance() { + var stringArray = AtkStage.Instance()->GetStringArrayData(StringArrayType.PvPMKS); + return stringArray == null ? null : (PvPMKSStringArray*)stringArray->StringArray; + } + + [FieldOffset(0 * 8), FixedSizeArray, CExporterIgnore] internal FixedSizeArray131 _data; + + [FieldOffset(0 * 8)] public CStringPointer AstraLabel; + [FieldOffset(1 * 8)] public CStringPointer UmbraLabel; + [FieldOffset(2 * 8)] public CStringPointer AstraPercentageCappedLabel; + [FieldOffset(3 * 8)] public CStringPointer UmbraPercentageCappedLabel; + [FieldOffset(4 * 8)] public CStringPointer LocalPlayerMarker; + + [FieldOffset(5 * 8), FixedSizeArray, CExporterIgnore] internal FixedSizeArray5 _astraMembers; + [FieldOffset(70 * 8), FixedSizeArray, CExporterIgnore] internal FixedSizeArray5 _umbraMembers; + + [GenerateInterop] + [StructLayout(LayoutKind.Explicit, Size = 12 * 8)] + public partial struct PvPMKSPartyMemberStringArray { + [FieldOffset(0 * 8), FixedSizeArray, CExporterIgnore] internal FixedSizeArray12 _data; + + [FieldOffset(0 * 8)] public CStringPointer MemberNameAndLevel; + [FieldOffset(1 * 8)] public CStringPointer CurrentCast; + + [FieldOffset(2 * 8), FixedSizeArray, CExporterIgnore] internal FixedSizeArray10 _statusTimesLeft; + } +} diff --git a/FFXIVClientStructs/FFXIV/Client/UI/Arrays/PvPProfileNumberArray.cs b/FFXIVClientStructs/FFXIV/Client/UI/Arrays/PvPProfileNumberArray.cs new file mode 100644 index 0000000000..694297be0e --- /dev/null +++ b/FFXIVClientStructs/FFXIV/Client/UI/Arrays/PvPProfileNumberArray.cs @@ -0,0 +1,45 @@ +using FFXIVClientStructs.FFXIV.Component.GUI; + +namespace FFXIVClientStructs.FFXIV.Client.UI.Arrays; + +[GenerateInterop] +[StructLayout(LayoutKind.Explicit, Size = 336 * 4)] +public unsafe partial struct PvPProfileNumberArray { + public static PvPProfileNumberArray* Instance() { + var numberArray = AtkStage.Instance()->GetNumberArrayData(NumberArrayType.PvPProfile); + return numberArray == null ? null : (PvPProfileNumberArray*)numberArray->IntArray; + } + + [FieldOffset(0), FixedSizeArray, CExporterIgnore] internal FixedSizeArray336 _data; + + [FieldOffset(0 * 4)] public uint GrandCompanyType; + [FieldOffset(1 * 4)] public uint CurrentGrandCompanyPvPExperienceAmount; + [FieldOffset(2 * 4)] public uint MaxGrandCompanyPvPExperienceAmount; + [FieldOffset(3 * 4)] public uint CurrentGrandCompanyPvPLevel; + [FieldOffset(4 * 4)] public uint MaxGrandCompanyPvPLevel; + + [FieldOffset(5 * 4)] public uint CurrentMalmstoneExperienceAmount; + [FieldOffset(6 * 4)] public uint MaxMalmstoneExperienceAmount; + [FieldOffset(7 * 4)] public uint CurrentMalmstoneLevel; + [FieldOffset(8 * 4)] public uint MaxMalmstoneLevel; + [FieldOffset(22 * 4)] public uint CasualCrystallineConflictWins; + [FieldOffset(23 * 4)] public uint CasualCrystallineConflictLosses; + [FieldOffset(24 * 4)] public uint RankedCrystallineConflictWinsThisSeason; + [FieldOffset(25 * 4)] public uint RisersInRank; // This works differently in crystal naturally, but the value gets used. + [FieldOffset(26 * 4)] public uint StarsInRank; // 0 in crystal + [FieldOffset(27 * 4)] public uint HighestStarsInRank; // 0 in crystal + [FieldOffset(28 * 4)] public PvPRank HighestRank; + + // I actually think gold and platinum internally might be flipped. + public enum PvPRank { + Unranked = 0, + Bronze = 1, + Silver = 2, + Gold = 3, + Platinum = 4, + Diamond = 5, + Crystal = 6, + Omega = 7, + Ultima = 8, + } +}