Skip to content
Open
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
51 changes: 51 additions & 0 deletions FFXIVClientStructs/FFXIV/Client/UI/Arrays/PartyListStringArray.cs
Original file line number Diff line number Diff line change
@@ -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<CStringPointer> _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<PartyListMemberStringArray> _partyMembers;

[FieldOffset(191 * 8), FixedSizeArray, CExporterIgnore] internal FixedSizeArray7<PartyListPetStringArray> _trustMembers;

[FieldOffset(352 * 8), FixedSizeArray, CExporterIgnore] internal FixedSizeArray8<PartyListPetStringArray> _pets;

[GenerateInterop]
[StructLayout(LayoutKind.Explicit, Size = 23 * 8)]
public partial struct PartyListMemberStringArray {
[FieldOffset(0 * 8), FixedSizeArray, CExporterIgnore] internal FixedSizeArray23<CStringPointer> _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<CStringPointer> _statusTimesLeft;
[FieldOffset(13 * 8), FixedSizeArray, CExporterIgnore] internal FixedSizeArray10<CStringPointer> _statusTooltips;
}

[GenerateInterop]
[StructLayout(LayoutKind.Explicit, Size = 22 * 8)]
public partial struct PartyListPetStringArray {
[FieldOffset(0 * 8), FixedSizeArray, CExporterIgnore] internal FixedSizeArray22<CStringPointer> _data;

[FieldOffset(0 * 8)] public CStringPointer PetNameAndLevel;
[FieldOffset(1 * 8)] public CStringPointer CurrentCast;

[FieldOffset(2 * 8), FixedSizeArray, CExporterIgnore] internal FixedSizeArray10<CStringPointer> _statusTimesLeft;
[FieldOffset(12 * 8), FixedSizeArray, CExporterIgnore] internal FixedSizeArray10<CStringPointer> _statusTooltips;
}
}
111 changes: 111 additions & 0 deletions FFXIVClientStructs/FFXIV/Client/UI/Arrays/PvPMKSNumberArray.cs
Original file line number Diff line number Diff line change
@@ -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<int> _data;

/// <summary>
/// In Seconds.
/// </summary>
[FieldOffset(0 * 4)] public int TimeRemaining;
[FieldOffset(1 * 4)] public bool IsInOvertime;
/// <summary>
/// Range 0 - 1000
/// </summary>
[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;

/// <summary>
/// Range -1000 - 1000
/// </summary>
[FieldOffset(6 * 4)] public int CrystalPushPercentage;

[FieldOffset(7 * 4)] public CrystalGaugeType CrystalGaugeMode;
/// <summary>
/// Your own target entityId
/// </summary>
[FieldOffset(8 * 4)] public uint TargetEntityId;
[FieldOffset(9 * 4)] private uint UnkEntityId;

/// <summary>
/// Holds all the UI data for team Umbra
/// </summary>
[FieldOffset(10 * 4)] public PvPMKSTeamNumberArray UmbraTeam;
/// <summary>
/// Holds all the UI data for team Astra
/// </summary>
[FieldOffset(306 * 4)] public PvPMKSTeamNumberArray AstraTeam;

[GenerateInterop]
[StructLayout(LayoutKind.Explicit, Size = 297 * 4)]
public partial struct PvPMKSTeamNumberArray {
[FieldOffset(0), FixedSizeArray, CExporterIgnore] internal FixedSizeArray297<int> _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<PvpMKSTeamMemberNumberArray> _teamMembers;

[GenerateInterop]
[StructLayout(LayoutKind.Explicit, Size = 56 * 4)]
public partial struct PvpMKSTeamMemberNumberArray {
[FieldOffset(0), FixedSizeArray, CExporterIgnore] internal FixedSizeArray56<int> _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;
/// <summary>
/// Range 0 - 200
/// </summary>
[FieldOffset(8 * 4)] public uint ShieldPercentage;
[FieldOffset(9 * 4)] public uint CurrentMana;
[FieldOffset(10 * 4)] public uint MaxMana;
/// <summary>
/// Range 0 - 100
/// </summary>
[FieldOffset(11 * 4)] public uint LimitBreakChargePercentage;
/// <summary>
/// Range 0 - 100
/// </summary>
[FieldOffset(12 * 4)] public uint CastBarPercentage;
/// <summary>
/// In seconds
/// </summary>
[FieldOffset(13 * 4)] public uint RespawnTimeRemaining;
[FieldOffset(14 * 4)] public uint StatusCount;
[FieldOffset(15 * 4), FixedSizeArray] internal FixedSizeArray10<uint> _statusIds;
[FieldOffset(25 * 4), FixedSizeArray] internal FixedSizeArray10<uint> _statusStackCounts;
[FieldOffset(35 * 4), FixedSizeArray] internal FixedSizeArray10<uint> _statusIconIds;
[FieldOffset(45 * 4), FixedSizeArray] internal FixedSizeArray10<bool> _statusDispellables;
}
}

public enum CrystalGaugeType {
CrystalLocked = 0,
CrystalUncontested = 1,
CrystalUmbraExclusiveContest = 2,
CrystalUmbraCappingMidwayPoint = 3,
CrystalAstraExclusiveContest = 4,
CrystalAstraCappingMidwayPoint = 5,
CrystalEquallyContested = 6,
}
}
34 changes: 34 additions & 0 deletions FFXIVClientStructs/FFXIV/Client/UI/Arrays/PvPMKSStringArray.cs
Original file line number Diff line number Diff line change
@@ -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<CStringPointer> _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<PvPMKSPartyMemberStringArray> _astraMembers;
[FieldOffset(70 * 8), FixedSizeArray, CExporterIgnore] internal FixedSizeArray5<PvPMKSPartyMemberStringArray> _umbraMembers;

[GenerateInterop]
[StructLayout(LayoutKind.Explicit, Size = 12 * 8)]
public partial struct PvPMKSPartyMemberStringArray {
[FieldOffset(0 * 8), FixedSizeArray, CExporterIgnore] internal FixedSizeArray12<CStringPointer> _data;

[FieldOffset(0 * 8)] public CStringPointer MemberNameAndLevel;
[FieldOffset(1 * 8)] public CStringPointer CurrentCast;

[FieldOffset(2 * 8), FixedSizeArray, CExporterIgnore] internal FixedSizeArray10<CStringPointer> _statusTimesLeft;
}
}
45 changes: 45 additions & 0 deletions FFXIVClientStructs/FFXIV/Client/UI/Arrays/PvPProfileNumberArray.cs
Original file line number Diff line number Diff line change
@@ -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<int> _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,
}
}
Loading