aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2024-11-03 00:37:07 -0700
committerPinapelz <yukais@pinapelz.com>2024-11-08 19:00:21 -0800
commit03e77b493927d15105646aad30251ab2ab6f99c4 (patch)
tree22e27d8cc4e58cba09021d1c16b7c3d4bbcb9c6c
parent86e365d62fb66baddb0481a1f0c1bbf1b7fd00f6 (diff)
fix: incorrect increment of extralevels map if PvpReward winodow has multiple extra rewards (need testing)
-rw-r--r--Malmstone/Malmstone.csproj2
-rw-r--r--Malmstone/Plugin.cs13
2 files changed, 8 insertions, 7 deletions
diff --git a/Malmstone/Malmstone.csproj b/Malmstone/Malmstone.csproj
index 8a46364..bbf5c51 100644
--- a/Malmstone/Malmstone.csproj
+++ b/Malmstone/Malmstone.csproj
@@ -3,7 +3,7 @@
<Import Project="Dalamud.Plugin.Bootstrap.targets" />
<PropertyGroup>
- <Version>1.0.7.1</Version>
+ <Version>1.0.7.2</Version>
<Description>A PVP Series Malmstones Level Calculator</Description>
<PackageProjectUrl>https://github.com/goatcorp/Malmstone</PackageProjectUrl>
<PackageLicenseExpression>AGPL-3.0-or-later</PackageLicenseExpression>
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
{
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage