From 4f03bdf323958ceafd3e97af0e6e37350114f14c Mon Sep 17 00:00:00 2001 From: SabinDeus Date: Sun, 29 Jan 2023 17:56:17 -0500 Subject: [PATCH] Fix Gossip option ordering (entries generated during the last releases since 10.0 may need to be deleted and readded) Fix for Classic 3.4.1 API Updates --- TurnIn.lua | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/TurnIn.lua b/TurnIn.lua index 09a37c1..8b99363 100755 --- a/TurnIn.lua +++ b/TurnIn.lua @@ -482,14 +482,18 @@ function TI_HandleGossipWindow(gorq) local x={}; x.name = v.name; x.gorq = gorq; - x.args = i; + if x.orderIndex then + x.args = v.orderIndex; + else + x.args = i; + end x.type = v.type; x.icon = v.icon; x.state = false; table.insert(ListEntry, x); end ListEntry.state = false; - + local TotalOptions = #AvailableQuests+#ActiveQuests+#GossipOptions; if(TotalOptions < 1) then @@ -708,7 +712,7 @@ end function TI_TabulateGossipUIInfo_Retail(guis) local x = {}; - + table.sort(guis, GossipOptionSort); for i,gui in ipairs(guis) do local temp = {}; temp.name = gui.name; @@ -803,15 +807,15 @@ if (TI_IsRetail()) then else TI_FunctionList = { g = { - availquest = SelectGossipAvailableQuest, - activequest = SelectGossipActiveQuest, + availquest = C_GossipInfo.SelectAvailableQuest, + activequest = C_GossipInfo.SelectActiveQuest, gossip = SelectGossipOption, - getavailquests = GetGossipAvailableQuests, - getactivequests = GetGossipActiveQuests, - getoptions = GetGossipOptions, - tabulateAvailable = TI_TabulateGossipAvailableQuests_Classic, - tabulateActive = TI_TabulateGossipActiveQuests_Classic, - tabulateOptions = TI_TabulateGossipOptions_Classic, + getavailquests = C_GossipInfo.GetAvailableQuests, + getactivequests = C_GossipInfo.GetActiveQuests, + getoptions = C_GossipInfo.GetOptions, + tabulateAvailable = TI_TabulateGossipQuestUIInfo_Retail, + tabulateActive = TI_TabulateGossipQuestUIInfo_Retail, + tabulateOptions = TI_TabulateGossipUIInfo_Retail, }, q = { activequest = SelectActiveQuest,