瀏覽代碼

Fixes for QuestUtil usage in Classic

tags/2.3.3
SabinDeus 2 年之前
父節點
當前提交
14d9f35361
共有 1 個檔案被更改,包括 27 行新增37 行删除
  1. 27
    37
      TurnIn.lua

+ 27
- 37
TurnIn.lua 查看文件

end end


function TI_ResetPointers() function TI_ResetPointers()
TI_debug("resetting pointers")
TI_activenumber = 1; TI_activenumber = 1;
TI_availnumber = 1; TI_availnumber = 1;
TI_specnum = 0; TI_specnum = 0;
TI_LoadEvents(); TI_LoadEvents();
end end
end end
if(TI_status.state and not IsShiftKeyDown()) then
if(TI_status.state and not IsShiftKeyDown()) then
if(event == "QUEST_GREETING") then if(event == "QUEST_GREETING") then
TI_debug("Quest Greeting"); TI_debug("Quest Greeting");
TI_lastquestframe = "greeting"; TI_lastquestframe = "greeting";
TI_ResetPointers(); TI_ResetPointers();
else else
TI_debug("quest is not completable, declining"); TI_debug("quest is not completable, declining");
TI_availnumber = TI_availnumber + 1;
QuestDetailDeclineButton_OnClick(); QuestDetailDeclineButton_OnClick();
end end
end end
end end
if(TI_availnumber > TotalOptions or TI_activenumber > TotalOptions) then if(TI_availnumber > TotalOptions or TI_activenumber > TotalOptions) then
TI_debug("Out of available/active quests, giving up ");
TI_ResetPointers(); TI_ResetPointers();
return; return;
end end
if(current.type == "availquest" and #AvailableQuests > 0 and TI_availnumber <= #AvailableQuests) then if(current.type == "availquest" and #AvailableQuests > 0 and TI_availnumber <= #AvailableQuests) then
SAvQ(AvailableQuests[TI_availnumber].questID); SAvQ(AvailableQuests[TI_availnumber].questID);
TI_debug("Selecting Available Quest ".. TI_availnumber); TI_debug("Selecting Available Quest ".. TI_availnumber);
TI_ResetPointers();
return; return;
elseif(current.type == "activequest" and #ActiveQuests > 0 and TI_activenumber <= #ActiveQuests) then elseif(current.type == "activequest" and #ActiveQuests > 0 and TI_activenumber <= #ActiveQuests) then
while TI_activenumber <= #ActiveQuests do while TI_activenumber <= #ActiveQuests do
return x; return x;
end end


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


for i=1, select("#", ...), 7 do
for i,gqui in ipairs(gquis) do
local temp = {}; local temp = {};
temp.name = select(i, ...);

local isTrivial = select(i+2, ...);
local isDaily = select(i+3, ...);
local isRepeatable = select(i+4, ...);
local isLegendary = select(i+5, ...);
local isIgnored = select(i+6, ...);
if ( isDaily ) then
temp.name = gqui.title;

if ( gqui.repeatable ) then
temp.icon = "Interface\\GossipFrame\\DailyQuestIcon"; temp.icon = "Interface\\GossipFrame\\DailyQuestIcon";
elseif ( isRepeatable ) then
temp.icon = "Interface\\GossipFrame\\DailyActiveQuestIcon";
elseif ( isLegendary ) then
elseif ( gqui.isLegendary ) then
temp.icon = "Interface\\GossipFrame\\AvailableLegendaryQuestIcon"; temp.icon = "Interface\\GossipFrame\\AvailableLegendaryQuestIcon";
else else
temp.icon = "Interface\\GossipFrame\\AvailableQuestIcon"; temp.icon = "Interface\\GossipFrame\\AvailableQuestIcon";
end end
temp.questID = idx;
temp.questID = gqui.questID;
temp.isComplete = gqui.isComplete;

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(gquis)
local x = {}; local x = {};
local idx = 1;


for i=1, select("#", ...), 6 do
for i,gqui in ipairs(gquis) do
local temp = {}; local temp = {};
temp.name = select(i, ...);

local isComplete = select(i+3, ...);
temp.isComplete = isComplete;
local isLegendary = select(i+4, ...);
if(isComplete) then
if(isLegendary) then
temp.icon = "Interface\\GossipFrame\\ActiveLegendaryQuestIcon";
else
temp.icon = "Interface\\GossipFrame\\ActiveQuestIcon";
end
temp.name = gqui.title;

if ( gqui.repeatable ) then
temp.icon = "Interface\\GossipFrame\\DailyQuestIcon";
elseif ( gqui.isLegendary ) then
temp.icon = "Interface\\GossipFrame\\AvailableLegendaryQuestIcon";
else else
temp.icon = "Interface\\GossipFrame\\IncompleteQuestIcon";
temp.icon = "Interface\\GossipFrame\\AvailableQuestIcon";
end end
temp.questID = idx;
temp.questID = gqui.questID;
temp.isComplete = gqui.isComplete;

table.insert(x, temp); table.insert(x, temp);
idx = idx + 1;
end end
return x; return x;
end end
getavailquests = C_GossipInfo.GetAvailableQuests, getavailquests = C_GossipInfo.GetAvailableQuests,
getactivequests = C_GossipInfo.GetActiveQuests, getactivequests = C_GossipInfo.GetActiveQuests,
getoptions = C_GossipInfo.GetOptions, getoptions = C_GossipInfo.GetOptions,
tabulateAvailable = TI_TabulateGossipQuestUIInfo_Retail,
tabulateActive = TI_TabulateGossipQuestUIInfo_Retail,
tabulateAvailable = TI_TabulateGossipAvailableQuests_Classic,
tabulateActive = TI_TabulateGossipActiveQuests_Classic,
tabulateOptions = TI_TabulateGossipUIInfo_Retail, tabulateOptions = TI_TabulateGossipUIInfo_Retail,
}, },
q = { q = {

Loading…
取消
儲存