diff options
| author | Pinapelz <yukais@pinapelz.com> | 2024-09-17 02:07:37 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2024-09-17 02:07:37 -0700 |
| commit | bcd3b40ebace6bf6579ce431e606abff4396de4e (patch) | |
| tree | cb0cbceb3373bc3fea0ed4bc527568a95bac4635 | |
| parent | 745b939bb15bf41725d4e86e65366a1a8793bbc7 (diff) | |
fix: update toast and chat notifications to consider ExtraLevel
| -rw-r--r-- | Malmstone/Addons/PvPMatchAddon.cs | 22 | ||||
| -rw-r--r-- | Malmstone/Windows/ConfigWindow.cs | 4 |
2 files changed, 14 insertions, 12 deletions
diff --git a/Malmstone/Addons/PvPMatchAddon.cs b/Malmstone/Addons/PvPMatchAddon.cs index 6b3642c..71e3b33 100644 --- a/Malmstone/Addons/PvPMatchAddon.cs +++ b/Malmstone/Addons/PvPMatchAddon.cs @@ -172,24 +172,25 @@ namespace Malmstone.Addons { PvPSeriesInfo? seriesInfo = Plugin.PvPService.GetPvPSeriesInfo(); if (seriesInfo == null) return; - if (Plugin.Configuration.SkipProgressionToastAfterGoal && seriesInfo.CurrentSeriesRank >= Plugin.Configuration.DefaultTargetRankProperty) return; + var CurrentSeriesLevel = seriesInfo.CurrentSeriesRank + Plugin.GetSavedExtraLevels(); + if (Plugin.Configuration.SkipProgressionToastAfterGoal && CurrentSeriesLevel >= Plugin.Configuration.DefaultTargetRankProperty) return; switch (Plugin.Configuration.PostmatchProgressionToastType) { case 0: - Plugin.ToastGui.ShowNormal("Series Level " + seriesInfo.CurrentSeriesRank + + Plugin.ToastGui.ShowNormal("Series Level " + CurrentSeriesLevel + " " + seriesInfo.SeriesExperience + "/" + MalmstoneXPCalculator.GetXPTargetForCurrentLevel(seriesInfo.CurrentSeriesRank) + " EXP"); break; case 1: - Plugin.ToastGui.ShowQuest("Series Level " + seriesInfo.CurrentSeriesRank + + Plugin.ToastGui.ShowQuest("Series Level " + CurrentSeriesLevel + " " + seriesInfo.SeriesExperience + "/" + MalmstoneXPCalculator.GetXPTargetForCurrentLevel(seriesInfo.CurrentSeriesRank) + " EXP"); break; case 2: - Plugin.ToastGui.ShowError("Series Level " + seriesInfo.CurrentSeriesRank + + Plugin.ToastGui.ShowError("Series Level " + CurrentSeriesLevel + " " + seriesInfo.SeriesExperience + "/" + MalmstoneXPCalculator.GetXPTargetForCurrentLevel(seriesInfo.CurrentSeriesRank) + " EXP"); break; default: - Plugin.ToastGui.ShowNormal("Series Level " + seriesInfo.CurrentSeriesRank + + Plugin.ToastGui.ShowNormal("Series Level " + CurrentSeriesLevel + " " + seriesInfo.SeriesExperience + "/" + MalmstoneXPCalculator.GetXPTargetForCurrentLevel(seriesInfo.CurrentSeriesRank) + " EXP"); break; } @@ -200,14 +201,15 @@ namespace Malmstone.Addons { if (Plugin.Configuration.SkipProgressionChatAfterGoal && seriesInfo.CurrentSeriesRank >= Plugin.Configuration.DefaultTargetRankProperty) return; var seString = new SeString(new List<Payload>()); - int TargetGoal = seriesInfo.CurrentSeriesRank + 1; - if(Plugin.Configuration.OverrideShowMatchesToDefaultTargetGoal && Plugin.Configuration.DefaultTargetRankProperty > seriesInfo.CurrentSeriesRank) + var CurrentSeriesLevel = seriesInfo.CurrentSeriesRank + Plugin.GetSavedExtraLevels(); + int TargetGoal = CurrentSeriesLevel + 1; + if(Plugin.Configuration.OverrideShowMatchesToDefaultTargetGoal && Plugin.Configuration.DefaultTargetRankProperty > CurrentSeriesLevel) TargetGoal = Plugin.Configuration.DefaultTargetRankProperty; switch (contentType) { case PvPContentType.CrystallineConflict: MalmstoneXPCalculator.XpCalculationResult ccResultData = MalmstoneXPCalculator.CalculateCrystallineConflictMatches( - seriesInfo.CurrentSeriesRank, TargetGoal, seriesInfo.SeriesExperience); + CurrentSeriesLevel, TargetGoal, seriesInfo.SeriesExperience); if (ccResultData.CrystallineConflictLose == 0) break; seString.Append(new TextPayload("[Crystalline Conflict to Level " + TargetGoal + "]\n")); seString.Append(new UIForegroundPayload(35)); @@ -217,7 +219,7 @@ namespace Malmstone.Addons break; case PvPContentType.Frontlines: MalmstoneXPCalculator.XpCalculationResult flResultData = MalmstoneXPCalculator.CalculateFrontlineMatches( - seriesInfo.CurrentSeriesRank, TargetGoal, seriesInfo.SeriesExperience); + CurrentSeriesLevel, TargetGoal, seriesInfo.SeriesExperience); if (flResultData.FrontlineDailyLose3rd == 0) break; seString.Append(new TextPayload("[Frontlines to Level " + TargetGoal+ "]\n")); seString.Append(new UIForegroundPayload(518)); @@ -229,7 +231,7 @@ namespace Malmstone.Addons break; case PvPContentType.RivalWings: MalmstoneXPCalculator.XpCalculationResult rwResultData = MalmstoneXPCalculator.CalculateRivalWingsMatches( - seriesInfo.CurrentSeriesRank, TargetGoal, seriesInfo.SeriesExperience); + CurrentSeriesLevel, TargetGoal, seriesInfo.SeriesExperience); if (rwResultData.RivalWingsLose == 0) break; seString.Append(new TextPayload("[Rival Wings to Level " + TargetGoal + "]\n")); seString.Append(new UIForegroundPayload(43)); diff --git a/Malmstone/Windows/ConfigWindow.cs b/Malmstone/Windows/ConfigWindow.cs index 1174940..7b61334 100644 --- a/Malmstone/Windows/ConfigWindow.cs +++ b/Malmstone/Windows/ConfigWindow.cs @@ -298,7 +298,7 @@ public class ConfigWindow : Window, IDisposable ImGui.EndTooltip(); } ImGui.SameLine(); - ImGui.Text("Show true Series Level in PVP Reward window"); + ImGui.Text("Show Series Level Above 30 in PVP Reward window"); var showTrueSeriesLevelPVPProfile = Configuration.ShowTrueSeriesLevelPVPProfile; if (ImGui.Checkbox("##ShowTrueSeriesLevelPVPProfile", ref showTrueSeriesLevelPVPProfile)) @@ -317,7 +317,7 @@ public class ConfigWindow : Window, IDisposable ImGui.EndTooltip(); } ImGui.SameLine(); - ImGui.Text("Show true Series Level in PVP Profile window"); + ImGui.Text("Show Series Level Above 30 in PVP Profile window"); ImGui.EndTabItem(); |
