diff options
| author | Pinapelz <yukais@pinapelz.com> | 2024-11-03 00:37:07 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2024-11-08 19:00:21 -0800 |
| commit | 03e77b493927d15105646aad30251ab2ab6f99c4 (patch) | |
| tree | 22e27d8cc4e58cba09021d1c16b7c3d4bbcb9c6c /Malmstone/Plugin.cs | |
| parent | 86e365d62fb66baddb0481a1f0c1bbf1b7fd00f6 (diff) | |
fix: incorrect increment of extralevels map if PvpReward winodow has multiple extra rewards (need testing)
Diffstat (limited to 'Malmstone/Plugin.cs')
| -rw-r--r-- | Malmstone/Plugin.cs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Malmstone/Plugin.cs b/Malmstone/Plugin.cs index bd1df32..f17807d 100644 --- a/Malmstone/Plugin.cs +++ b/Malmstone/Plugin.cs @@ -304,18 +304,19 @@ private void OnCommand(string command, string args) { if (PvPService.GetPvPSeriesInfo() != null) { - // TODO NEED TESTING!!! // If player claimed Extra Level reward (above Level 30) and we detect a decrease in Series level PvPSeriesInfo? PvPSeriesInfo = PvPService.GetPvPSeriesInfo(); if (PvPSeriesInfo == null) return; - if(PvPSeriesInfo.CurrentSeriesRank < CachedSeriesLevel && CachedSeriesLevel > 30) + if(PvPSeriesInfo.CurrentSeriesRank < CachedSeriesLevel && CachedSeriesLevel > 30) { - var extraLevels = CachedSeriesLevel - 30; - Logger.Debug("Player claimed extra levels: " + extraLevels+ ", new ExtraLevels is " + GetSavedExtraLevels() + extraLevels); - IncrementExtraLevels(extraLevels); + Logger.Debug("Player claimed extra levels: Old Level is " + GetSavedExtraLevels()); + if (IncrementExtraLevels(1)) + Logger.Debug("Successfully incremented extra levels for player"); + else + Logger.Debug("Failed to increment extra levels for player"); Configuration.Save(); - + CachedSeriesLevel = PvPSeriesInfo.CurrentSeriesRank; } else { |
