diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..97c63fd
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.sync/
\ No newline at end of file
diff --git a/TurnIn.lua b/TurnIn.lua
index 19a633f..35cf6cc 100644
--- a/TurnIn.lua
+++ b/TurnIn.lua
@@ -37,9 +37,9 @@ local TI_GossipDefaults = {
local TI_FunctionList = {
g = {
- availquest = SelectGossipAvailableQuest,
- activequest = SelectGossipActiveQuest,
- default = SelectGossipOption
+ availquest = C_GossipInfo.SelectActiveQuest,
+ activequest = C_GossipInfo.SelectAvailableQuest,
+ default = C_GossipInfo.SelectOption
},
q = {
availquest = SelectAvailableQuest,
@@ -394,11 +394,11 @@ function TI_HandleGossipWindow(gorq)
local ActiveQuests;
local GossipOptions;
if(gorq == "g") then
- AvailableQuests = TI_TabulateGossipAvailableQuests(GetGossipAvailableQuests());
- ActiveQuests = TI_TabulateGossipActiveQuests(GetGossipActiveQuests());
- GossipOptions = TI_TabulateGossipOptions(GetGossipOptions());
- SAcQ = SelectGossipActiveQuest;
- SAvQ = SelectGossipAvailableQuest;
+ 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");
@@ -507,7 +507,7 @@ function TI_HandleGossipWindow(gorq)
for i2,v2 in ipairs(GossipOptions) do
if (v2.name == current.name) then
TI_debug(i1.."-Gossip Match Found: "..current.name..", "..current.type);
- SelectGossipOption(i2);
+ C_GossipInfo.SelectOption(i2);
return;
end
end
@@ -543,7 +543,7 @@ function TI_HandleGossipWindow(gorq)
for j,val in ipairs(GossipOptions) do
if(val.type == current.type) then
TI_ResetPointers();
- SelectGossipOption(j);
+ C_GossipInfo.SelectOption(j);
return;
end
end
@@ -628,56 +628,34 @@ function TI_TabulateGossipOptions(...)
return x;
end
-function TI_TabulateGossipAvailableQuests(...)
+function TI_TabulateGossipQuestUIInfo(gquis)
local x = {};
- for i=1, select("#", ...), 7 do
+ for i,gqui in ipairs(gquis) do
local temp = {};
- temp.name = select(i, ...);
+ temp.name = gqui.name;
+
+ temp.icon = QuestUtil.GetQuestIconActive(gqui.isComplete, gqui.isLegendary,
+ gqui.frequency, gqui.isRepeatable, gqui.isCampaign, gqui.isCovenantCalling)
- 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.icon = "Interface\\GossipFrame\\DailyQuestIcon";
- elseif ( isRepeatable ) then
- temp.icon = "Interface\\GossipFrame\\DailyActiveQuestIcon";
- elseif ( isLegendary ) then
- temp.icon = "Interface\\GossipFrame\\AvailableLegendaryQuestIcon";
- else
- temp.icon = "Interface\\GossipFrame\\AvailableQuestIcon";
- end
table.insert(x, temp);
end
return x;
end
-function TI_TabulateGossipActiveQuests(...)
+function TI_TabulateGossipUIInfo(guis)
local x = {};
- for i=1, select("#", ...), 6 do
+ for i,gui in ipairs(guis) do
local temp = {};
- temp.name = select(i, ...);
-
- local isComplete = select(i+3, ...);
- local isLegendary = select(i+4, ...);
- if(isComplete) then
- if(isLegendary) then
- temp.icon = "Interface\\GossipFrame\\ActiveLegendaryQuestIcon";
- else
- temp.icon = "Interface\\GossipFrame\\ActiveQuestIcon";
- end
- else
- temp.icon = "Interface\\GossipFrame\\IncompleteQuestIcon";
- end
-
+ temp.name = gui.name;
+ temp.type = gui.type;
table.insert(x, temp);
end
return x;
end
+
--[[this function stolen from WhisperCast by Sarris, whom I love dearly for his contribution to Paladins everywhere.
]]
diff --git a/TurnIn.toc b/TurnIn.toc
index 8871252..2c10afb 100644
--- a/TurnIn.toc
+++ b/TurnIn.toc
@@ -1,5 +1,5 @@
-## Interface: 80000
-## X-Compatible-With: 80000
+## 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
diff --git a/TurnIn.xml b/TurnIn.xml
index 1862cc7..b779dee 100644
--- a/TurnIn.xml
+++ b/TurnIn.xml
@@ -2,7 +2,7 @@
-
+
@@ -17,6 +17,9 @@
+
+
+
@@ -30,6 +33,7 @@
+ self:ApplyBackdrop();
self:SetBackdropBorderColor(0.4, 0.4, 0.4);
self:SetBackdropColor(0.5, 0.5, 0.5);
@@ -333,7 +337,7 @@
-
+
@@ -403,6 +407,9 @@
+
+
+
@@ -415,6 +422,11 @@
+
+ self:ApplyBackdrop();
+ self:SetBackdropBorderColor(0.6, 0.6, 0.6);
+ self:SetBackdropColor(0.2, 0.2, 0.2);
+
if ( self.isMoving ) then
self:StopMovingOrSizing();
@@ -436,7 +448,7 @@
-
+
@@ -450,6 +462,9 @@
+
+
+
@@ -463,9 +478,17 @@
-
-
-
+
+ self:ApplyBackdrop()
+ self:EnableMouse(true)
+ self:RegisterForDrag("LeftButton")
+
+
+ self:StartMoving()
+
+
+ self:StopMovingOrSizing()
+
@@ -658,6 +681,7 @@
+ self:ApplyBackdrop();
self:SetBackdropBorderColor(0.4, 0.4, 0.4);
self:SetBackdropColor(0.15, 0.15, 0.15);
getglobal(self:GetName().."Title"):SetText("Gossip Options Priority List");
@@ -865,6 +889,7 @@
+ self:ApplyBackdrop();
self:SetBackdropBorderColor(0.4, 0.4, 0.4);
self:SetBackdropColor(0.15, 0.15, 0.15);
getglobal(self:GetName().."Title"):SetText("NPC Database");
diff --git a/TurnInUI.lua b/TurnInUI.lua
index e47cf94..81b47d8 100644
--- a/TurnInUI.lua
+++ b/TurnInUI.lua
@@ -20,16 +20,16 @@ function TI_PopulateOptions(arg)
if(v.icon) then
iconpath = v.icon;
else
- iconpath = "Interface\\GossipFrame\\ActiveQuestIcon";
+ iconpath = "Interface/GossipFrame/ActiveQuestIcon";
end
elseif(v.type == "availquest") then
if(v.icon) then
iconpath = v.icon;
else
- iconpath = "Interface\\GossipFrame\\AvailableQuestIcon";
+ iconpath = "Interface/GossipFrame/AvailableQuestIcon";
end
else
- iconpath = "Interface\\GossipFrame\\" .. v.type .. "GossipIcon";
+ iconpath = "Interface/GossipFrame/" .. v.type .. "GossipIcon";
end
getglobal(entry .. "_Icon"):SetTexture(iconpath);
getglobal(entry .. "_Check"):SetChecked(v.state);