aboutsummaryrefslogtreecommitdiffstats
path: root/Malmstone
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2024-09-08 21:14:34 -0700
committerPinapelz <yukais@pinapelz.com>2024-09-08 21:14:34 -0700
commitbc687091520c8a1bf1f3d19dcddb4d80e1ea42c5 (patch)
tree58f60a9db3f1b32b9dab606fbba59d23ca60dd26 /Malmstone
parent20598fbb7be6a73364661a4fd8e92ad6d242234f (diff)
save primed for losing streak bonus state if plugin is unloaded
Diffstat (limited to 'Malmstone')
-rw-r--r--Malmstone/Addons/PvPMatchAddon.cs11
-rw-r--r--Malmstone/Configuration.cs1
-rw-r--r--Malmstone/Plugin.cs4
-rw-r--r--Malmstone/Windows/MainWindow.cs2
4 files changed, 16 insertions, 2 deletions
diff --git a/Malmstone/Addons/PvPMatchAddon.cs b/Malmstone/Addons/PvPMatchAddon.cs
index 41501e3..6086754 100644
--- a/Malmstone/Addons/PvPMatchAddon.cs
+++ b/Malmstone/Addons/PvPMatchAddon.cs
@@ -153,6 +153,17 @@ namespace Malmstone.Addons
{
Plugin.Chat.PrintError("[Malmstone Calculator] Unable to get current Frontline match results");
}
+ if(Plugin.PvPService.ConsecutiveThirdPlaceFrontline >= 1 && Plugin.Configuration.SavedFrontlineRewardBonus == 0)
+ {
+ Plugin.Logger.Debug("Primed For Buff! Next 3rd place will trigger losing streak bonus");
+ Plugin.Configuration.IsPrimedForBuff = true;
+ Plugin.Configuration.Save();
+ }
+ else
+ {
+ Plugin.Configuration.IsPrimedForBuff = false;
+ Plugin.Configuration.Save();
+ }
Plugin.PvPService.UpdateFrontlineResultCache();
}
diff --git a/Malmstone/Configuration.cs b/Malmstone/Configuration.cs
index 4f62a96..ba4ba67 100644
--- a/Malmstone/Configuration.cs
+++ b/Malmstone/Configuration.cs
@@ -20,6 +20,7 @@ public class Configuration : IPluginConfiguration
public bool TrackFrontlineBonus { get; set; } = true;
public int SavedFrontlineRewardBonus { get; set; } = -1;
public bool OutdatedFrontlineRewardBonus { get; set; } = false;
+ public bool IsPrimedForBuff { get; set; } = false;
// the below exist just to make saving less cumbersome
public void Save()
diff --git a/Malmstone/Plugin.cs b/Malmstone/Plugin.cs
index ada8202..66171b0 100644
--- a/Malmstone/Plugin.cs
+++ b/Malmstone/Plugin.cs
@@ -57,7 +57,9 @@ public sealed class Plugin : IDalamudPlugin
EnablePVPRewardWindowAddon();
PvPService.UpdateFrontlineResultCache();
-
+ if (Configuration.IsPrimedForBuff)
+ PvPService.ConsecutiveThirdPlaceFrontline = 1;
+
if (Configuration.PostmatchProgressionToastType < 0 || Configuration.PostmatchProgressionToastType > 2)
{
Configuration.PostmatchProgressionToastType = 0;
diff --git a/Malmstone/Windows/MainWindow.cs b/Malmstone/Windows/MainWindow.cs
index fbeb500..e5d69d2 100644
--- a/Malmstone/Windows/MainWindow.cs
+++ b/Malmstone/Windows/MainWindow.cs
@@ -122,7 +122,7 @@ namespace Malmstone.Windows
{
if(Plugin.PvPService.ConsecutiveThirdPlaceFrontline == 1)
{
- ImGui.TextColored(new Vector4(0.0f, 1.0f, 0.0f, 1.0f), "You'll receive a 10%% reward bonus if you place 3rd");
+ ImGui.TextColored(new Vector4(0.0f, 1.0f, 0.0f, 1.0f), "Primed For Bonus: w You'll receive a 10%% reward bonus if you place 3rd");
}
if (ImGui.IsItemHovered())
{
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage