diff options
| author | Pinapelz <yukais@pinapelz.com> | 2024-11-14 02:53:36 -0800 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2024-11-14 02:53:36 -0800 |
| commit | 6e0d1d4d2f7afd4501eb1ec1998319fb7d5bf425 (patch) | |
| tree | 8cb98ce32c18de797156822c3a4aca911f81b43e | |
| parent | 4b61a06d9c0af43fa475414af68f60305f094944 (diff) | |
expire stored extra levels automatically when a new PVP season starts
| -rw-r--r-- | Malmstone/Plugin.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Malmstone/Plugin.cs b/Malmstone/Plugin.cs index f17807d..9ff8ba8 100644 --- a/Malmstone/Plugin.cs +++ b/Malmstone/Plugin.cs @@ -265,6 +265,19 @@ private void OnCommand(string command, string args) { if(ClientState.LocalPlayer != null) { + ulong contentId = ClientState.LocalContentId; + int CurrentSeriesLevel = PvPService.GetPvPSeriesInfo()?.CurrentSeriesRank ?? 0; + if (Configuration.ExtraLevelsMap.TryGetValue(contentId, out var extraLevels)) + { + if(extraLevels >= 1 && CurrentSeriesLevel < 30) + { + Logger.Debug("Extra Levels has expired likely due to a new Series Malmstone. Resetting to 0"); + Configuration.ExtraLevelsMap[contentId] = 0; + Configuration.Save(); + } + } + + if (Configuration.TrackFrontlineBonus) { Logger.Debug("Player has loaded in. Attempting to get Frontline PVP Profile Data"); |
