Browse Source

Fixing bugs introduced by 10.0 changes as well as a long-standing QuestFrame manipulation bug

tags/2.3.1
SabinDeus 3 years ago
parent
commit
5c4bf53d17
1 changed files with 18 additions and 6 deletions
  1. 18
    6
      TurnIn.lua

+ 18
- 6
TurnIn.lua View File



function TI_debug(...) function TI_debug(...)
if(TI_status.debugstate) then if(TI_status.debugstate) then
TI_message(...)
LoadAddOn("Blizzard_DebugTools")
local x = {...};
for k,v in pairs(x) do
if type(v) == "table" and DevTools_Dump then
DevTools_Dump(v)
else
DEFAULT_CHAT_FRAME:AddMessage(tostring(v));
end
end
end end
end end


local numQuests = (getglobal("GetNum"..type.."Quests"))(); local numQuests = (getglobal("GetNum"..type.."Quests"))();
local qfn = getglobal("Get"..type.."Title"); local qfn = getglobal("Get"..type.."Title");
local ret = {}; local ret = {};
local qname;
local i=1; local i=1;
for i=1,numQuests do for i=1,numQuests do
qname = qfn(i);
ret[i] = {name=qname};
local qname, isComplete = qfn(i);
ret[i] = {name=qname, questID=i, isComplete=isComplete};
end end
return ret; return ret;
end end
local AvailableQuests; local AvailableQuests;
local ActiveQuests; local ActiveQuests;
local GossipOptions; local GossipOptions;
TI_debug(gorq);
if(gorq == "g") then if(gorq == "g") then
AvailableQuests = TI_FunctionList.g.tabulateAvailable(TI_FunctionList.g.getavailquests()); AvailableQuests = TI_FunctionList.g.tabulateAvailable(TI_FunctionList.g.getavailquests());
ActiveQuests = TI_FunctionList.g.tabulateActive(TI_FunctionList.g.getactivequests()); ActiveQuests = TI_FunctionList.g.tabulateActive(TI_FunctionList.g.getactivequests());


function TI_TabulateGossipAvailableQuests_Classic(...) function TI_TabulateGossipAvailableQuests_Classic(...)
local x = {}; local x = {};
local idx = 1;


for i=1, select("#", ...), 7 do for i=1, select("#", ...), 7 do
local temp = {}; local temp = {};
else else
temp.icon = "Interface\\GossipFrame\\AvailableQuestIcon"; temp.icon = "Interface\\GossipFrame\\AvailableQuestIcon";
end end
temp.questID = idx;
table.insert(x, temp); table.insert(x, temp);
idx = idx + 1;
end end
return x; return x;
end end


function TI_TabulateGossipActiveQuests_Classic(...) function TI_TabulateGossipActiveQuests_Classic(...)
local x = {}; local x = {};
local idx = 1;


for i=1, select("#", ...), 6 do for i=1, select("#", ...), 6 do
local temp = {}; local temp = {};
else else
temp.icon = "Interface\\GossipFrame\\IncompleteQuestIcon"; temp.icon = "Interface\\GossipFrame\\IncompleteQuestIcon";
end end
temp.questID = idx;
table.insert(x, temp); table.insert(x, temp);
idx = idx + 1;
end end
return x; return x;
end end

Loading…
Cancel
Save