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
This commit is contained in:
SabinDeus 2023-01-29 17:56:17 -05:00
parent 000e731fbc
commit 4f03bdf323

View File

@ -482,14 +482,18 @@ function TI_HandleGossipWindow(gorq)
local x={}; local x={};
x.name = v.name; x.name = v.name;
x.gorq = gorq; x.gorq = gorq;
x.args = i; if x.orderIndex then
x.args = v.orderIndex;
else
x.args = i;
end
x.type = v.type; x.type = v.type;
x.icon = v.icon; x.icon = v.icon;
x.state = false; x.state = false;
table.insert(ListEntry, x); table.insert(ListEntry, x);
end end
ListEntry.state = false; ListEntry.state = false;
local TotalOptions = #AvailableQuests+#ActiveQuests+#GossipOptions; local TotalOptions = #AvailableQuests+#ActiveQuests+#GossipOptions;
if(TotalOptions < 1) then if(TotalOptions < 1) then
@ -708,7 +712,7 @@ end
function TI_TabulateGossipUIInfo_Retail(guis) function TI_TabulateGossipUIInfo_Retail(guis)
local x = {}; local x = {};
table.sort(guis, GossipOptionSort);
for i,gui in ipairs(guis) do for i,gui in ipairs(guis) do
local temp = {}; local temp = {};
temp.name = gui.name; temp.name = gui.name;
@ -803,15 +807,15 @@ if (TI_IsRetail()) then
else else
TI_FunctionList = { TI_FunctionList = {
g = { g = {
availquest = SelectGossipAvailableQuest, availquest = C_GossipInfo.SelectAvailableQuest,
activequest = SelectGossipActiveQuest, activequest = C_GossipInfo.SelectActiveQuest,
gossip = SelectGossipOption, gossip = SelectGossipOption,
getavailquests = GetGossipAvailableQuests, getavailquests = C_GossipInfo.GetAvailableQuests,
getactivequests = GetGossipActiveQuests, getactivequests = C_GossipInfo.GetActiveQuests,
getoptions = GetGossipOptions, getoptions = C_GossipInfo.GetOptions,
tabulateAvailable = TI_TabulateGossipAvailableQuests_Classic, tabulateAvailable = TI_TabulateGossipQuestUIInfo_Retail,
tabulateActive = TI_TabulateGossipActiveQuests_Classic, tabulateActive = TI_TabulateGossipQuestUIInfo_Retail,
tabulateOptions = TI_TabulateGossipOptions_Classic, tabulateOptions = TI_TabulateGossipUIInfo_Retail,
}, },
q = { q = {
activequest = SelectActiveQuest, activequest = SelectActiveQuest,