From 225e3f71a2007de032adf20314604a7899c476fc Mon Sep 17 00:00:00 2001 From: Hilmar Wiegand Date: Wed, 13 Mar 2024 00:50:02 +0100 Subject: [PATCH 1/2] fix(11.0.0): Fix C_Scenario.GetCriteriaInfo and InterfaceOptionsFrame_OpenToCategory deprecation issue --- Events.lua | 6 +++--- Options.lua | 6 ++---- WarpDeplete.toc | 4 ++-- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Events.lua b/Events.lua index 202a4ed..1b7157d 100644 --- a/Events.lua +++ b/Events.lua @@ -172,7 +172,7 @@ function WarpDeplete:GetObjectivesInfo() local objectives = {} for i = 1, stepCount - 1 do - local name, _, completed = C_Scenario.GetCriteriaInfo(i) + local name, _, completed = C_ScenarioInfo.GetCriteriaInfo(i) if not name then break end name = gsub(name, " defeated", "") @@ -191,7 +191,7 @@ end function WarpDeplete:GetEnemyForcesCount() local stepCount = select(3, C_Scenario.GetStepInfo()) - local _, _, _, _, totalCount, _, _, mobPointsStr = C_Scenario.GetCriteriaInfo(stepCount) + local _, _, _, _, totalCount, _, _, mobPointsStr = C_ScenarioInfo.GetCriteriaInfo(stepCount) if not totalCount or not mobPointsStr then return nil, nil end local currentCountStr = gsub(mobPointsStr, "%%", "") @@ -228,7 +228,7 @@ function WarpDeplete:UpdateObjectives() if not objectives[i] or not objectives[i].time then -- If it wasn't completed before and it is now, we've just completed -- it and can set the completion time - local completed = select(3, C_Scenario.GetCriteriaInfo(i)) + local completed = select(3, C_ScenarioInfo.GetCriteriaInfo(i)) if completed then objectives[i].time = self.timerState.current changed = true diff --git a/Options.lua b/Options.lua index c523610..2f6e80e 100644 --- a/Options.lua +++ b/Options.lua @@ -785,10 +785,8 @@ function WarpDeplete:HandleChatCommand(input) return end - -- We have to call this twice in a row due to a stupid bug... - -- See https://www.wowinterface.com/forums/showthread.php?t=54599 - InterfaceOptionsFrame_OpenToCategory("WarpDeplete") - InterfaceOptionsFrame_OpenToCategory("WarpDeplete") + -- Fix InterfaceOptionsFrame_OpenToCategory deprecation issue + Settings.OpenToCategory("WarpDeplete") end function WarpDeplete.SetUnlocked(info, value) diff --git a/WarpDeplete.toc b/WarpDeplete.toc index 7f59518..3dc54d5 100644 --- a/WarpDeplete.toc +++ b/WarpDeplete.toc @@ -1,8 +1,8 @@ -## Interface: 100205 +## Interface: 110000, 110002 ## Title: WarpDeplete ## Notes-ruRU: WarpDeplete - таймер для подземелий М+ с гибкими настройками ## Author: Happens -## Version: 2.8.0 +## Version: 2.8.1 ## SavedVariables: WarpDepleteDB ## IconTexture: Interface\AddOns\WarpDeplete\logo ## X-Curse-Project-ID: 460155 From 6f2b66860f8c028e33df4aebea5978419c788e51 Mon Sep 17 00:00:00 2001 From: Hilmar Wiegand Date: Fri, 26 Jul 2024 19:00:36 +0200 Subject: [PATCH 2/2] Remove comment from settings call --- Options.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/Options.lua b/Options.lua index 2f6e80e..57289fd 100644 --- a/Options.lua +++ b/Options.lua @@ -785,7 +785,6 @@ function WarpDeplete:HandleChatCommand(input) return end - -- Fix InterfaceOptionsFrame_OpenToCategory deprecation issue Settings.OpenToCategory("WarpDeplete") end