aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Malmstone/Addons/PvPMatchAddon.cs2
-rw-r--r--Malmstone/Plugin.cs21
2 files changed, 21 insertions, 2 deletions
diff --git a/Malmstone/Addons/PvPMatchAddon.cs b/Malmstone/Addons/PvPMatchAddon.cs
index 44679c4..b416f16 100644
--- a/Malmstone/Addons/PvPMatchAddon.cs
+++ b/Malmstone/Addons/PvPMatchAddon.cs
@@ -164,6 +164,8 @@ namespace Malmstone.Addons
Plugin.Configuration.Save();
}
Plugin.PvPService.UpdateFrontlineResultCache();
+ Plugin.Logger.Debug("Frontline Record Re-cached As: " + Plugin.PvPService.CachedFrontlineResults.FirstPlace +
+ " Second: " + Plugin.PvPService.CachedFrontlineResults.SecondPlace + " Third: " + Plugin.PvPService.CachedFrontlineResults.ThirdPlace);
}
private void ShowSeriesProgressionToast(AddonEvent eventType, AddonArgs addonInfo)
diff --git a/Malmstone/Plugin.cs b/Malmstone/Plugin.cs
index 66171b0..ffa1ea9 100644
--- a/Malmstone/Plugin.cs
+++ b/Malmstone/Plugin.cs
@@ -13,18 +13,20 @@ using System.Linq;
using Malmstone.Utils;
using Malmstone.Addons;
using Dalamud.Game.Addon.Lifecycle;
+using FFXIVClientStructs.FFXIV.Client.System.Framework;
namespace Malmstone;
public sealed class Plugin : IDalamudPlugin
{
[PluginService] internal static IDalamudPluginInterface PluginInterface { get; private set; } = null!;
- [PluginService] internal static ITextureProvider TextureProvider { get; private set; } = null!;
[PluginService] internal static ICommandManager CommandManager { get; private set; } = null!;
[PluginService] internal static IChatGui Chat { get; private set; } = null!;
[PluginService] internal static IAddonLifecycle AddonLifeCycle { get; private set; } = null!;
[PluginService] internal static IToastGui ToastGui { get; private set; } = null!;
[PluginService] internal static IPluginLog Logger { get; set; } = default!;
+ [PluginService] internal static IClientState ClientState { get; private set; } = null!;
+ [PluginService] internal static IFramework Framework { get; private set; } = null!;
private const string CommandName = "/pmalm";
@@ -56,7 +58,7 @@ public sealed class Plugin : IDalamudPlugin
if (Configuration.ShowMainWindowOnPVPReward)
EnablePVPRewardWindowAddon();
- PvPService.UpdateFrontlineResultCache();
+ Logger.Debug("Initial Cache: " + PvPService.CachedFrontlineResults.FirstPlace + " " + PvPService.CachedFrontlineResults.SecondPlace + " " + PvPService.CachedFrontlineResults.ThirdPlace);
if (Configuration.IsPrimedForBuff)
PvPService.ConsecutiveThirdPlaceFrontline = 1;
@@ -76,6 +78,7 @@ public sealed class Plugin : IDalamudPlugin
PluginInterface.UiBuilder.Draw += DrawUI;
PluginInterface.UiBuilder.OpenConfigUi += ToggleConfigUI;
PluginInterface.UiBuilder.OpenMainUi += ToggleMainUI;
+ Framework.Update += CheckPlayerLoaded;
}
public void Dispose()
@@ -243,6 +246,20 @@ private void OnCommand(string command, string args)
}
+ private void CheckPlayerLoaded(IFramework framework)
+ {
+ if(ClientState.LocalPlayer != null)
+ {
+ if (Configuration.TrackFrontlineBonus)
+ {
+ Logger.Debug("Player has loaded in. Attempting to get Frontline PVP Profile Data");
+ PvPService.UpdateFrontlineResultCache();
+ Logger.Debug("Initial Frontline Data Cached As: First: " + PvPService.CachedFrontlineResults.FirstPlace +
+ " Second: " + PvPService.CachedFrontlineResults.SecondPlace + " Third: " + PvPService.CachedFrontlineResults.ThirdPlace);
+ Framework.Update -= CheckPlayerLoaded;
+ }
+ }
+ }
private void DrawUI() => WindowSystem.Draw();
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage