aboutsummaryrefslogtreecommitdiffstats
path: root/Malmstone/Addons
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2024-09-08 16:52:23 -0700
committerPinapelz <yukais@pinapelz.com>2024-09-08 16:52:23 -0700
commit031440201d24531d6a1d5a0e93579d76e1e4ba18 (patch)
tree10e1651741457a0a0e16b28122ec24ab851aa87d /Malmstone/Addons
parent3a3a6613cd9783f421df0a152c8675a669910557 (diff)
add saving functionality to frontline reward bonus
- marks as outdated if FrontlineRecord listener is disabled at any point
Diffstat (limited to 'Malmstone/Addons')
-rw-r--r--Malmstone/Addons/PvPMatchAddon.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/Malmstone/Addons/PvPMatchAddon.cs b/Malmstone/Addons/PvPMatchAddon.cs
index c3f726a..896001a 100644
--- a/Malmstone/Addons/PvPMatchAddon.cs
+++ b/Malmstone/Addons/PvPMatchAddon.cs
@@ -53,7 +53,8 @@ namespace Malmstone.Addons
public void EnableFrontlinePostMatch()
{
Plugin.AddonLifeCycle.RegisterListener(AddonEvent.PostSetup, "FrontlineRecord", OnFrontlineRecordTrigger);
- Plugin.PvPService.CurrentFrontlineLosingBonus = -1; // Reset bonus tracking for now until config save is done
+ Plugin.PvPService.CurrentFrontlineLosingBonus = Plugin.Configuration.SavedFrontlineRewardBonus;
+ Plugin.Configuration.OutdatedFrontlineRewardBonus = true;
FrontlineRecordPostSetupEnabled = true;
}
@@ -121,6 +122,7 @@ namespace Malmstone.Addons
{
FrontlineMatchResult = FrontlinePlacement.ThirdPlace;
}
+ Plugin.Logger.Debug("Frontline Match Result: " + FrontlineMatchResult.ToString());
if (FrontlineMatchResult != FrontlinePlacement.Unknown)
{
unsafe
@@ -135,6 +137,9 @@ namespace Malmstone.Addons
if (int.TryParse(SeriesExpText, out int SeriesExpEarned))
{
int CurrentLossBonus = Plugin.PvPService.GenerateFrontlineBonus(FrontlineMatchResult, SeriesExpEarned);
+ Plugin.Logger.Debug("Series EXP Earned: " + SeriesExpEarned.ToString());
+ Plugin.Configuration.SavedFrontlineRewardBonus = CurrentLossBonus;
+ Plugin.Configuration.OutdatedFrontlineRewardBonus = false;
}
else
{
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage