diff options
Diffstat (limited to 'Malmstone/Services/PVPService.cs')
| -rw-r--r-- | Malmstone/Services/PVPService.cs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Malmstone/Services/PVPService.cs b/Malmstone/Services/PVPService.cs new file mode 100644 index 0000000..cf08fea --- /dev/null +++ b/Malmstone/Services/PVPService.cs @@ -0,0 +1,32 @@ +using FFXIVClientStructs.FFXIV.Client.Game.UI; + +namespace Malmstone.Services +{ + public class PvPService + { + public PvPSeriesInfo? GetPvPSeriesInfo() + { + unsafe + { + var pvpProfile = PvPProfile.Instance(); + if (pvpProfile != null && pvpProfile->IsLoaded != 0) + { + return new PvPSeriesInfo + { + CurrentSeriesRank = pvpProfile->GetSeriesCurrentRank(), + ClaimedSeriesRank = pvpProfile->GetSeriesClaimedRank(), + SeriesExperience = pvpProfile->GetSeriesExperience() + }; + } + return null; + } + } + } + + public class PvPSeriesInfo + { + public byte CurrentSeriesRank { get; set; } + public byte ClaimedSeriesRank { get; set; } + public ushort SeriesExperience { get; set; } + } +} |
