Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
80232b7e0c |
74
TurnIn.lua
74
TurnIn.lua
@ -1,22 +1,14 @@
|
|||||||
--[[
|
--[[
|
||||||
Turn-In Mod
|
Turn-In Mod
|
||||||
version 2.1
|
version 2.3
|
||||||
Authored by Ian Friedman
|
Authored by Ian Friedman
|
||||||
Sabindeus of Smolderthorn (Alliance)
|
Sabindeus of Terenas (Alliance)
|
||||||
The repeatable quest turn in automating machine.
|
The repeatable quest turn in automating machine.
|
||||||
|
|
||||||
Thanks to Arcanemagus of Hyjal for extra bug fixes and coding input
|
Thanks to Arcanemagus of Hyjal for extra bug fixes and coding input
|
||||||
]]
|
]]
|
||||||
|
|
||||||
-- WOW Version detection
|
|
||||||
|
|
||||||
local function TI_IsRetail()
|
|
||||||
if WOW_PROJECT_ID == WOW_PROJECT_MAINLINE then
|
|
||||||
return true;
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
TI_VersionString = "2.0";
|
TI_VersionString = "2.0";
|
||||||
local TI_slashtable;
|
local TI_slashtable;
|
||||||
@ -45,7 +37,6 @@ local TI_GossipDefaults = {
|
|||||||
banker = "Bank"
|
banker = "Bank"
|
||||||
};
|
};
|
||||||
|
|
||||||
TI_FunctionList = {};
|
|
||||||
|
|
||||||
local TI_DefaultStatus = {
|
local TI_DefaultStatus = {
|
||||||
state = false,
|
state = false,
|
||||||
@ -683,19 +674,7 @@ function TI_StripDescriptors(...)
|
|||||||
return x;
|
return x;
|
||||||
end
|
end
|
||||||
|
|
||||||
function TI_TabulateGossipOptions_Classic(...)
|
function TI_TabulateGossipQuestUIInfo(gquis)
|
||||||
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_Retail(gquis)
|
|
||||||
local x = {};
|
local x = {};
|
||||||
|
|
||||||
for i,gqui in ipairs(gquis) do
|
for i,gqui in ipairs(gquis) do
|
||||||
@ -717,7 +696,7 @@ function TI_TabulateGossipQuestUIInfo_Retail(gquis)
|
|||||||
return x;
|
return x;
|
||||||
end
|
end
|
||||||
|
|
||||||
function TI_TabulateGossipUIInfo_Retail(guis)
|
function TI_TabulateGossipUIInfo(guis)
|
||||||
local x = {};
|
local x = {};
|
||||||
table.sort(guis, GossipOptionSort);
|
table.sort(guis, GossipOptionSort);
|
||||||
for i,gui in ipairs(guis) do
|
for i,gui in ipairs(guis) do
|
||||||
@ -731,16 +710,13 @@ function TI_TabulateGossipUIInfo_Retail(guis)
|
|||||||
temp.icon = gui.icon;
|
temp.icon = gui.icon;
|
||||||
temp.gossipOptionID = gui.gossipOptionID
|
temp.gossipOptionID = gui.gossipOptionID
|
||||||
temp.orderIndex = gui.orderIndex
|
temp.orderIndex = gui.orderIndex
|
||||||
if (TI_IsRetail()) then
|
temp.args = gui.orderIndex
|
||||||
temp.args = gui.orderIndex
|
|
||||||
else
|
|
||||||
temp.args = i
|
|
||||||
end
|
|
||||||
table.insert(x, temp);
|
table.insert(x, temp);
|
||||||
end
|
end
|
||||||
return x;
|
return x;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function TI_TabulateGossipAvailableQuests_Classic(gquis)
|
function TI_TabulateGossipAvailableQuests_Classic(gquis)
|
||||||
local x = {};
|
local x = {};
|
||||||
|
|
||||||
@ -785,8 +761,8 @@ function TI_TabulateGossipActiveQuests_Classic(gquis)
|
|||||||
return x;
|
return x;
|
||||||
end
|
end
|
||||||
|
|
||||||
-- set up functions by release type
|
TI_FunctionList = {}
|
||||||
if (TI_IsRetail()) then
|
function TI_SetupFunctions()
|
||||||
TI_FunctionList = {
|
TI_FunctionList = {
|
||||||
g = {
|
g = {
|
||||||
availquest = C_GossipInfo.SelectAvailableQuest,
|
availquest = C_GossipInfo.SelectAvailableQuest,
|
||||||
@ -795,38 +771,24 @@ if (TI_IsRetail()) then
|
|||||||
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,
|
tabulateOptions = TI_TabulateGossipUIInfo,
|
||||||
tabulateActive = TI_TabulateGossipQuestUIInfo_Retail,
|
|
||||||
tabulateOptions = TI_TabulateGossipUIInfo_Retail,
|
|
||||||
},
|
},
|
||||||
q = {
|
q = {
|
||||||
activequest = SelectActiveQuest,
|
activequest = SelectActiveQuest,
|
||||||
availquest = SelectAvailableQuest,
|
availquest = SelectAvailableQuest,
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
else
|
if QuestUtil.GetQuestIconOffer then
|
||||||
TI_FunctionList = {
|
TI_FunctionList.g.tabulateAvailable = TI_TabulateGossipQuestUIInfo
|
||||||
g = {
|
TI_FunctionList.g.tabulateActive = TI_TabulateGossipQuestUIInfo
|
||||||
availquest = C_GossipInfo.SelectAvailableQuest,
|
else
|
||||||
activequest = C_GossipInfo.SelectActiveQuest,
|
TI_FunctionList.g.tabulateAvailable = TI_TabulateGossipAvailableQuests_Classic
|
||||||
gossip = SelectGossipOption,
|
TI_FunctionList.g.tabulateActive = TI_TabulateGossipActiveQuests_Classic
|
||||||
getavailquests = C_GossipInfo.GetAvailableQuests,
|
end
|
||||||
getactivequests = C_GossipInfo.GetActiveQuests,
|
|
||||||
getoptions = C_GossipInfo.GetOptions,
|
|
||||||
tabulateAvailable = TI_TabulateGossipAvailableQuests_Classic,
|
|
||||||
tabulateActive = TI_TabulateGossipActiveQuests_Classic,
|
|
||||||
tabulateOptions = TI_TabulateGossipUIInfo_Retail,
|
|
||||||
},
|
|
||||||
q = {
|
|
||||||
activequest = SelectActiveQuest,
|
|
||||||
availquest = SelectAvailableQuest,
|
|
||||||
}
|
|
||||||
};
|
|
||||||
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 )
|
function TI_copyTable( src )
|
||||||
local copy = {}
|
local copy = {}
|
||||||
for k1,v1 in pairs(src) do
|
for k1,v1 in pairs(src) do
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
## Interface: 110205,110207,120000
|
## Interface: 120000, 120001, 50503, 40402, 30405, 20505, 11508
|
||||||
## X-Compatible-With: 110205,110207,120000
|
## X-Compatible-With: 120000, 120001, 50503, 40402, 30405, 20505, 11508
|
||||||
## Title: Turn In
|
## Title: Turn In
|
||||||
## Notes: Automates the selection of quest and gossip options.
|
## Notes: Automates the selection of quest and gossip options.
|
||||||
## SavedVariables: TI_status, TI_NPCDB, TI_NPCIndex
|
## SavedVariables: TI_status, TI_NPCDB, TI_NPCIndex
|
||||||
|
|||||||
@ -1,7 +0,0 @@
|
|||||||
## Interface: 40400
|
|
||||||
## X-Compatible-With: 40400
|
|
||||||
## Title: Turn In
|
|
||||||
## Notes: Automates the selection of quest and gossip options.
|
|
||||||
## SavedVariables: TI_status, TI_NPCDB, TI_NPCIndex
|
|
||||||
## Version: 2.2
|
|
||||||
TurnIn.xml
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
## Interface: 11503
|
|
||||||
## X-Compatible-With: 11503
|
|
||||||
## Title: Turn In
|
|
||||||
## Notes: Automates the selection of quest and gossip options.
|
|
||||||
## SavedVariables: TI_status, TI_NPCDB, TI_NPCIndex
|
|
||||||
## Version: 2.2
|
|
||||||
TurnIn.xml
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
## Interface: 30401
|
|
||||||
## X-Compatible-With: 30401
|
|
||||||
## Title: Turn In
|
|
||||||
## Notes: Automates the selection of quest and gossip options.
|
|
||||||
## SavedVariables: TI_status, TI_NPCDB, TI_NPCIndex
|
|
||||||
## Version: 2.2
|
|
||||||
TurnIn.xml
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
## Interface: 30403
|
|
||||||
## X-Compatible-With: 30403
|
|
||||||
## Title: Turn In
|
|
||||||
## Notes: Automates the selection of quest and gossip options.
|
|
||||||
## SavedVariables: TI_status, TI_NPCDB, TI_NPCIndex
|
|
||||||
## Version: 2.2
|
|
||||||
TurnIn.xml
|
|
||||||
Loading…
Reference in New Issue
Block a user