Compare commits
No commits in common. "master" and "2.1.11" have entirely different histories.
1
.gitignore
vendored
Executable file → Normal file
1
.gitignore
vendored
Executable file → Normal file
@ -0,0 +1 @@
|
||||
.sync/
|
||||
27
README.txt
27
README.txt
@ -1,6 +1,6 @@
|
||||
Turn In
|
||||
v2.3
|
||||
by Sabindeus of Terenas
|
||||
v2.1
|
||||
by Sabindeus of Smolderthorn/Andre of Argent Dawn (Alliance)
|
||||
|
||||
DESCRIPTION
|
||||
-------------
|
||||
@ -29,5 +29,26 @@ COMMAND SUMMARY
|
||||
/turnin recent - Shows the recently visited NPCs window
|
||||
|
||||
|
||||
|
||||
CHANGE LOG
|
||||
-------------
|
||||
v2.1 - Quest selection logic rewrite thanks to Arcanemagus of Hyjal
|
||||
v2.0 - Logic rewrite and added a real GUI for the new NPC DB. Updated for WoW 2.0.
|
||||
v1.3 - Greedy mode now actually works properly... I think. More to come! :/
|
||||
v1.2 - Added Saved Variables. Turn In status now persists. Turn In now selects active quests and gossip options as well as available quests. Greedy mode lets you select an option regardless of if the one you wanted is availble.
|
||||
v1.1 - Fixed "bug" regarding Duke Nicholas Zverenhoff (and possibly other NPCs). Was more of a sloppy omission than a bug really.
|
||||
v1.0a - Added toggle function
|
||||
v1.0 - Initial Release
|
||||
|
||||
Please send bug reports, questions or comments to sabin@sabindeus.com
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Special Thanks to Florrail and Makhno for beta testing like a pro!
|
||||
|
||||
Extra Special Thanks to Arcanemagus for his code input!
|
||||
|
||||
Please send bug reports, questions or comments to Sabin1936@mac.com
|
||||
|
||||
368
TurnIn.lua
Executable file → Normal file
368
TurnIn.lua
Executable file → Normal file
@ -1,15 +1,13 @@
|
||||
--[[
|
||||
Turn-In Mod
|
||||
version 2.3
|
||||
version 2.1
|
||||
Authored by Ian Friedman
|
||||
Sabindeus of Terenas (Alliance)
|
||||
Sabindeus of Smolderthorn (Alliance)
|
||||
The repeatable quest turn in automating machine.
|
||||
|
||||
Thanks to Arcanemagus of Hyjal for extra bug fixes and coding input
|
||||
]]
|
||||
|
||||
|
||||
|
||||
TI_VersionString = "2.0";
|
||||
local TI_slashtable;
|
||||
TI_gossipclosed = false;
|
||||
@ -37,6 +35,18 @@ local TI_GossipDefaults = {
|
||||
banker = "Bank"
|
||||
};
|
||||
|
||||
local TI_FunctionList = {
|
||||
g = {
|
||||
availquest = C_GossipInfo.SelectActiveQuest,
|
||||
activequest = C_GossipInfo.SelectAvailableQuest,
|
||||
default = C_GossipInfo.SelectOption
|
||||
},
|
||||
q = {
|
||||
availquest = SelectAvailableQuest,
|
||||
activequest = SelectActiveQuest
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
local TI_DefaultStatus = {
|
||||
state = false,
|
||||
@ -57,49 +67,6 @@ local TI_events = {
|
||||
"QUEST_FINISHED"
|
||||
};
|
||||
|
||||
local TI_GossipIconNameToId = {
|
||||
["activequesticon"] = 132048,
|
||||
["availablequesticon"] = 132049,
|
||||
["banker"] = 132050,
|
||||
["battlemaster"] = 132051,
|
||||
["binder"] = 132052,
|
||||
["gossip"] = 132053,
|
||||
["healer"] = 132054,
|
||||
["petition"] = 132055,
|
||||
["tabard"] = 132056,
|
||||
["taxi"] = 132057,
|
||||
["trainer"] = 132058,
|
||||
["unlearn"] = 132059,
|
||||
["vendor"] = 132060,
|
||||
["incompletequest"] = 365195,
|
||||
["dailyquest"] = 368364,
|
||||
["dailyactivequest"] = 368577,
|
||||
["auctioneer"] = 528409,
|
||||
["activelegendaryquest"] = 646979,
|
||||
["availablelegendaryquest"] = 646980,
|
||||
["chatbubble"] = 1019848,
|
||||
["workorder"] = 1130518,
|
||||
["transmogrify"] = 1673939,
|
||||
["campaignactivequest"] = 3532316,
|
||||
["campaignavailablequest"] = 3532317,
|
||||
["campaignincompletequest"] = 3532318,
|
||||
["campaigngossipicons"] = 3595324,
|
||||
}
|
||||
|
||||
local function TI_InvertDictionary(input)
|
||||
local s={}
|
||||
for k,v in pairs(input) do
|
||||
s[v]=k
|
||||
end
|
||||
return s
|
||||
end
|
||||
|
||||
local TI_GossipIconIdToName = TI_InvertDictionary(TI_GossipIconNameToId)
|
||||
|
||||
local function TI_TranslateIconToType(iconId)
|
||||
return TI_GossipIconIdToName[iconId]
|
||||
end
|
||||
|
||||
TI_TempNPCList = {};
|
||||
|
||||
function TI_message(...)
|
||||
@ -111,15 +78,7 @@ end
|
||||
|
||||
function TI_debug(...)
|
||||
if(TI_status.debugstate) then
|
||||
C_AddOns.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
|
||||
TI_message(...)
|
||||
end
|
||||
end
|
||||
|
||||
@ -193,7 +152,6 @@ function TI_LoadEvents()
|
||||
end
|
||||
|
||||
function TI_ResetPointers()
|
||||
TI_debug("resetting pointers")
|
||||
TI_activenumber = 1;
|
||||
TI_availnumber = 1;
|
||||
TI_specnum = 0;
|
||||
@ -310,7 +268,7 @@ function TI_OnEvent(self, event, ...)
|
||||
TI_LoadEvents();
|
||||
end
|
||||
end
|
||||
if(TI_status.state and not IsShiftKeyDown()) then
|
||||
if(TI_status.state and not IsShiftKeyDown()) then
|
||||
if(event == "QUEST_GREETING") then
|
||||
TI_debug("Quest Greeting");
|
||||
TI_lastquestframe = "greeting";
|
||||
@ -412,7 +370,6 @@ function TI_CompleteQuest()
|
||||
TI_ResetPointers();
|
||||
else
|
||||
TI_debug("quest is not completable, declining");
|
||||
TI_availnumber = TI_availnumber + 1;
|
||||
QuestDetailDeclineButton_OnClick();
|
||||
end
|
||||
end
|
||||
@ -421,10 +378,11 @@ function TI_GetQuests(type)
|
||||
local numQuests = (getglobal("GetNum"..type.."Quests"))();
|
||||
local qfn = getglobal("Get"..type.."Title");
|
||||
local ret = {};
|
||||
local qname;
|
||||
local i=1;
|
||||
for i=1,numQuests do
|
||||
local qname, isComplete = qfn(i);
|
||||
ret[i] = {name=qname, questID=i, isComplete=isComplete};
|
||||
qname = qfn(i);
|
||||
ret[i] = {name=qname};
|
||||
end
|
||||
return ret;
|
||||
end
|
||||
@ -435,21 +393,21 @@ function TI_HandleGossipWindow(gorq)
|
||||
local AvailableQuests;
|
||||
local ActiveQuests;
|
||||
local GossipOptions;
|
||||
TI_debug(gorq);
|
||||
if(gorq == "g") then
|
||||
AvailableQuests = TI_FunctionList.g.tabulateAvailable(TI_FunctionList.g.getavailquests());
|
||||
ActiveQuests = TI_FunctionList.g.tabulateActive(TI_FunctionList.g.getactivequests());
|
||||
GossipOptions = TI_FunctionList.g.tabulateOptions(TI_FunctionList.g.getoptions());
|
||||
SAcQ = TI_FunctionList.g.activequest;
|
||||
SAvQ = TI_FunctionList.g.availquest;
|
||||
AvailableQuests = TI_TabulateGossipQuestUIInfo(C_GossipInfo.GetAvailableQuests());
|
||||
ActiveQuests = TI_TabulateGossipQuestUIInfo(C_GossipInfo.GetActiveQuests());
|
||||
GossipOptions = TI_TabulateGossipUIInfo(C_GossipInfo.GetOptions());
|
||||
SAcQ = C_GossipInfo.SelectActiveQuest;
|
||||
SAvQ = C_GossipInfo.SelectAvailableQuest;
|
||||
elseif(gorq == "q") then
|
||||
AvailableQuests = TI_GetQuests("Available");
|
||||
ActiveQuests = TI_GetQuests("Active");
|
||||
GossipOptions = {};
|
||||
SAcQ=TI_FunctionList.q.activequest;
|
||||
SAvQ=TI_FunctionList.q.availquest;
|
||||
SAcQ=SelectActiveQuest;
|
||||
SAvQ=SelectAvailableQuest;
|
||||
end
|
||||
|
||||
|
||||
|
||||
local ListEntry = {};
|
||||
for i,v in ipairs(AvailableQuests) do
|
||||
local x={};
|
||||
@ -475,107 +433,95 @@ function TI_HandleGossipWindow(gorq)
|
||||
local x={};
|
||||
x.name = v.name;
|
||||
x.gorq = gorq;
|
||||
if x.orderIndex then
|
||||
x.args = v.orderIndex;
|
||||
else
|
||||
x.args = i;
|
||||
end
|
||||
x.args = i;
|
||||
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(TI_activenumber > ActiveQuests.getn()) TI_activenumber = 1;
|
||||
if(TotalOptions < 1) then
|
||||
return;
|
||||
end
|
||||
|
||||
|
||||
local npcname = UnitName("npc");
|
||||
if not issecretvalue(npcname) then
|
||||
TI_AddNPCToTempList(npcname, ListEntry);
|
||||
|
||||
if(TI_status.autoadd and (not TI_NPCDB[npcname])) then
|
||||
TI_debug("autoadd on, adding this NPC", TI_status.autoadd, TI_NPCDB[npcname]);
|
||||
TI_AddNPCToList(ListEntry, npcname);
|
||||
end
|
||||
|
||||
-- If a NPC is in the Database but a new dialog option has appeared (new daily/completed quest) then add it to the DB
|
||||
if (TI_NPCDB[npcname]) then
|
||||
for k1, v1 in ipairs(ListEntry) do
|
||||
local found = false;
|
||||
for k2, v2 in ipairs(TI_NPCDB[npcname]) do
|
||||
if (v2.type == v1.type and v2.name == v1.name) then
|
||||
found = true;
|
||||
end
|
||||
end
|
||||
if (not found) then
|
||||
table.insert(TI_NPCDB[npcname], v1)
|
||||
TI_PopulateOptions("npclist updated");
|
||||
TI_AddNPCToTempList(npcname, ListEntry);
|
||||
|
||||
if(TI_status.autoadd and (not TI_NPCDB[npcname])) then
|
||||
TI_debug("autoadd on, adding this NPC", TI_status.autoadd, TI_NPCDB[npcname]);
|
||||
TI_AddNPCToList(ListEntry, npcname);
|
||||
end
|
||||
|
||||
-- If a NPC is in the Database but a new dialog option has appeared (new daily/completed quest) then add it to the DB
|
||||
if (TI_NPCDB[npcname]) then
|
||||
for k1, v1 in ipairs(ListEntry) do
|
||||
local found = false;
|
||||
for k2, v2 in ipairs(TI_NPCDB[npcname]) do
|
||||
if (v2.type == v1.type and v2.name == v1.name) then
|
||||
found = true;
|
||||
end
|
||||
end
|
||||
if (not found) then
|
||||
table.insert(TI_NPCDB[npcname], v1)
|
||||
TI_PopulateOptions("npclist updated");
|
||||
end
|
||||
end
|
||||
|
||||
if(TI_availnumber > TotalOptions or TI_activenumber > TotalOptions) then
|
||||
TI_debug("Out of available/active quests, giving up ");
|
||||
TI_ResetPointers();
|
||||
return;
|
||||
end
|
||||
|
||||
TI_debug(npcname);
|
||||
if(TI_NPCDB[npcname]) then
|
||||
local thisnpc = TI_NPCDB[npcname];
|
||||
if(thisnpc.state) then
|
||||
TI_debug("npc is active, using his options");
|
||||
for i1,current in ipairs(thisnpc) do
|
||||
if (current.state == true) then
|
||||
TI_debug("Current Quest: "..current.name);
|
||||
if (TI_specnum == 0 or i1 > TI_specnum) then
|
||||
TI_specnum = i1;
|
||||
if (current.type == "availquest") then
|
||||
for i2,v2 in ipairs(AvailableQuests) do
|
||||
if (v2.name == current.name) then
|
||||
TI_debug(i1.."-Available Match Found: "..current.name);
|
||||
SAvQ(v2.questID);
|
||||
return;
|
||||
end
|
||||
end
|
||||
|
||||
if(TI_availnumber > TotalOptions or TI_activenumber > TotalOptions) then
|
||||
TI_ResetPointers();
|
||||
return;
|
||||
end
|
||||
|
||||
TI_debug(npcname);
|
||||
if(TI_NPCDB[npcname]) then
|
||||
local thisnpc = TI_NPCDB[npcname];
|
||||
if(thisnpc.state) then
|
||||
TI_debug("npc is active, using his options");
|
||||
for i1,current in ipairs(thisnpc) do
|
||||
if (current.state == true) then
|
||||
TI_debug("Current Quest: "..current.name);
|
||||
if (TI_specnum == 0 or i1 > TI_specnum) then
|
||||
TI_specnum = i1;
|
||||
if (current.type == "availquest") then
|
||||
for i2,v2 in ipairs(AvailableQuests) do
|
||||
if (v2.name == current.name) then
|
||||
TI_debug(i1.."-Available Match Found: "..current.name);
|
||||
TI_FunctionList[current.gorq]["availquest"](i2);
|
||||
return;
|
||||
end
|
||||
elseif (current.type == "activequest") then
|
||||
for i2,v2 in ipairs(ActiveQuests) do
|
||||
if (v2.name == current.name) then
|
||||
TI_debug(i1.."-Active Match Found: "..current.name..", "..current.type);
|
||||
SAcQ(v2.questID);
|
||||
return;
|
||||
end
|
||||
end
|
||||
elseif (current.type == "activequest") then
|
||||
for i2,v2 in ipairs(ActiveQuests) do
|
||||
if (v2.name == current.name) then
|
||||
TI_debug(i1.."-Active Match Found: "..current.name..", "..current.type);
|
||||
TI_FunctionList[current.gorq]["activequest"](i2);
|
||||
return;
|
||||
end
|
||||
else
|
||||
for i2,v2 in ipairs(GossipOptions) do
|
||||
if (v2.name == current.name) then
|
||||
TI_debug(i1.."-Gossip Match Found: "..current.name..", "..current.type);
|
||||
if(v2.args) then
|
||||
TI_FunctionList.g.gossip(v2.args);
|
||||
else
|
||||
TI_FunctionList.g.gossip(i2);
|
||||
end
|
||||
return;
|
||||
end
|
||||
end
|
||||
else
|
||||
for i2,v2 in ipairs(GossipOptions) do
|
||||
if (v2.name == current.name) then
|
||||
TI_debug(i1.."-Gossip Match Found: "..current.name..", "..current.type);
|
||||
C_GossipInfo.SelectOption(i2);
|
||||
return;
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return;
|
||||
else
|
||||
TI_debug("npc in list, but not active");
|
||||
end
|
||||
return;
|
||||
else
|
||||
TI_debug("npc not in list");
|
||||
TI_debug("npc in list, but not active");
|
||||
end
|
||||
else
|
||||
TI_debug("npc not in list");
|
||||
end
|
||||
|
||||
if(TI_status.usedefault == false) then
|
||||
TI_debug("npc not in list, default set to off, returning.");
|
||||
return;
|
||||
@ -584,27 +530,29 @@ function TI_HandleGossipWindow(gorq)
|
||||
for i,current in ipairs(TI_status.options) do
|
||||
if(current.state) then
|
||||
if(current.type == "availquest" and #AvailableQuests > 0 and TI_availnumber <= #AvailableQuests) then
|
||||
SAvQ(AvailableQuests[TI_availnumber].questID);
|
||||
TI_debug("Selecting Available Quest ".. TI_availnumber);
|
||||
TI_availnumber = TI_availnumber + 1;
|
||||
SAvQ(TI_availnumber-1);
|
||||
TI_debug("Selecting Available Quest ".. TI_availnumber-1);
|
||||
TI_ResetPointers();
|
||||
return;
|
||||
elseif(current.type == "activequest" and #ActiveQuests > 0 and TI_activenumber <= #ActiveQuests) then
|
||||
DevTools_Dump(ActiveQuests);
|
||||
while TI_activenumber <= #ActiveQuests do
|
||||
if ActiveQuests[TI_activenumber].isComplete then
|
||||
TI_debug("Selecting Active Quest ".. TI_activenumber .. " " .. ActiveQuests[TI_activenumber].name );
|
||||
SAcQ(ActiveQuests[TI_activenumber].questID);
|
||||
TI_activenumber = TI_activenumber + 1;
|
||||
if ActiveQuests[TI_activenumber-1].isComplete then
|
||||
TI_debug("Selecting Active Quest ".. TI_activenumber-1 .. " " .. ActiveQuests[TI_activenumber-1].name );
|
||||
SAcQ(TI_activenumber-1);
|
||||
TI_ResetPointers();
|
||||
return;
|
||||
else
|
||||
TI_debug("Active Quest ".. TI_activenumber .. " " .. ActiveQuests[TI_activenumber].name .. " is not complete")
|
||||
TI_activenumber = TI_activenumber + 1;
|
||||
TI_debug("Active Quest ".. TI_activenumber-1 .. " " .. ActiveQuests[TI_activenumber-1].name .. " is not complete")
|
||||
end
|
||||
end
|
||||
elseif(#GossipOptions > 0) then
|
||||
for j,val in ipairs(GossipOptions) do
|
||||
if(val.type == current.type) then
|
||||
TI_ResetPointers();
|
||||
TI_debug("Selecting Gossip Option "..j)
|
||||
TI_FunctionList.g.gossip(val.args);
|
||||
C_GossipInfo.SelectOption(j);
|
||||
return;
|
||||
end
|
||||
end
|
||||
@ -677,21 +625,29 @@ function TI_StripDescriptors(...)
|
||||
return x;
|
||||
end
|
||||
|
||||
function TI_TabulateGossipOptions(...)
|
||||
local x = {};
|
||||
local arg = {...};
|
||||
for i=1, #arg, 2 do
|
||||
local temp = {};
|
||||
temp.name = arg[i];
|
||||
temp.type = arg[i+1];
|
||||
table.insert(x, temp);
|
||||
end
|
||||
return x;
|
||||
end
|
||||
|
||||
function TI_TabulateGossipQuestUIInfo(gquis)
|
||||
local x = {};
|
||||
|
||||
for i,gqui in ipairs(gquis) do
|
||||
DevTools_Dump(gqui)
|
||||
local temp = {};
|
||||
temp.name = gqui.title;
|
||||
|
||||
temp.icon = QuestUtil.GetQuestIconOffer(
|
||||
gqui.isLegendary,
|
||||
gqui.frequency,
|
||||
gqui.isRepeatable,
|
||||
false,
|
||||
false
|
||||
);
|
||||
temp.questID = gqui.questID;
|
||||
temp.icon = QuestUtil.GetQuestIconActive(gqui.isComplete, gqui.isLegendary,
|
||||
gqui.frequency, gqui.isRepeatable, gqui.isCampaign, gqui.isCovenantCalling);
|
||||
|
||||
temp.isComplete = gqui.isComplete;
|
||||
|
||||
table.insert(x, temp);
|
||||
@ -701,97 +657,22 @@ end
|
||||
|
||||
function TI_TabulateGossipUIInfo(guis)
|
||||
local x = {};
|
||||
table.sort(guis, GossipOptionSort);
|
||||
|
||||
for i,gui in ipairs(guis) do
|
||||
local temp = {};
|
||||
temp.name = gui.name;
|
||||
local gossipType = TI_TranslateIconToType(gui.icon)
|
||||
if gossipType == "chatbubble" then
|
||||
gossipType = "gossip"
|
||||
if gui.type == "chatbubble" then
|
||||
gui.type = "gossip"
|
||||
end
|
||||
temp.type = gossipType;
|
||||
temp.icon = gui.icon;
|
||||
temp.gossipOptionID = gui.gossipOptionID
|
||||
temp.orderIndex = gui.orderIndex
|
||||
temp.args = gui.orderIndex
|
||||
temp.type = gui.type;
|
||||
table.insert(x, temp);
|
||||
end
|
||||
return x;
|
||||
end
|
||||
|
||||
|
||||
function TI_TabulateGossipAvailableQuests_Classic(gquis)
|
||||
local x = {};
|
||||
|
||||
for i,gqui in ipairs(gquis) do
|
||||
local temp = {};
|
||||
temp.name = gqui.title;
|
||||
|
||||
if ( gqui.repeatable ) then
|
||||
temp.icon = "Interface\\GossipFrame\\DailyQuestIcon";
|
||||
elseif ( gqui.isLegendary ) then
|
||||
temp.icon = "Interface\\GossipFrame\\AvailableLegendaryQuestIcon";
|
||||
else
|
||||
temp.icon = "Interface\\GossipFrame\\AvailableQuestIcon";
|
||||
end
|
||||
temp.questID = gqui.questID;
|
||||
temp.isComplete = gqui.isComplete;
|
||||
|
||||
table.insert(x, temp);
|
||||
end
|
||||
return x;
|
||||
end
|
||||
|
||||
function TI_TabulateGossipActiveQuests_Classic(gquis)
|
||||
local x = {};
|
||||
|
||||
for i,gqui in ipairs(gquis) do
|
||||
local temp = {};
|
||||
temp.name = gqui.title;
|
||||
|
||||
if ( gqui.repeatable ) then
|
||||
temp.icon = "Interface\\GossipFrame\\DailyQuestIcon";
|
||||
elseif ( gqui.isLegendary ) then
|
||||
temp.icon = "Interface\\GossipFrame\\AvailableLegendaryQuestIcon";
|
||||
else
|
||||
temp.icon = "Interface\\GossipFrame\\AvailableQuestIcon";
|
||||
end
|
||||
temp.questID = gqui.questID;
|
||||
temp.isComplete = gqui.isComplete;
|
||||
|
||||
table.insert(x, temp);
|
||||
end
|
||||
return x;
|
||||
end
|
||||
|
||||
TI_FunctionList = {}
|
||||
function TI_SetupFunctions()
|
||||
TI_FunctionList = {
|
||||
g = {
|
||||
availquest = C_GossipInfo.SelectAvailableQuest,
|
||||
activequest = C_GossipInfo.SelectActiveQuest,
|
||||
gossip = C_GossipInfo.SelectOptionByIndex,
|
||||
getavailquests = C_GossipInfo.GetAvailableQuests,
|
||||
getactivequests = C_GossipInfo.GetActiveQuests,
|
||||
getoptions = C_GossipInfo.GetOptions,
|
||||
tabulateOptions = TI_TabulateGossipUIInfo,
|
||||
},
|
||||
q = {
|
||||
activequest = SelectActiveQuest,
|
||||
availquest = SelectAvailableQuest,
|
||||
}
|
||||
}
|
||||
if QuestUtil.GetQuestIconOffer then
|
||||
TI_FunctionList.g.tabulateAvailable = TI_TabulateGossipQuestUIInfo
|
||||
TI_FunctionList.g.tabulateActive = TI_TabulateGossipQuestUIInfo
|
||||
else
|
||||
TI_FunctionList.g.tabulateAvailable = TI_TabulateGossipAvailableQuests_Classic
|
||||
TI_FunctionList.g.tabulateActive = TI_TabulateGossipActiveQuests_Classic
|
||||
end
|
||||
end
|
||||
TI_SetupFunctions()
|
||||
|
||||
|
||||
|
||||
--[[this function stolen from WhisperCast by Sarris, whom I love dearly for his contribution to Paladins everywhere.
|
||||
]]
|
||||
function TI_copyTable( src )
|
||||
local copy = {}
|
||||
for k1,v1 in pairs(src) do
|
||||
@ -813,3 +694,4 @@ function toggle(arg)
|
||||
return true;
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
6
TurnIn.toc
Executable file → Normal file
6
TurnIn.toc
Executable file → Normal file
@ -1,7 +1,7 @@
|
||||
## Interface: 120100, 120000, 120001, 50503, 40402, 30405, 20505, 11508
|
||||
## X-Compatible-With: 120100, 120000, 120001, 50503, 40402, 30405, 20505, 11508
|
||||
## Interface: 90002
|
||||
## X-Compatible-With: 90002
|
||||
## Title: Turn In
|
||||
## Notes: Automates the selection of quest and gossip options.
|
||||
## SavedVariables: TI_status, TI_NPCDB, TI_NPCIndex
|
||||
## Version: 2.2
|
||||
## Version: 2.1
|
||||
TurnIn.xml
|
||||
|
||||
252
TurnIn.xml
Executable file → Normal file
252
TurnIn.xml
Executable file → Normal file
@ -1,5 +1,4 @@
|
||||
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd">
|
||||
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd">
|
||||
<Script file="TurnIn.lua" />
|
||||
<Script file="TurnInUI.lua" />
|
||||
|
||||
@ -19,8 +18,19 @@
|
||||
</Layer>
|
||||
</Layers>
|
||||
<KeyValues>
|
||||
<KeyValue key="backdropInfo" value="BACKDROP_TUTORIAL_16_16" type="global"/>
|
||||
<KeyValue key="backdropInfo" value="BACKDROP_TOOLTIP_16_16_5555" type="global"/>
|
||||
</KeyValues>
|
||||
<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
|
||||
<EdgeSize>
|
||||
<AbsValue val="16"/>
|
||||
</EdgeSize>
|
||||
<TileSize>
|
||||
<AbsValue val="16"/>
|
||||
</TileSize>
|
||||
<BackgroundInsets>
|
||||
<AbsInset left="5" right="5" top="5" bottom="5"/>
|
||||
</BackgroundInsets>
|
||||
</Backdrop>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
self:ApplyBackdrop();
|
||||
@ -45,7 +55,7 @@
|
||||
-->
|
||||
</Scripts>
|
||||
<Frames>
|
||||
<CheckButton name="$parent_Check" hidden="false" inherits="UICheckButtonTemplate">
|
||||
<CheckButton name="$parent_Check" hidden="false" inherits="OptionsCheckButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT"/>
|
||||
</Anchors>
|
||||
@ -136,7 +146,7 @@
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
<FontString name="$parent_Text" inherits="GameFontNormal" justifyV="TOP" justifyH="LEFT">
|
||||
<FontString name="$parent_Text" inherits="GameFontNormal" justifyV="top" justifyH="left">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="$parent_Icon" relativePoint="TOPRIGHT">
|
||||
<Offset>
|
||||
@ -181,7 +191,7 @@
|
||||
<AbsDimension x="232" y="20" />
|
||||
</Size>
|
||||
<Frames>
|
||||
<CheckButton name="$parent_Check" hidden="false" inherits="UICheckButtonTemplate">
|
||||
<CheckButton name="$parent_Check" hidden="false" inherits="OptionsCheckButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT"/>
|
||||
</Anchors>
|
||||
@ -204,7 +214,7 @@
|
||||
</OnLeave>
|
||||
</Scripts>
|
||||
</CheckButton>
|
||||
<Button name="$parent_Delete" hidden="false" inherits="UIPanelButtonTemplate" text="X">
|
||||
<Button name="$parent_Delete" hidden="false" inherits="OptionsButtonTemplate" text="X">
|
||||
<Anchors>
|
||||
<Anchor point="RIGHT">
|
||||
<Offset>
|
||||
@ -230,7 +240,7 @@
|
||||
</Frames>
|
||||
<Layers>
|
||||
<Layer level="ARTWORK">
|
||||
<FontString name="$parent_Text" justifyV="TOP" justifyH="LEFT" inherits="GameFontNormal" text="">
|
||||
<FontString name="$parent_Text" justifyV="top" justifyH="left" inherits="GameFontNormal" text="">
|
||||
<Anchors>
|
||||
<Anchor point="LEFT">
|
||||
<Offset>
|
||||
@ -251,7 +261,7 @@
|
||||
|
||||
<GameTooltip name="TI_Tooltip" hidden="true" inherits="GameTooltipTemplate" />
|
||||
|
||||
<Frame name="TI_TempNPCListEntry" virtual="true" hidden="true">
|
||||
<Frame Name="TI_TempNPCListEntry" virtual="true" hidden="true">
|
||||
<Scripts>
|
||||
<OnEnter>
|
||||
TI_TempNPCListTooltipShow(self);
|
||||
@ -266,7 +276,7 @@
|
||||
|
||||
<Layers>
|
||||
<Layer level="ARTWORK">
|
||||
<FontString name="$parent_Text" justifyV="TOP" justifyH="LEFT" inherits="GameFontNormal" text="">
|
||||
<FontString name="$parent_Text" justifyV="top" justifyH="left" inherits="GameFontNormal" text="">
|
||||
<Anchors>
|
||||
<Anchor point="LEFT">
|
||||
<Offset>
|
||||
@ -278,7 +288,7 @@
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Frames>
|
||||
<Button name="$parent_Delete" hidden="false" inherits="UIPanelButtonTemplate" text="X">
|
||||
<Button name="$parent_Delete" hidden="false" inherits="OptionsButtonTemplate" text="X">
|
||||
<Anchors>
|
||||
<Anchor point="TOPRIGHT">
|
||||
<Offset>
|
||||
@ -301,7 +311,7 @@
|
||||
</OnLeave>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<Button name="$parent_Add" hidden="false" inherits="UIPanelButtonTemplate" text="+">
|
||||
<Button name="$parent_Add" hidden="false" inherits="OptionsButtonTemplate" text="+">
|
||||
<Anchors>
|
||||
<Anchor point="RIGHT" relativeTo="$parent_Delete" relativePoint="LEFT">
|
||||
<Offset>
|
||||
@ -327,7 +337,7 @@
|
||||
</Frames>
|
||||
</Frame>
|
||||
|
||||
<Frame name="TI_TempNPCListWindow" parent="UIParent" frameStrata="DIALOG" toplevel="true" enableMouse="true" movable="true" hidden="true" inherits="BackdropTemplate">
|
||||
<Frame Name="TI_TempNPCListWindow" parent="UIParent" frameStrata="DIALOG" toplevel="true" enableMouse="true" movable="true" hidden="true" inherits="BackdropTemplate">
|
||||
<Size>
|
||||
<AbsDimension x="200" y="130" />
|
||||
</Size>
|
||||
@ -398,19 +408,21 @@
|
||||
</Frame>
|
||||
</Frames>
|
||||
<KeyValues>
|
||||
<KeyValue key="backdropInfo" value="BACKDROP_TUTORIAL_16_16" type="global"/>
|
||||
<KeyValue key="backdropInfo" value="BACKDROP_TOOLTIP_16_16_5555" type="global"/>
|
||||
</KeyValues>
|
||||
<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
|
||||
<EdgeSize>
|
||||
<AbsValue val="16"/>
|
||||
</EdgeSize>
|
||||
<TileSize>
|
||||
<AbsValue val="16"/>
|
||||
</TileSize>
|
||||
<BackgroundInsets>
|
||||
<AbsInset left="5" right="5" top="5" bottom="5"/>
|
||||
</BackgroundInsets>
|
||||
</Backdrop>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
self.backdropInfo = {
|
||||
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
|
||||
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
|
||||
tile = true,
|
||||
tileEdge = true,
|
||||
tileSize = 16,
|
||||
edgeSize = 16,
|
||||
insets = { left = 5, right = 5, top = 5, bottom = 5 },
|
||||
};
|
||||
self:ApplyBackdrop();
|
||||
self:SetBackdropBorderColor(0.6, 0.6, 0.6);
|
||||
self:SetBackdropColor(0.2, 0.2, 0.2);
|
||||
@ -436,11 +448,34 @@
|
||||
</Scripts>
|
||||
</Frame>
|
||||
|
||||
<Frame name="TI_OptionsFrame" inherits="BackdropTemplate" frameStrata="DIALOG" toplevel="true" enableMouse="true" movable="true" parent="UIParent">
|
||||
<Frame Name="TI_OptionsFrame" inherits="BackdropTemplate" frameStrata="DIALOG" toplevel="true" enableMouse="true" enableMouseWheel="true" movable="true" parent="UIParent">
|
||||
<TitleRegion>
|
||||
<Size>
|
||||
<AbsDimension x="128" y="64"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOP">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="12"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</TitleRegion>
|
||||
|
||||
<KeyValues>
|
||||
<KeyValue key="backdropInfo" value="BACKDROP_DIALOG_32_32" type="global"/>
|
||||
</KeyValues>
|
||||
<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
|
||||
<BackgroundInsets>
|
||||
<AbsInset left="11" right="12" top="12" bottom="11"/>
|
||||
</BackgroundInsets>
|
||||
<TileSize>
|
||||
<AbsValue val="32"/>
|
||||
</TileSize>
|
||||
<EdgeSize>
|
||||
<AbsValue val="32"/>
|
||||
</EdgeSize>
|
||||
</Backdrop>
|
||||
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
@ -511,7 +546,7 @@
|
||||
<AbsDimension x="200" y="20" />
|
||||
</Size>
|
||||
<Frames>
|
||||
<CheckButton name="$parent_Checkbox" hidden="false" inherits="UICheckButtonTemplate">
|
||||
<CheckButton name="$parent_Checkbox" hidden="false" inherits="OptionsCheckButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
@ -573,7 +608,7 @@
|
||||
<AbsDimension x="200" y="40" />
|
||||
</Size>
|
||||
<Frames>
|
||||
<CheckButton name="$parent_UseDefault" hidden="false" inherits="UICheckButtonTemplate">
|
||||
<CheckButton name="$parent_UseDefault" hidden="false" inherits="OptionsCheckButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
@ -593,7 +628,7 @@
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</CheckButton>
|
||||
<CheckButton name="$parent_AddAutomatically" hidden="false" inherits="UICheckButtonTemplate">
|
||||
<CheckButton name="$parent_AddAutomatically" hidden="false" inherits="OptionsCheckButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="$parent_UseDefault" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
@ -684,6 +719,167 @@
|
||||
<Size>
|
||||
<AbsDimension x="200" y="30"/>
|
||||
</Size>
|
||||
|
||||
<!--<Layers>
|
||||
<Layer level="OVERLAY">
|
||||
<FontString name="$parentText" justifyV="top" justifyH="left" inherits="GameFontNormal" text="Gossip Options">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" />
|
||||
</Anchors>
|
||||
</FontString>
|
||||
</Layer>
|
||||
<Layer level="BACKGROUND">
|
||||
<Texture name="$parent_Background" setAllPoints="true">
|
||||
<Color r="0" g="1" b="0" a="0.0"/>
|
||||
</Texture>
|
||||
</Layer>
|
||||
</Layers>-->
|
||||
<Frames>
|
||||
<Button name="$parent1" id="1" hidden="true" inherits="TI_PriorityList">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="$parent2" id="2" hidden="true" inherits="TI_PriorityList">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent1">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="$parent3" id="3" hidden="true" inherits="TI_PriorityList">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent2">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="$parent4" id="4" hidden="true" inherits="TI_PriorityList">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent3">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="$parent5" id="5" hidden="true" inherits="TI_PriorityList">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent4">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="$parent6" id="6" hidden="true" inherits="TI_PriorityList">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent5">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="$parent7" id="7" hidden="true" inherits="TI_PriorityList">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent6">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="$parent8" id="8" hidden="true" inherits="TI_PriorityList">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent7">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="$parent9" id="9" hidden="true" inherits="TI_PriorityList">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent8">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="$parent10" id="10" hidden="true" inherits="TI_PriorityList">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent9">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="$parent11" id="11" hidden="true" inherits="TI_PriorityList">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent10">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="$parent12" id="12" hidden="true" inherits="TI_PriorityList">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent11">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="$parent13" id="13" hidden="true" inherits="TI_PriorityList">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent12">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="$parent14" id="14" hidden="true" inherits="TI_PriorityList">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent13">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="$parent15" id="15" hidden="true" inherits="TI_PriorityList">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent14">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="$parent16" id="16" hidden="true" inherits="TI_PriorityList">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent15">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Button>
|
||||
</Frames>
|
||||
</Frame>
|
||||
</ScrollChild>
|
||||
</ScrollFrame>
|
||||
@ -711,7 +907,7 @@
|
||||
</Size>
|
||||
<Frames>
|
||||
|
||||
<ScrollFrame name="TI_NPCListScrollFrame" inherits="FauxScrollFrameTemplate" hidden="false" >
|
||||
<ScrollFrame name="TI_NPCListScrollFrame" inherits="FauxScrollFrameTemplate" hidden="false" enableMouseWheel="true">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
|
||||
88
TurnInUI.lua
Executable file → Normal file
88
TurnInUI.lua
Executable file → Normal file
@ -1,30 +1,3 @@
|
||||
local TI_OptionsPriorityFramePool = {};
|
||||
local TI_OptionsPriorityFramePoolMax = 0;
|
||||
|
||||
local function TI_GetOptionsPriorityFrame(idx)
|
||||
if idx > TI_OptionsPriorityFramePoolMax then
|
||||
for i=TI_OptionsPriorityFramePoolMax+1, idx, 1 do
|
||||
local frame = CreateFrame("Button", "TI_OptionsPriority"..i,
|
||||
getglobal("TI_OptionsPriority"), "TI_PriorityList", i);
|
||||
if i == 1 then
|
||||
frame:SetPoint("TOPLEFT", 0, 0);
|
||||
else
|
||||
frame:SetPoint("TOPLEFT", "TI_OptionsPriority"..i-1, "BOTTOMLEFT", 0, 0);
|
||||
end
|
||||
frame:Hide();
|
||||
table.insert(TI_OptionsPriorityFramePool, i, frame);
|
||||
TI_OptionsPriorityFramePoolMax = TI_OptionsPriorityFramePoolMax + 1;
|
||||
end
|
||||
end
|
||||
return TI_OptionsPriorityFramePool[idx];
|
||||
end
|
||||
|
||||
local function TI_HideUnusedOptionFrames(last)
|
||||
for i=last, TI_OptionsPriorityFramePoolMax, 1 do
|
||||
TI_OptionsPriorityFramePool[i]:Hide();
|
||||
end
|
||||
end
|
||||
|
||||
function TI_PopulateOptions(arg)
|
||||
TI_debug(arg);
|
||||
local CurrOpts;
|
||||
@ -37,9 +10,9 @@ function TI_PopulateOptions(arg)
|
||||
end
|
||||
|
||||
for i,v in ipairs(CurrOpts) do
|
||||
local entrybutton = TI_GetOptionsPriorityFrame(i);
|
||||
local icon, entrytext = entrybutton:GetRegions();
|
||||
local checkbox = entrybutton:GetChildren();
|
||||
local entry = "TI_OptionsPriority" .. i;
|
||||
local entrybutton = getglobal(entry);
|
||||
local entrytext = getglobal("TI_OptionsPriority"..i.."_Text");
|
||||
local iconpath;
|
||||
if(v.name == nil) then TI_debug("oh noes") end;
|
||||
entrytext:SetText(v.name);
|
||||
@ -56,21 +29,18 @@ function TI_PopulateOptions(arg)
|
||||
iconpath = "Interface/GossipFrame/AvailableQuestIcon";
|
||||
end
|
||||
else
|
||||
if(v.icon) then
|
||||
iconpath = v.icon;
|
||||
else
|
||||
iconpath = "Interface/GossipFrame/" .. v.type .. "GossipIcon";
|
||||
end
|
||||
iconpath = "Interface/GossipFrame/" .. v.type .. "GossipIcon";
|
||||
end
|
||||
icon:SetTexture(iconpath);
|
||||
checkbox:SetChecked(v.state);
|
||||
getglobal(entry .. "_Icon"):SetTexture(iconpath);
|
||||
getglobal(entry .. "_Check"):SetChecked(v.state);
|
||||
entrytext:SetWidth(156); --make sure to change this if you change the anchors in the XML
|
||||
entrybutton:SetHeight( entrytext:GetHeight() + 6);
|
||||
entrybutton:Show();
|
||||
last = last+1;
|
||||
end
|
||||
TI_HideUnusedOptionFrames(last);
|
||||
|
||||
for j=last, 16, 1 do
|
||||
getglobal("TI_OptionsPriority" .. j):Hide();
|
||||
end
|
||||
TI_OptionsPriorityScrollFrame:SetVerticalScroll(0);
|
||||
TI_OptionsPriorityScrollFrame:UpdateScrollChildRect();
|
||||
TI_StatusIndicatorUpdate();
|
||||
@ -79,6 +49,31 @@ function TI_PopulateOptions(arg)
|
||||
TI_SettingCheckboxUpdate();
|
||||
end
|
||||
|
||||
--[[
|
||||
function TI_PopulateOptions(arg)
|
||||
TI_debug(arg);
|
||||
if(TI_status and TI_status.options) then
|
||||
for i,v in ipairs(TI_status.options) do
|
||||
local entry = "TI_OptionsPriority" .. i;
|
||||
local iconpath;
|
||||
if(v.name == nil) then TI_debug("oh noes") end;
|
||||
if(getglobal(entry .. "_Text") == nil) then TI_debug("wtf "..entry .. "_Text") end;
|
||||
getglobal(entry .. "_Text"):SetText(v.name);
|
||||
if(v.type == "activequest") then
|
||||
iconpath = "Interface\\GossipFrame\\ActiveQuestIcon";
|
||||
elseif(v.type == "availquest") then
|
||||
iconpath = "Interface\\GossipFrame\\AvailableQuestIcon";
|
||||
else
|
||||
iconpath = "Interface\\GossipFrame\\" .. v.type .. "GossipIcon";
|
||||
end
|
||||
getglobal(entry .. "_Icon"):SetTexture(iconpath);
|
||||
getglobal(entry .. "_Check"):SetChecked(v.state);
|
||||
getglobal(entry):Show();
|
||||
end
|
||||
end
|
||||
TI_NPCListScrollBarUpdate();
|
||||
end
|
||||
]]--
|
||||
|
||||
function TI_NPCListScrollBarUpdate()
|
||||
if(TI_NPCIndex) then
|
||||
@ -90,7 +85,20 @@ function TI_NPCListScrollBarUpdate()
|
||||
local offset = FauxScrollFrame_GetOffset(TI_NPCListScrollFrame);
|
||||
local i=1;
|
||||
local j=1;
|
||||
|
||||
--~ for k, v in pairs(TI_NPCDB) do
|
||||
--~ if(offset <= i and i < offset+8) then
|
||||
--~ if(i <= table.getn(TI_NPCDB)) then
|
||||
--~ getglobal("TI_OptionsNPCContainer"..j.."_Text"):SetText(k);
|
||||
--~ getglobal("TI_OptionsNPCContainer"..j.."_Check"):SetChecked(v.state);
|
||||
--~ getglobal("TI_OptionsNPCContainer"..j):Show();
|
||||
--~ else
|
||||
--~ getglobal("TI_OptionsNPCContainer"..j):Hide();
|
||||
--~ end
|
||||
--~ j = j + 1;
|
||||
--~ end
|
||||
--~ i = i + 1;
|
||||
--~ end
|
||||
|
||||
for line=1,8 do
|
||||
lineplusoffset = line + FauxScrollFrame_GetOffset(TI_NPCListScrollFrame);
|
||||
if(lineplusoffset <= table.getn(TI_NPCIndex)) then
|
||||
|
||||
@ -1 +0,0 @@
|
||||
package-as: TurnIn
|
||||
Loading…
Reference in New Issue
Block a user