From 2f9420ae750cbaa40b3adb668d2259c585562c67 Mon Sep 17 00:00:00 2001 From: Theo Keane <20931519+theochemtheo@users.noreply.github.com> Date: Sat, 24 Jan 2026 13:10:55 +0000 Subject: [PATCH 1/5] add a TBC toc --- ItemAutocomplete_TBC.toc | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 ItemAutocomplete_TBC.toc diff --git a/ItemAutocomplete_TBC.toc b/ItemAutocomplete_TBC.toc new file mode 100755 index 0000000..49110b1 --- /dev/null +++ b/ItemAutocomplete_TBC.toc @@ -0,0 +1,26 @@ +## Interface: 20505 +## Title: Item Autocomplete +## Notes: Search and link items in the chat +## Author: ItemAutocomplete Authors +## Version: 2.0.9 +## SavedVariables: ItemAutocompleteDB +## X-ItemDatabaseVersion: 8 + +# Libraries +Libs\Libs.xml + +# Addon +Ui\ButtonMenu.lua +Ui\ButtonMenu.xml +Source\Shared\UTF8\Casing.lua +Source\Shared\UTF8\Charsets.lua +Source\Shared\UTF8\Index.lua +Source\Shared\EventSource.lua +Source\Shared\Persistence.lua +Source\Shared\TaskScheduler.lua +Source\Utility\Functions.lua +Source\Utility\FuzzyMatcher.lua +Source\ChatAutocompleteIntegrator.lua +Source\CompletionSource.lua +Source\ItemDatabase.lua +Source\Main.lua From fbd713ca09e6d1eee539de0ba47493a49084c533 Mon Sep 17 00:00:00 2001 From: Theo Keane <20931519+theochemtheo@users.noreply.github.com> Date: Sat, 24 Jan 2026 13:11:54 +0000 Subject: [PATCH 2/5] refactor handling manual item ids from specific expansions, add item ids for TBC anniversary --- Source/ItemDatabase.lua | 83 +++++++++++++++++++++++++++++------- Source/Utility/Functions.lua | 11 ----- 2 files changed, 67 insertions(+), 27 deletions(-) diff --git a/Source/ItemDatabase.lua b/Source/ItemDatabase.lua index bb55448..4ada33c 100755 --- a/Source/ItemDatabase.lua +++ b/Source/ItemDatabase.lua @@ -4,18 +4,16 @@ select(2, ...) 'ItemDatabase' local util = require 'Utility.Functions' local utf8 = require 'Shared.UTF8' --- Consts -local const = util.ReadOnly({ - -- See: https://tbc.wowhead.com/items?filter=151;1;187815 - itemIds = util.IsWotlk() and { - { 1, 54798 }, -- Defaults - { 122270 }, -- WoW Token (AH) - { 122284 }, -- WoW Token - { 172070 }, -- Customer Service Package - { 180089 }, -- Panda Collar - { 192455, 198647, 198665 }, -- Elite Expedition Supplies - { 198628, 198644 }, - } or { -- See: https://classic.wowhead.com/items?filter=151;2;24284 +-- Build the item id ranges for each version +local function AppendRanges(out, ranges) + for i = 1, #ranges do + out[#out + 1] = ranges[i] + end +end + +local baseRangesByExpansion = { + -- See: https://classic.wowhead.com/items?filter=151;2;24284 + [_G.WOW_PROJECT_CLASSIC] = { { 1, 24283 }, -- Defaults { 122270 }, -- WoW Token (AH) { 122284 }, -- WoW Token @@ -24,11 +22,64 @@ local const = util.ReadOnly({ { 184937, 184938 }, -- Chronoboon Displacers { 189419, 189421 }, -- Fire Resist Gear { 189426, 189427 }, -- Raid Consumables - -- Season of Discovery - util.IsSod() and { 190179, 217704 } or nil, }, - itemsQueriedPerUpdate = 50, -}) + -- See: https://tbc.wowhead.com/items?filter=151;1;187815 + [_G.WOW_PROJECT_BURNING_CRUSADE_CLASSIC] = { + { 1, 187815 }, -- Defaults + { 190179, 190181 }, -- Incubus quest items + { 190186, 190187 }, -- Incubus quest items + { 190232 }, -- Incubus quest items + { 190309 }, -- Incubus quest items + { 190325 }, -- Incubus quest items + { 190307, 190308 }, -- Fire festival torches + { 191060 }, -- Magtheridon gems + { 191061 }, -- Brilliant Glass + { 209611, 209618 }, -- Insignia of the Alliance + { 209619, 209626 }, -- Insignia of the Horde + { 212160 }, -- Chronoboon Displacer + { 234465 }, -- Reins of the Swift Spectral Tiger + { 260221 }, -- Shop mounts/pets + { 260433 }, -- Shop mounts/pets + { 260438 }, -- Shop mounts/pets + { 260622 }, -- Shop mounts/pets + { 260759 }, -- Shop mounts/pets + { 265826 }, -- Communal Keys + { 265830 }, -- Communal Keys + { 265843 }, -- Communal Keys + { 265845 }, -- Communal Keys + { 265847 }, -- Communal Keys + { 265849 }, -- Communal Keys + { 265851 }, -- Communal Keys + { 265853 }, -- Communal Keys + }, + -- See: https://www.wowhead.com/wotlk/items?filter=151;1;54798 + -- (The below list is likely incomplete) + [_G.WOW_PROJECT_WRATH_CLASSIC] = { + { 1, 54798 }, -- Defaults + { 122270 }, -- WoW Token (AH) + { 122284 }, -- WoW Token + { 172070 }, -- Customer Service Package + { 180089 }, -- Panda Collar + { 192455 }, -- Elite Expedition Supplies + { 198647 }, -- Elite Expedition Supplies + { 198665 }, -- Elite Expedition Supplies + { 198628, 198644 }, + }, +} + +local sodExtras = { { 190179, 217704 } } + +local function BuildItemIdRanges() + local ranges = {} + AppendRanges(ranges, assert(baseRangesByExpansion[_G.WOW_PROJECT_ID])) + if util.IsSod() then + AppendRanges(ranges, sodExtras) + end + return ranges +end + +-- Consts +local const = util.ReadOnly({ itemIds = BuildItemIdRanges(), itemsQueriedPerUpdate = 50 }) ------------------------------------------ -- Class definition diff --git a/Source/Utility/Functions.lua b/Source/Utility/Functions.lua index a3cc28a..8a144fd 100755 --- a/Source/Utility/Functions.lua +++ b/Source/Utility/Functions.lua @@ -59,17 +59,6 @@ function export.RegisterSlashCommand(command, callback) _G.SlashCmdList[identifier] = callback end --- Returns whether the current client is WOTLK or not -function export.IsWotlk() - return _G.WOW_PROJECT_ID == _G.WOW_PROJECT_WRATH_CLASSIC -end - --- Returns whether the current client is Season of Mastery or not -function export.IsSom() - return C_Seasons ~= nil and C_Seasons.HasActiveSeason() and - (C_Seasons.GetActiveSeason() == Enum.SeasonID.SeasonOfMastery) -end - -- Returns whether the current client is Season of Discovery or not function export.IsSod() return C_Seasons ~= nil and C_Seasons.HasActiveSeason() and From 362a7ee39eeaa538313d1a565630050f76b330a8 Mon Sep 17 00:00:00 2001 From: Theo Keane <20931519+theochemtheo@users.noreply.github.com> Date: Sat, 24 Jan 2026 13:25:11 +0000 Subject: [PATCH 3/5] GetAddOnMetadata moved to C_AddOns --- Source/Utility/Functions.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Utility/Functions.lua b/Source/Utility/Functions.lua index 8a144fd..1238f4d 100755 --- a/Source/Utility/Functions.lua +++ b/Source/Utility/Functions.lua @@ -20,7 +20,7 @@ end -- Returns a field's value from the addon's meta data function export.GetAddonMetadata(field) - return GetAddOnMetadata(addonName, field) + return C_AddOns.GetAddOnMetadata(addonName, field) end -- Prints an addon message to the default chat frame From 185d510a2398dba3cae75a836cc3e219f238272a Mon Sep 17 00:00:00 2001 From: Theo Keane <20931519+theochemtheo@users.noreply.github.com> Date: Sat, 24 Jan 2026 14:12:13 +0000 Subject: [PATCH 4/5] update vendored Ace3 --- Libs/AceConfig-3.0/AceConfig-3.0.lua | 116 +- Libs/AceConfig-3.0/AceConfig-3.0.xml | 16 +- .../AceConfigCmd-3.0/AceConfigCmd-3.0.lua | 1581 ++++--- .../AceConfigCmd-3.0/AceConfigCmd-3.0.xml | 8 +- .../AceConfigDialog-3.0.lua | 4064 +++++++++-------- .../AceConfigDialog-3.0.xml | 8 +- .../AceConfigRegistry-3.0.lua | 744 +-- .../AceConfigRegistry-3.0.xml | 8 +- Libs/AceGUI-3.0/AceGUI-3.0.lua | 2046 +++++---- Libs/AceGUI-3.0/AceGUI-3.0.xml | 56 +- .../AceGUIContainer-BlizOptionsGroup.lua | 281 +- .../widgets/AceGUIContainer-DropDownGroup.lua | 314 +- .../widgets/AceGUIContainer-Frame.lua | 636 +-- .../widgets/AceGUIContainer-InlineGroup.lua | 206 +- .../widgets/AceGUIContainer-ScrollFrame.lua | 430 +- .../widgets/AceGUIContainer-SimpleGroup.lua | 138 +- .../widgets/AceGUIContainer-TabGroup.lua | 884 ++-- .../widgets/AceGUIContainer-TreeGroup.lua | 1434 +++--- .../widgets/AceGUIContainer-Window.lua | 672 +-- .../widgets/AceGUIWidget-Button.lua | 206 +- .../widgets/AceGUIWidget-CheckBox.lua | 588 ++- .../widgets/AceGUIWidget-ColorPicker.lua | 420 +- .../widgets/AceGUIWidget-DropDown-Items.lua | 942 ++-- .../widgets/AceGUIWidget-DropDown.lua | 1469 +++--- .../widgets/AceGUIWidget-EditBox.lua | 530 +-- .../widgets/AceGUIWidget-Heading.lua | 156 +- Libs/AceGUI-3.0/widgets/AceGUIWidget-Icon.lua | 280 +- .../widgets/AceGUIWidget-InteractiveLabel.lua | 188 +- .../widgets/AceGUIWidget-Keybinding.lua | 500 +- .../AceGUI-3.0/widgets/AceGUIWidget-Label.lua | 358 +- .../widgets/AceGUIWidget-MultiLineEditBox.lua | 743 +-- .../widgets/AceGUIWidget-Slider.lua | 564 ++- .../CallbackHandler-1.0.lua | 414 +- .../CallbackHandler-1.0.xml | 8 +- Libs/LibStub/LibStub.lua | 60 +- 35 files changed, 10656 insertions(+), 10412 deletions(-) mode change 100755 => 100644 Libs/AceConfig-3.0/AceConfig-3.0.lua mode change 100755 => 100644 Libs/AceConfig-3.0/AceConfig-3.0.xml mode change 100755 => 100644 Libs/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua mode change 100755 => 100644 Libs/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.xml mode change 100755 => 100644 Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua mode change 100755 => 100644 Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.xml mode change 100755 => 100644 Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua mode change 100755 => 100644 Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.xml mode change 100755 => 100644 Libs/AceGUI-3.0/AceGUI-3.0.lua mode change 100755 => 100644 Libs/AceGUI-3.0/AceGUI-3.0.xml mode change 100755 => 100644 Libs/AceGUI-3.0/widgets/AceGUIContainer-BlizOptionsGroup.lua mode change 100755 => 100644 Libs/AceGUI-3.0/widgets/AceGUIContainer-DropDownGroup.lua mode change 100755 => 100644 Libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua mode change 100755 => 100644 Libs/AceGUI-3.0/widgets/AceGUIContainer-InlineGroup.lua mode change 100755 => 100644 Libs/AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua mode change 100755 => 100644 Libs/AceGUI-3.0/widgets/AceGUIContainer-SimpleGroup.lua mode change 100755 => 100644 Libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua mode change 100755 => 100644 Libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua mode change 100755 => 100644 Libs/AceGUI-3.0/widgets/AceGUIContainer-Window.lua mode change 100755 => 100644 Libs/AceGUI-3.0/widgets/AceGUIWidget-Button.lua mode change 100755 => 100644 Libs/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua mode change 100755 => 100644 Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua mode change 100755 => 100644 Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua mode change 100755 => 100644 Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua mode change 100755 => 100644 Libs/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua mode change 100755 => 100644 Libs/AceGUI-3.0/widgets/AceGUIWidget-Heading.lua mode change 100755 => 100644 Libs/AceGUI-3.0/widgets/AceGUIWidget-Icon.lua mode change 100755 => 100644 Libs/AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua mode change 100755 => 100644 Libs/AceGUI-3.0/widgets/AceGUIWidget-Keybinding.lua mode change 100755 => 100644 Libs/AceGUI-3.0/widgets/AceGUIWidget-Label.lua mode change 100755 => 100644 Libs/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua mode change 100755 => 100644 Libs/AceGUI-3.0/widgets/AceGUIWidget-Slider.lua mode change 100755 => 100644 Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua mode change 100755 => 100644 Libs/CallbackHandler-1.0/CallbackHandler-1.0.xml mode change 100755 => 100644 Libs/LibStub/LibStub.lua diff --git a/Libs/AceConfig-3.0/AceConfig-3.0.lua b/Libs/AceConfig-3.0/AceConfig-3.0.lua old mode 100755 new mode 100644 index aae348b..1c9454a --- a/Libs/AceConfig-3.0/AceConfig-3.0.lua +++ b/Libs/AceConfig-3.0/AceConfig-3.0.lua @@ -1,58 +1,58 @@ ---- AceConfig-3.0 wrapper library. --- Provides an API to register an options table with the config registry, --- as well as associate it with a slash command. --- @class file --- @name AceConfig-3.0 --- @release $Id: AceConfig-3.0.lua 1202 2019-05-15 23:11:22Z nevcairiel $ - ---[[ -AceConfig-3.0 - -Very light wrapper library that combines all the AceConfig subcomponents into one more easily used whole. - -]] - -local cfgreg = LibStub("AceConfigRegistry-3.0") -local cfgcmd = LibStub("AceConfigCmd-3.0") - -local MAJOR, MINOR = "AceConfig-3.0", 3 -local AceConfig = LibStub:NewLibrary(MAJOR, MINOR) - -if not AceConfig then return end - ---TODO: local cfgdlg = LibStub("AceConfigDialog-3.0", true) ---TODO: local cfgdrp = LibStub("AceConfigDropdown-3.0", true) - --- Lua APIs -local pcall, error, type, pairs = pcall, error, type, pairs - --- ------------------------------------------------------------------- --- :RegisterOptionsTable(appName, options, slashcmd, persist) --- --- - appName - (string) application name --- - options - table or function ref, see AceConfigRegistry --- - slashcmd - slash command (string) or table with commands, or nil to NOT create a slash command - ---- Register a option table with the AceConfig registry. --- You can supply a slash command (or a table of slash commands) to register with AceConfigCmd directly. --- @paramsig appName, options [, slashcmd] --- @param appName The application name for the config table. --- @param options The option table (or a function to generate one on demand). http://www.wowace.com/addons/ace3/pages/ace-config-3-0-options-tables/ --- @param slashcmd A slash command to register for the option table, or a table of slash commands. --- @usage --- local AceConfig = LibStub("AceConfig-3.0") --- AceConfig:RegisterOptionsTable("MyAddon", myOptions, {"/myslash", "/my"}) -function AceConfig:RegisterOptionsTable(appName, options, slashcmd) - local ok,msg = pcall(cfgreg.RegisterOptionsTable, self, appName, options) - if not ok then error(msg, 2) end - - if slashcmd then - if type(slashcmd) == "table" then - for _,cmd in pairs(slashcmd) do - cfgcmd:CreateChatCommand(cmd, appName) - end - else - cfgcmd:CreateChatCommand(slashcmd, appName) - end - end -end +--- AceConfig-3.0 wrapper library. +-- Provides an API to register an options table with the config registry, +-- as well as associate it with a slash command. +-- @class file +-- @name AceConfig-3.0 +-- @release $Id$ + +--[[ +AceConfig-3.0 + +Very light wrapper library that combines all the AceConfig subcomponents into one more easily used whole. + +]] + +local cfgreg = LibStub("AceConfigRegistry-3.0") +local cfgcmd = LibStub("AceConfigCmd-3.0") + +local MAJOR, MINOR = "AceConfig-3.0", 3 +local AceConfig = LibStub:NewLibrary(MAJOR, MINOR) + +if not AceConfig then return end + +--TODO: local cfgdlg = LibStub("AceConfigDialog-3.0", true) +--TODO: local cfgdrp = LibStub("AceConfigDropdown-3.0", true) + +-- Lua APIs +local pcall, error, type, pairs = pcall, error, type, pairs + +-- ------------------------------------------------------------------- +-- :RegisterOptionsTable(appName, options, slashcmd) +-- +-- - appName - (string) application name +-- - options - table or function ref, see AceConfigRegistry +-- - slashcmd - slash command (string) or table with commands, or nil to NOT create a slash command + +--- Register a option table with the AceConfig registry. +-- You can supply a slash command (or a table of slash commands) to register with AceConfigCmd directly. +-- @paramsig appName, options [, slashcmd] +-- @param appName The application name for the config table. +-- @param options The option table (or a function to generate one on demand). http://www.wowace.com/addons/ace3/pages/ace-config-3-0-options-tables/ +-- @param slashcmd A slash command to register for the option table, or a table of slash commands. +-- @usage +-- local AceConfig = LibStub("AceConfig-3.0") +-- AceConfig:RegisterOptionsTable("MyAddon", myOptions, {"/myslash", "/my"}) +function AceConfig:RegisterOptionsTable(appName, options, slashcmd) + local ok,msg = pcall(cfgreg.RegisterOptionsTable, self, appName, options) + if not ok then error(msg, 2) end + + if slashcmd then + if type(slashcmd) == "table" then + for _,cmd in pairs(slashcmd) do + cfgcmd:CreateChatCommand(cmd, appName) + end + else + cfgcmd:CreateChatCommand(slashcmd, appName) + end + end +end diff --git a/Libs/AceConfig-3.0/AceConfig-3.0.xml b/Libs/AceConfig-3.0/AceConfig-3.0.xml old mode 100755 new mode 100644 index 84c8d03..87972ad --- a/Libs/AceConfig-3.0/AceConfig-3.0.xml +++ b/Libs/AceConfig-3.0/AceConfig-3.0.xml @@ -1,8 +1,8 @@ - - - - - -