aboutsummaryrefslogtreecommitdiffstats
path: root/Malmstone/Utils/UIChanger.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Malmstone/Utils/UIChanger.cs')
-rw-r--r--Malmstone/Utils/UIChanger.cs49
1 files changed, 49 insertions, 0 deletions
diff --git a/Malmstone/Utils/UIChanger.cs b/Malmstone/Utils/UIChanger.cs
new file mode 100644
index 0000000..d764a83
--- /dev/null
+++ b/Malmstone/Utils/UIChanger.cs
@@ -0,0 +1,49 @@
+using Dalamud.Game.Addon.Lifecycle;
+using Dalamud.Game.Addon.Lifecycle.AddonArgTypes;
+using FFXIVClientStructs.FFXIV.Component.GUI;
+using Malmstone.Services;
+
+namespace Malmstone.Utils;
+
+public class UIChanger
+{
+ private Plugin Plugin;
+ public UIChanger(Plugin Plugin)
+ {
+ this.Plugin = Plugin;
+ }
+
+ public void ReplacePVPRewardWindowSeriesRank(AddonEvent eventType, AddonArgs addonInfo)
+ {
+ unsafe
+ {
+ var PvpRewardWindow = (AtkUnitBase*)addonInfo.Addon;
+ var SeriesLevelTextNode = PvpRewardWindow->GetTextNodeById(16);
+ PvPSeriesInfo? PvPSeriesInfo = Plugin.PvPService.GetPvPSeriesInfo();
+ if (SeriesLevelTextNode != null && PvPSeriesInfo != null)
+ {
+ var CurrentSeriesRank = PvPSeriesInfo.CurrentSeriesRank +
+ Plugin.GetSavedExtraLevels();
+ SeriesLevelTextNode->SetText(CurrentSeriesRank.ToString());
+ }
+ }
+ }
+
+ public void ReplacePVPProfileWindowSeriesRank(AddonEvent eventType, AddonArgs addonInfo)
+ {
+ unsafe
+ {
+ var PvpProfileWindow = (AtkUnitBase*)addonInfo.Addon;
+ var SeriesLevelTextNode = PvpProfileWindow->GetTextNodeById(24);
+ PvPSeriesInfo? PvPSeriesInfo = Plugin.PvPService.GetPvPSeriesInfo();
+ if (PvPSeriesInfo == null)
+ return;
+ var CurrentSeriesRank = PvPSeriesInfo.CurrentSeriesRank +
+ Plugin.GetSavedExtraLevels();
+ if (SeriesLevelTextNode != null)
+ {
+ SeriesLevelTextNode->SetText(CurrentSeriesRank.ToString());
+ }
+ }
+ }
+}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage