From 4b1a1af6b356cf5fb00802727cdac95eac365e91 Mon Sep 17 00:00:00 2001 From: SabinDeus Date: Sat, 7 Feb 2026 15:56:15 -0500 Subject: [PATCH] Consolidate TOCs and update compatible versions. Delete old and deprecated code no longer in use by any live version of WoW. --- README.txt | 27 ++-------------- TurnIn.lua | 76 ++++++++++++---------------------------------- TurnIn.toc | 4 +-- TurnIn_Cata.toc | 7 ----- TurnIn_Classic.toc | 7 ----- TurnIn_TBC.toc | 7 ----- TurnIn_Wrath.toc | 7 ----- 7 files changed, 24 insertions(+), 111 deletions(-) delete mode 100755 TurnIn_Cata.toc delete mode 100755 TurnIn_Classic.toc delete mode 100755 TurnIn_TBC.toc delete mode 100755 TurnIn_Wrath.toc diff --git a/README.txt b/README.txt index 39886c1..bc39c40 100644 --- a/README.txt +++ b/README.txt @@ -1,6 +1,6 @@ Turn In -v2.1 -by Sabindeus of Smolderthorn/Andre of Argent Dawn (Alliance) +v2.3 +by Sabindeus of Terenas DESCRIPTION ------------- @@ -29,26 +29,5 @@ 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 - - - - - - - -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 +Please send bug reports, questions or comments to sabin@sabindeus.com diff --git a/TurnIn.lua b/TurnIn.lua index bdb3bea..965eccd 100755 --- a/TurnIn.lua +++ b/TurnIn.lua @@ -1,22 +1,14 @@ --[[ Turn-In Mod - version 2.1 + version 2.3 Authored by Ian Friedman - Sabindeus of Smolderthorn (Alliance) + Sabindeus of Terenas (Alliance) The repeatable quest turn in automating machine. 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"; local TI_slashtable; @@ -45,7 +37,6 @@ local TI_GossipDefaults = { banker = "Bank" }; -TI_FunctionList = {}; local TI_DefaultStatus = { state = false, @@ -683,19 +674,7 @@ function TI_StripDescriptors(...) return x; end -function TI_TabulateGossipOptions_Classic(...) - 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) +function TI_TabulateGossipQuestUIInfo(gquis) local x = {}; for i,gqui in ipairs(gquis) do @@ -717,7 +696,7 @@ function TI_TabulateGossipQuestUIInfo_Retail(gquis) return x; end -function TI_TabulateGossipUIInfo_Retail(guis) +function TI_TabulateGossipUIInfo(guis) local x = {}; table.sort(guis, GossipOptionSort); for i,gui in ipairs(guis) do @@ -731,16 +710,13 @@ function TI_TabulateGossipUIInfo_Retail(guis) temp.icon = gui.icon; temp.gossipOptionID = gui.gossipOptionID temp.orderIndex = gui.orderIndex - if (TI_IsRetail()) then - temp.args = gui.orderIndex - else - temp.args = i - end + temp.args = gui.orderIndex table.insert(x, temp); end return x; end + function TI_TabulateGossipAvailableQuests_Classic(gquis) local x = {}; @@ -785,8 +761,8 @@ function TI_TabulateGossipActiveQuests_Classic(gquis) return x; end --- set up functions by release type -if (TI_IsRetail()) then +TI_FunctionList = {} +function TI_SetupFunctions() TI_FunctionList = { g = { availquest = C_GossipInfo.SelectAvailableQuest, @@ -795,38 +771,24 @@ if (TI_IsRetail()) then getavailquests = C_GossipInfo.GetAvailableQuests, getactivequests = C_GossipInfo.GetActiveQuests, getoptions = C_GossipInfo.GetOptions, - tabulateAvailable = TI_TabulateGossipQuestUIInfo_Retail, - tabulateActive = TI_TabulateGossipQuestUIInfo_Retail, - tabulateOptions = TI_TabulateGossipUIInfo_Retail, + tabulateOptions = TI_TabulateGossipUIInfo, }, q = { activequest = SelectActiveQuest, availquest = SelectAvailableQuest, } - }; -else - TI_FunctionList = { - g = { - availquest = C_GossipInfo.SelectAvailableQuest, - activequest = C_GossipInfo.SelectActiveQuest, - gossip = SelectGossipOption, - getavailquests = C_GossipInfo.GetAvailableQuests, - 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, - } - }; + } + 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 diff --git a/TurnIn.toc b/TurnIn.toc index 96e6518..f16994e 100755 --- a/TurnIn.toc +++ b/TurnIn.toc @@ -1,5 +1,5 @@ -## Interface: 110205,110207,120000 -## X-Compatible-With: 110205,110207,120000 +## Interface: 120000, 120001, 50503, 40402, 30405, 20505, 11508 +## X-Compatible-With: 120000, 120001, 50503, 40402, 30405, 20505, 11508 ## Title: Turn In ## Notes: Automates the selection of quest and gossip options. ## SavedVariables: TI_status, TI_NPCDB, TI_NPCIndex diff --git a/TurnIn_Cata.toc b/TurnIn_Cata.toc deleted file mode 100755 index 193ddba..0000000 --- a/TurnIn_Cata.toc +++ /dev/null @@ -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 diff --git a/TurnIn_Classic.toc b/TurnIn_Classic.toc deleted file mode 100755 index 079f6d9..0000000 --- a/TurnIn_Classic.toc +++ /dev/null @@ -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 diff --git a/TurnIn_TBC.toc b/TurnIn_TBC.toc deleted file mode 100755 index 8ecebda..0000000 --- a/TurnIn_TBC.toc +++ /dev/null @@ -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 diff --git a/TurnIn_Wrath.toc b/TurnIn_Wrath.toc deleted file mode 100755 index 2d3bebf..0000000 --- a/TurnIn_Wrath.toc +++ /dev/null @@ -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