aboutsummaryrefslogtreecommitdiffstats
path: root/Malmstone/Services/PVPService.cs
blob: cf08feae0445d835d9c5316fb7bdf08b47bde4ad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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; }
    }
}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage