feat: Questie-X v1.1.4 - plugin architecture, monorepo, rebranding

- Repoint remote to Xurkon/Questie-X
- Add QuestiePluginAPI, QuestieServer, QuestieLearnerComms modules
- Add Questie-X.toc, Questie-X-Classic.toc, Questie-X-TBC.toc, Questie-X-Turtle.toc
- Remove embedded Database/Ascension and Database/Ebonhold (migrated to plugins)
- Add Plugins/ directory with NTFS junctions for Questie-X-AscensionDB and Questie-X-EbonholdDB
- Add LibDeflate, XXH_Lua_Lib, LibDBIcon-1.0, LibDataBroker-1.1
- Update README: Questie-X branding, logo, plugin install guide, plugin API docs
- Update CHANGELOG: v1.1.4 entry documenting all architectural changes
- Update .gitignore: exclude plugin junctions, __pycache__, .agents, debug files
- Various module updates: corrections, map, tracker, tooltips, quest, options
This commit is contained in:
Xurkon
2026-03-14 06:10:17 -05:00
parent 89c3b3173d
commit c4d003e58f
77 changed files with 10883 additions and 8264 deletions
-110
View File
@@ -1,110 +0,0 @@
-- This file is only there in standalone Ace3 and provides handy dev tool stuff I guess
-- for now only /rl to reload your UI :)
-- note the complete overkill use of AceAddon and console, ain't it cool?
-- GLOBALS: next, loadstring, ReloadUI, geterrorhandler
-- GLOBALS: BINDING_HEADER_ACE3, BINDING_NAME_RELOADUI, Ace3, LibStub
-- BINDINGs labels
BINDING_HEADER_ACE3 = "Ace3"
BINDING_NAME_RELOADUI = "ReloadUI"
--
local gui = LibStub("AceGUI-3.0")
local reg = LibStub("AceConfigRegistry-3.0")
local dialog = LibStub("AceConfigDialog-3.0")
Ace3 = LibStub("AceAddon-3.0"):NewAddon("Ace3", "AceConsole-3.0")
local Ace3 = Ace3
local selectedgroup
local frame
local select
local status = {}
local configs = {}
local function frameOnClose()
gui:Release(frame)
frame = nil
end
local function RefreshConfigs()
for name in reg:IterateOptionsTables() do
configs[name] = name
end
end
local function ConfigSelected(widget, event, value)
selectedgroup = value
dialog:Open(value, widget)
end
local old_CloseSpecialWindows
-- GLOBALS: CloseSpecialWindows, next
function Ace3:Open()
if not old_CloseSpecialWindows then
old_CloseSpecialWindows = CloseSpecialWindows
CloseSpecialWindows = function()
local found = old_CloseSpecialWindows()
if frame then
frame:Hide()
return true
end
return found
end
end
RefreshConfigs()
if next(configs) == nil then
self:Print("No Configs are Registered")
return
end
if not frame then
frame = gui:Create("Frame")
frame:ReleaseChildren()
frame:SetTitle("Ace3 Options")
frame:SetLayout("FILL")
frame:SetCallback("OnClose", frameOnClose)
select = gui:Create("DropdownGroup")
select:SetGroupList(configs)
select:SetCallback("OnGroupSelected", ConfigSelected)
frame:AddChild(select)
end
if not selectedgroup then
selectedgroup = next(configs)
end
select:SetGroup(selectedgroup)
frame:Show()
end
local function RefreshOnUpdate(this)
select:SetGroup(selectedgroup)
this:SetScript("OnUpdate", nil)
end
function Ace3:ConfigTableChanged(event, appName)
if selectedgroup == appName and frame then
frame.frame:SetScript("OnUpdate", RefreshOnUpdate)
end
end
reg.RegisterCallback(Ace3, "ConfigTableChange", "ConfigTableChanged")
function Ace3:PrintCmd(input)
input = input:trim():match("^(.-);*$")
local func, err = loadstring("LibStub(\"AceConsole-3.0\"):Print(" .. input .. ")")
if not func then
LibStub("AceConsole-3.0"):Print("Error: " .. err)
else
func()
end
end
function Ace3:OnInitialize()
self:RegisterChatCommand("ace3", function() self:Open() end)
self:RegisterChatCommand("rl", function() ReloadUI() end)
self:RegisterChatCommand("print", "PrintCmd")
end
-28
View File
@@ -1,28 +0,0 @@
## Interface: 90207
## Title: Lib: Ace3
## Notes: AddOn development framework
## Author: Ace3 Development Team
## X-Website: http://www.wowace.com
## X-Category: Library
## X-License: Limited BSD
## Version: Release-r1294
LibStub\LibStub.lua
CallbackHandler-1.0\CallbackHandler-1.0.xml
AceAddon-3.0\AceAddon-3.0.xml
AceEvent-3.0\AceEvent-3.0.xml
AceTimer-3.0\AceTimer-3.0.xml
AceBucket-3.0\AceBucket-3.0.xml
AceHook-3.0\AceHook-3.0.xml
AceDB-3.0\AceDB-3.0.xml
AceDBOptions-3.0\AceDBOptions-3.0.xml
AceLocale-3.0\AceLocale-3.0.xml
AceConsole-3.0\AceConsole-3.0.xml
AceGUI-3.0\AceGUI-3.0.xml
AceConfig-3.0\AceConfig-3.0.xml
AceComm-3.0\AceComm-3.0.xml
AceTab-3.0\AceTab-3.0.xml
AceSerializer-3.0\AceSerializer-3.0.xml
Ace3.lua
-28
View File
@@ -1,28 +0,0 @@
## Interface: 20504
## Title: Lib: Ace3
## Notes: AddOn development framework
## Author: Ace3 Development Team
## X-Website: http://www.wowace.com
## X-Category: Library
## X-License: Limited BSD
## Version: Release-r1294
LibStub\LibStub.lua
CallbackHandler-1.0\CallbackHandler-1.0.xml
AceAddon-3.0\AceAddon-3.0.xml
AceEvent-3.0\AceEvent-3.0.xml
AceTimer-3.0\AceTimer-3.0.xml
AceBucket-3.0\AceBucket-3.0.xml
AceHook-3.0\AceHook-3.0.xml
AceDB-3.0\AceDB-3.0.xml
AceDBOptions-3.0\AceDBOptions-3.0.xml
AceLocale-3.0\AceLocale-3.0.xml
AceConsole-3.0\AceConsole-3.0.xml
AceGUI-3.0\AceGUI-3.0.xml
AceConfig-3.0\AceConfig-3.0.xml
AceComm-3.0\AceComm-3.0.xml
AceTab-3.0\AceTab-3.0.xml
AceSerializer-3.0\AceSerializer-3.0.xml
Ace3.lua
-28
View File
@@ -1,28 +0,0 @@
## Interface: 11403
## Title: Lib: Ace3
## Notes: AddOn development framework
## Author: Ace3 Development Team
## X-Website: http://www.wowace.com
## X-Category: Library
## X-License: Limited BSD
## Version: Release-r1294
LibStub\LibStub.lua
CallbackHandler-1.0\CallbackHandler-1.0.xml
AceAddon-3.0\AceAddon-3.0.xml
AceEvent-3.0\AceEvent-3.0.xml
AceTimer-3.0\AceTimer-3.0.xml
AceBucket-3.0\AceBucket-3.0.xml
AceHook-3.0\AceHook-3.0.xml
AceDB-3.0\AceDB-3.0.xml
AceDBOptions-3.0\AceDBOptions-3.0.xml
AceLocale-3.0\AceLocale-3.0.xml
AceConsole-3.0\AceConsole-3.0.xml
AceGUI-3.0\AceGUI-3.0.xml
AceConfig-3.0\AceConfig-3.0.xml
AceComm-3.0\AceComm-3.0.xml
AceTab-3.0\AceTab-3.0.xml
AceSerializer-3.0\AceSerializer-3.0.xml
Ace3.lua
-28
View File
@@ -1,28 +0,0 @@
## Interface: 30400
## Title: Lib: Ace3
## Notes: AddOn development framework
## Author: Ace3 Development Team
## X-Website: http://www.wowace.com
## X-Category: Library
## X-License: Limited BSD
## Version: Release-r1294
LibStub\LibStub.lua
CallbackHandler-1.0\CallbackHandler-1.0.xml
AceAddon-3.0\AceAddon-3.0.xml
AceEvent-3.0\AceEvent-3.0.xml
AceTimer-3.0\AceTimer-3.0.xml
AceBucket-3.0\AceBucket-3.0.xml
AceHook-3.0\AceHook-3.0.xml
AceDB-3.0\AceDB-3.0.xml
AceDBOptions-3.0\AceDBOptions-3.0.xml
AceLocale-3.0\AceLocale-3.0.xml
AceConsole-3.0\AceConsole-3.0.xml
AceGUI-3.0\AceGUI-3.0.xml
AceConfig-3.0\AceConfig-3.0.xml
AceComm-3.0\AceComm-3.0.xml
AceTab-3.0\AceTab-3.0.xml
AceSerializer-3.0\AceSerializer-3.0.xml
Ace3.lua
-510
View File
@@ -1,510 +0,0 @@
--- **AceHook-3.0** offers safe Hooking/Unhooking of functions, methods and frame scripts.
-- Using AceHook-3.0 is recommended when you need to unhook your hooks again, so the hook chain isn't broken
-- when you manually restore the original function.
--
-- **AceHook-3.0** can be embeded into your addon, either explicitly by calling AceHook:Embed(MyAddon) or by
-- specifying it as an embeded library in your AceAddon. All functions will be available on your addon object
-- and can be accessed directly, without having to explicitly call AceHook itself.\\
-- It is recommended to embed AceHook, otherwise you'll have to specify a custom `self` on all calls you
-- make into AceHook.
-- @class file
-- @name AceHook-3.0
-- @release $Id: AceHook-3.0.lua 1284 2022-09-25 09:15:30Z nevcairiel $
local ACEHOOK_MAJOR, ACEHOOK_MINOR = "AceHook-3.0", 9
local AceHook, oldminor = LibStub:NewLibrary(ACEHOOK_MAJOR, ACEHOOK_MINOR)
if not AceHook then return end -- No upgrade needed
AceHook.embeded = AceHook.embeded or {}
AceHook.registry = AceHook.registry or setmetatable({}, {__index = function(tbl, key) tbl[key] = {} return tbl[key] end })
AceHook.handlers = AceHook.handlers or {}
AceHook.actives = AceHook.actives or {}
AceHook.scripts = AceHook.scripts or {}
AceHook.onceSecure = AceHook.onceSecure or {}
AceHook.hooks = AceHook.hooks or {}
-- local upvalues
local registry = AceHook.registry
local handlers = AceHook.handlers
local actives = AceHook.actives
local scripts = AceHook.scripts
local onceSecure = AceHook.onceSecure
-- Lua APIs
local pairs, next, type = pairs, next, type
local format = string.format
local assert, error = assert, error
-- WoW APIs
local issecurevariable, hooksecurefunc = issecurevariable, hooksecurefunc
local _G = _G
-- functions for later definition
local donothing, createHook, hook
local protectedScripts = {
OnClick = true,
}
-- upgrading of embeded is done at the bottom of the file
local mixins = {
"Hook", "SecureHook",
"HookScript", "SecureHookScript",
"Unhook", "UnhookAll",
"IsHooked",
"RawHook", "RawHookScript"
}
-- AceHook:Embed( target )
-- target (object) - target object to embed AceHook in
--
-- Embeds AceEevent into the target object making the functions from the mixins list available on target:..
function AceHook:Embed( target )
for k, v in pairs( mixins ) do
target[v] = self[v]
end
self.embeded[target] = true
-- inject the hooks table safely
target.hooks = target.hooks or {}
return target
end
-- AceHook:OnEmbedDisable( target )
-- target (object) - target object that is being disabled
--
-- Unhooks all hooks when the target disables.
-- this method should be called by the target manually or by an addon framework
function AceHook:OnEmbedDisable( target )
target:UnhookAll()
end
function createHook(self, handler, orig, secure, failsafe)
local uid
local method = type(handler) == "string"
if failsafe and not secure then
-- failsafe hook creation
uid = function(...)
if actives[uid] then
if method then
self[handler](self, ...)
else
handler(...)
end
end
return orig(...)
end
-- /failsafe hook
else
-- all other hooks
uid = function(...)
if actives[uid] then
if method then
return self[handler](self, ...)
else
return handler(...)
end
elseif not secure then -- backup on non secure
return orig(...)
end
end
-- /hook
end
return uid
end
function donothing() end
function hook(self, obj, method, handler, script, secure, raw, forceSecure, usage)
if not handler then handler = method end
-- These asserts make sure AceHooks's devs play by the rules.
assert(not script or type(script) == "boolean")
assert(not secure or type(secure) == "boolean")
assert(not raw or type(raw) == "boolean")
assert(not forceSecure or type(forceSecure) == "boolean")
assert(usage)
-- Error checking Battery!
if obj and type(obj) ~= "table" then
error(format("%s: 'object' - nil or table expected got %s", usage, type(obj)), 3)
end
if type(method) ~= "string" then
error(format("%s: 'method' - string expected got %s", usage, type(method)), 3)
end
if type(handler) ~= "string" and type(handler) ~= "function" then
error(format("%s: 'handler' - nil, string, or function expected got %s", usage, type(handler)), 3)
end
if type(handler) == "string" and type(self[handler]) ~= "function" then
error(format("%s: 'handler' - Handler specified does not exist at self[handler]", usage), 3)
end
if script then
if not obj or not obj.GetScript or not obj:HasScript(method) then
error(format("%s: You can only hook a script on a frame object", usage), 3)
end
if not secure and obj.IsProtected and obj:IsProtected() and protectedScripts[method] then
error(format("Cannot hook secure script %q; Use SecureHookScript(obj, method, [handler]) instead.", method), 3)
end
else
local issecure
if obj then
issecure = onceSecure[obj] and onceSecure[obj][method] or issecurevariable(obj, method)
else
issecure = onceSecure[method] or issecurevariable(method)
end
if issecure then
if forceSecure then
if obj then
onceSecure[obj] = onceSecure[obj] or {}
onceSecure[obj][method] = true
else
onceSecure[method] = true
end
elseif not secure then
error(format("%s: Attempt to hook secure function %s. Use `SecureHook' or add `true' to the argument list to override.", usage, method), 3)
end
end
end
local uid
if obj then
uid = registry[self][obj] and registry[self][obj][method]
else
uid = registry[self][method]
end
if uid then
if actives[uid] then
-- Only two sane choices exist here. We either a) error 100% of the time or b) always unhook and then hook
-- choice b would likely lead to odd debuging conditions or other mysteries so we're going with a.
error(format("Attempting to rehook already active hook %s.", method))
end
if handlers[uid] == handler then -- turn on a decative hook, note enclosures break this ability, small memory leak
actives[uid] = true
return
elseif obj then -- is there any reason not to call unhook instead of doing the following several lines?
if self.hooks and self.hooks[obj] then
self.hooks[obj][method] = nil
end
registry[self][obj][method] = nil
else
if self.hooks then
self.hooks[method] = nil
end
registry[self][method] = nil
end
handlers[uid], actives[uid], scripts[uid] = nil, nil, nil
end
local orig
if script then
orig = obj:GetScript(method) or donothing
elseif obj then
orig = obj[method]
else
orig = _G[method]
end
if not orig then
error(format("%s: Attempting to hook a non existing target", usage), 3)
end
uid = createHook(self, handler, orig, secure, not (raw or secure))
if obj then
self.hooks[obj] = self.hooks[obj] or {}
registry[self][obj] = registry[self][obj] or {}
registry[self][obj][method] = uid
if not secure then
self.hooks[obj][method] = orig
end
if script then
if not secure then
obj:SetScript(method, uid)
else
obj:HookScript(method, uid)
end
else
if not secure then
obj[method] = uid
else
hooksecurefunc(obj, method, uid)
end
end
else
registry[self][method] = uid
if not secure then
_G[method] = uid
self.hooks[method] = orig
else
hooksecurefunc(method, uid)
end
end
actives[uid], handlers[uid], scripts[uid] = true, handler, script and true or nil
end
--- Hook a function or a method on an object.
-- The hook created will be a "safe hook", that means that your handler will be called
-- before the hooked function ("Pre-Hook"), and you don't have to call the original function yourself,
-- however you cannot stop the execution of the function, or modify any of the arguments/return values.\\
-- This type of hook is typically used if you need to know if some function got called, and don't want to modify it.
-- @paramsig [object], method, [handler], [hookSecure]
-- @param object The object to hook a method from
-- @param method If object was specified, the name of the method, or the name of the function to hook.
-- @param handler The handler for the hook, a funcref or a method name. (Defaults to the name of the hooked function)
-- @param hookSecure If true, AceHook will allow hooking of secure functions.
-- @usage
-- -- create an addon with AceHook embeded
-- MyAddon = LibStub("AceAddon-3.0"):NewAddon("HookDemo", "AceHook-3.0")
--
-- function MyAddon:OnEnable()
-- -- Hook ActionButton_UpdateHotkeys, overwriting the secure status
-- self:Hook("ActionButton_UpdateHotkeys", true)
-- end
--
-- function MyAddon:ActionButton_UpdateHotkeys(button, type)
-- print(button:GetName() .. " is updating its HotKey")
-- end
function AceHook:Hook(object, method, handler, hookSecure)
if type(object) == "string" then
method, handler, hookSecure, object = object, method, handler, nil
end
if handler == true then
handler, hookSecure = nil, true
end
hook(self, object, method, handler, false, false, false, hookSecure or false, "Usage: Hook([object], method, [handler], [hookSecure])")
end
--- RawHook a function or a method on an object.
-- The hook created will be a "raw hook", that means that your handler will completly replace
-- the original function, and your handler has to call the original function (or not, depending on your intentions).\\
-- The original function will be stored in `self.hooks[object][method]` or `self.hooks[functionName]` respectively.\\
-- This type of hook can be used for all purposes, and is usually the most common case when you need to modify arguments
-- or want to control execution of the original function.
-- @paramsig [object], method, [handler], [hookSecure]
-- @param object The object to hook a method from
-- @param method If object was specified, the name of the method, or the name of the function to hook.
-- @param handler The handler for the hook, a funcref or a method name. (Defaults to the name of the hooked function)
-- @param hookSecure If true, AceHook will allow hooking of secure functions.
-- @usage
-- -- create an addon with AceHook embeded
-- MyAddon = LibStub("AceAddon-3.0"):NewAddon("HookDemo", "AceHook-3.0")
--
-- function MyAddon:OnEnable()
-- -- Hook ActionButton_UpdateHotkeys, overwriting the secure status
-- self:RawHook("ActionButton_UpdateHotkeys", true)
-- end
--
-- function MyAddon:ActionButton_UpdateHotkeys(button, type)
-- if button:GetName() == "MyButton" then
-- -- do stuff here
-- else
-- self.hooks.ActionButton_UpdateHotkeys(button, type)
-- end
-- end
function AceHook:RawHook(object, method, handler, hookSecure)
if type(object) == "string" then
method, handler, hookSecure, object = object, method, handler, nil
end
if handler == true then
handler, hookSecure = nil, true
end
hook(self, object, method, handler, false, false, true, hookSecure or false, "Usage: RawHook([object], method, [handler], [hookSecure])")
end
--- SecureHook a function or a method on an object.
-- This function is a wrapper around the `hooksecurefunc` function in the WoW API. Using AceHook
-- extends the functionality of secure hooks, and adds the ability to unhook once the hook isn't
-- required anymore, or the addon is being disabled.\\
-- Secure Hooks should be used if the secure-status of the function is vital to its function,
-- and taint would block execution. Secure Hooks are always called after the original function was called
-- ("Post Hook"), and you cannot modify the arguments, return values or control the execution.
-- @paramsig [object], method, [handler]
-- @param object The object to hook a method from
-- @param method If object was specified, the name of the method, or the name of the function to hook.
-- @param handler The handler for the hook, a funcref or a method name. (Defaults to the name of the hooked function)
function AceHook:SecureHook(object, method, handler)
if type(object) == "string" then
method, handler, object = object, method, nil
end
hook(self, object, method, handler, false, true, false, false, "Usage: SecureHook([object], method, [handler])")
end
--- Hook a script handler on a frame.
-- The hook created will be a "safe hook", that means that your handler will be called
-- before the hooked script ("Pre-Hook"), and you don't have to call the original function yourself,
-- however you cannot stop the execution of the function, or modify any of the arguments/return values.\\
-- This is the frame script equivalent of the :Hook safe-hook. It would typically be used to be notified
-- when a certain event happens to a frame.
-- @paramsig frame, script, [handler]
-- @param frame The Frame to hook the script on
-- @param script The script to hook
-- @param handler The handler for the hook, a funcref or a method name. (Defaults to the name of the hooked script)
-- @usage
-- -- create an addon with AceHook embeded
-- MyAddon = LibStub("AceAddon-3.0"):NewAddon("HookDemo", "AceHook-3.0")
--
-- function MyAddon:OnEnable()
-- -- Hook the OnShow of FriendsFrame
-- self:HookScript(FriendsFrame, "OnShow", "FriendsFrameOnShow")
-- end
--
-- function MyAddon:FriendsFrameOnShow(frame)
-- print("The FriendsFrame was shown!")
-- end
function AceHook:HookScript(frame, script, handler)
hook(self, frame, script, handler, true, false, false, false, "Usage: HookScript(object, method, [handler])")
end
--- RawHook a script handler on a frame.
-- The hook created will be a "raw hook", that means that your handler will completly replace
-- the original script, and your handler has to call the original script (or not, depending on your intentions).\\
-- The original script will be stored in `self.hooks[frame][script]`.\\
-- This type of hook can be used for all purposes, and is usually the most common case when you need to modify arguments
-- or want to control execution of the original script.
-- @paramsig frame, script, [handler]
-- @param frame The Frame to hook the script on
-- @param script The script to hook
-- @param handler The handler for the hook, a funcref or a method name. (Defaults to the name of the hooked script)
-- @usage
-- -- create an addon with AceHook embeded
-- MyAddon = LibStub("AceAddon-3.0"):NewAddon("HookDemo", "AceHook-3.0")
--
-- function MyAddon:OnEnable()
-- -- Hook the OnShow of FriendsFrame
-- self:RawHookScript(FriendsFrame, "OnShow", "FriendsFrameOnShow")
-- end
--
-- function MyAddon:FriendsFrameOnShow(frame)
-- -- Call the original function
-- self.hooks[frame].OnShow(frame)
-- -- Do our processing
-- -- .. stuff
-- end
function AceHook:RawHookScript(frame, script, handler)
hook(self, frame, script, handler, true, false, true, false, "Usage: RawHookScript(object, method, [handler])")
end
--- SecureHook a script handler on a frame.
-- This function is a wrapper around the `frame:HookScript` function in the WoW API. Using AceHook
-- extends the functionality of secure hooks, and adds the ability to unhook once the hook isn't
-- required anymore, or the addon is being disabled.\\
-- Secure Hooks should be used if the secure-status of the function is vital to its function,
-- and taint would block execution. Secure Hooks are always called after the original function was called
-- ("Post Hook"), and you cannot modify the arguments, return values or control the execution.
-- @paramsig frame, script, [handler]
-- @param frame The Frame to hook the script on
-- @param script The script to hook
-- @param handler The handler for the hook, a funcref or a method name. (Defaults to the name of the hooked script)
function AceHook:SecureHookScript(frame, script, handler)
hook(self, frame, script, handler, true, true, false, false, "Usage: SecureHookScript(object, method, [handler])")
end
--- Unhook from the specified function, method or script.
-- @paramsig [obj], method
-- @param obj The object or frame to unhook from
-- @param method The name of the method, function or script to unhook from.
function AceHook:Unhook(obj, method)
local usage = "Usage: Unhook([obj], method)"
if type(obj) == "string" then
method, obj = obj, nil
end
if obj and type(obj) ~= "table" then
error(format("%s: 'obj' - expecting nil or table got %s", usage, type(obj)), 2)
end
if type(method) ~= "string" then
error(format("%s: 'method' - expeting string got %s", usage, type(method)), 2)
end
local uid
if obj then
uid = registry[self][obj] and registry[self][obj][method]
else
uid = registry[self][method]
end
if not uid or not actives[uid] then
-- Declining to error on an unneeded unhook since the end effect is the same and this would just be annoying.
return false
end
actives[uid], handlers[uid] = nil, nil
if obj then
registry[self][obj][method] = nil
registry[self][obj] = next(registry[self][obj]) and registry[self][obj] or nil
-- if the hook reference doesnt exist, then its a secure hook, just bail out and dont do any unhooking
if not self.hooks[obj] or not self.hooks[obj][method] then return true end
if scripts[uid] and obj:GetScript(method) == uid then -- unhooks scripts
obj:SetScript(method, self.hooks[obj][method] ~= donothing and self.hooks[obj][method] or nil)
scripts[uid] = nil
elseif obj and self.hooks[obj] and self.hooks[obj][method] and obj[method] == uid then -- unhooks methods
obj[method] = self.hooks[obj][method]
end
self.hooks[obj][method] = nil
self.hooks[obj] = next(self.hooks[obj]) and self.hooks[obj] or nil
else
registry[self][method] = nil
-- if self.hooks[method] doesn't exist, then this is a SecureHook, just bail out
if not self.hooks[method] then return true end
if self.hooks[method] and _G[method] == uid then -- unhooks functions
_G[method] = self.hooks[method]
end
self.hooks[method] = nil
end
return true
end
--- Unhook all existing hooks for this addon.
function AceHook:UnhookAll()
for key, value in pairs(registry[self]) do
if type(key) == "table" then
for method in pairs(value) do
AceHook.Unhook(self, key, method)
end
else
AceHook.Unhook(self, key)
end
end
end
--- Check if the specific function, method or script is already hooked.
-- @paramsig [obj], method
-- @param obj The object or frame to unhook from
-- @param method The name of the method, function or script to unhook from.
function AceHook:IsHooked(obj, method)
-- we don't check if registry[self] exists, this is done by evil magicks in the metatable
if type(obj) == "string" then
if registry[self][obj] and actives[registry[self][obj]] then
return true, handlers[registry[self][obj]]
end
else
if registry[self][obj] and registry[self][obj][method] and actives[registry[self][obj][method]] then
return true, handlers[registry[self][obj][method]]
end
end
return false, nil
end
--- Upgrade our old embeded
for target, v in pairs( AceHook.embeded ) do
AceHook:Embed( target )
end
@@ -1,287 +0,0 @@
--- **AceSerializer-3.0** can serialize any variable (except functions or userdata) into a string format,
-- that can be send over the addon comm channel. AceSerializer was designed to keep all data intact, especially
-- very large numbers or floating point numbers, and table structures. The only caveat currently is, that multiple
-- references to the same table will be send individually.
--
-- **AceSerializer-3.0** can be embeded into your addon, either explicitly by calling AceSerializer:Embed(MyAddon) or by
-- specifying it as an embeded library in your AceAddon. All functions will be available on your addon object
-- and can be accessed directly, without having to explicitly call AceSerializer itself.\\
-- It is recommended to embed AceSerializer, otherwise you'll have to specify a custom `self` on all calls you
-- make into AceSerializer.
-- @class file
-- @name AceSerializer-3.0
-- @release $Id: AceSerializer-3.0.lua 1284 2022-09-25 09:15:30Z nevcairiel $
local MAJOR,MINOR = "AceSerializer-3.0", 5
local AceSerializer, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
if not AceSerializer then return end
-- Lua APIs
local strbyte, strchar, gsub, gmatch, format = string.byte, string.char, string.gsub, string.gmatch, string.format
local assert, error, pcall = assert, error, pcall
local type, tostring, tonumber = type, tostring, tonumber
local pairs, select, frexp = pairs, select, math.frexp
local tconcat = table.concat
-- quick copies of string representations of wonky numbers
local inf = math.huge
local serNaN -- can't do this in 4.3, see ace3 ticket 268
local serInf, serInfMac = "1.#INF", "inf"
local serNegInf, serNegInfMac = "-1.#INF", "-inf"
-- Serialization functions
local function SerializeStringHelper(ch) -- Used by SerializeValue for strings
-- We use \126 ("~") as an escape character for all nonprints plus a few more
local n = strbyte(ch)
if n==30 then -- v3 / ticket 115: catch a nonprint that ends up being "~^" when encoded... DOH
return "\126\122"
elseif n<=32 then -- nonprint + space
return "\126"..strchar(n+64)
elseif n==94 then -- value separator
return "\126\125"
elseif n==126 then -- our own escape character
return "\126\124"
elseif n==127 then -- nonprint (DEL)
return "\126\123"
else
assert(false) -- can't be reached if caller uses a sane regex
end
end
local function SerializeValue(v, res, nres)
-- We use "^" as a value separator, followed by one byte for type indicator
local t=type(v)
if t=="string" then -- ^S = string (escaped to remove nonprints, "^"s, etc)
res[nres+1] = "^S"
res[nres+2] = gsub(v,"[%c \94\126\127]", SerializeStringHelper)
nres=nres+2
elseif t=="number" then -- ^N = number (just tostring()ed) or ^F (float components)
local str = tostring(v)
if tonumber(str)==v --[[not in 4.3 or str==serNaN]] then
-- translates just fine, transmit as-is
res[nres+1] = "^N"
res[nres+2] = str
nres=nres+2
elseif v == inf or v == -inf then
res[nres+1] = "^N"
res[nres+2] = v == inf and serInf or serNegInf
nres=nres+2
else
local m,e = frexp(v)
res[nres+1] = "^F"
res[nres+2] = format("%.0f",m*2^53) -- force mantissa to become integer (it's originally 0.5--0.9999)
res[nres+3] = "^f"
res[nres+4] = tostring(e-53) -- adjust exponent to counteract mantissa manipulation
nres=nres+4
end
elseif t=="table" then -- ^T...^t = table (list of key,value pairs)
nres=nres+1
res[nres] = "^T"
for key,value in pairs(v) do
nres = SerializeValue(key, res, nres)
nres = SerializeValue(value, res, nres)
end
nres=nres+1
res[nres] = "^t"
elseif t=="boolean" then -- ^B = true, ^b = false
nres=nres+1
if v then
res[nres] = "^B" -- true
else
res[nres] = "^b" -- false
end
elseif t=="nil" then -- ^Z = nil (zero, "N" was taken :P)
nres=nres+1
res[nres] = "^Z"
else
error(MAJOR..": Cannot serialize a value of type '"..t.."'") -- can't produce error on right level, this is wildly recursive
end
return nres
end
local serializeTbl = { "^1" } -- "^1" = Hi, I'm data serialized by AceSerializer protocol rev 1
--- Serialize the data passed into the function.
-- Takes a list of values (strings, numbers, booleans, nils, tables)
-- and returns it in serialized form (a string).\\
-- May throw errors on invalid data types.
-- @param ... List of values to serialize
-- @return The data in its serialized form (string)
function AceSerializer:Serialize(...)
local nres = 1
for i=1,select("#", ...) do
local v = select(i, ...)
nres = SerializeValue(v, serializeTbl, nres)
end
serializeTbl[nres+1] = "^^" -- "^^" = End of serialized data
return tconcat(serializeTbl, "", 1, nres+1)
end
-- Deserialization functions
local function DeserializeStringHelper(escape)
if escape<"~\122" then
return strchar(strbyte(escape,2,2)-64)
elseif escape=="~\122" then -- v3 / ticket 115: special case encode since 30+64=94 ("^") - OOPS.
return "\030"
elseif escape=="~\123" then
return "\127"
elseif escape=="~\124" then
return "\126"
elseif escape=="~\125" then
return "\94"
end
error("DeserializeStringHelper got called for '"..escape.."'?!?") -- can't be reached unless regex is screwed up
end
local function DeserializeNumberHelper(number)
--[[ not in 4.3 if number == serNaN then
return 0/0
else]]if number == serNegInf or number == serNegInfMac then
return -inf
elseif number == serInf or number == serInfMac then
return inf
else
return tonumber(number)
end
end
-- DeserializeValue: worker function for :Deserialize()
-- It works in two modes:
-- Main (top-level) mode: Deserialize a list of values and return them all
-- Recursive (table) mode: Deserialize only a single value (_may_ of course be another table with lots of subvalues in it)
--
-- The function _always_ works recursively due to having to build a list of values to return
--
-- Callers are expected to pcall(DeserializeValue) to trap errors
local function DeserializeValue(iter,single,ctl,data)
if not single then
ctl,data = iter()
end
if not ctl then
error("Supplied data misses AceSerializer terminator ('^^')")
end
if ctl=="^^" then
-- ignore extraneous data
return
end
local res
if ctl=="^S" then
res = gsub(data, "~.", DeserializeStringHelper)
elseif ctl=="^N" then
res = DeserializeNumberHelper(data)
if not res then
error("Invalid serialized number: '"..tostring(data).."'")
end
elseif ctl=="^F" then -- ^F<mantissa>^f<exponent>
local ctl2,e = iter()
if ctl2~="^f" then
error("Invalid serialized floating-point number, expected '^f', not '"..tostring(ctl2).."'")
end
local m=tonumber(data)
e=tonumber(e)
if not (m and e) then
error("Invalid serialized floating-point number, expected mantissa and exponent, got '"..tostring(m).."' and '"..tostring(e).."'")
end
res = m*(2^e)
elseif ctl=="^B" then -- yeah yeah ignore data portion
res = true
elseif ctl=="^b" then -- yeah yeah ignore data portion
res = false
elseif ctl=="^Z" then -- yeah yeah ignore data portion
res = nil
elseif ctl=="^T" then
-- ignore ^T's data, future extensibility?
res = {}
local k,v
while true do
ctl,data = iter()
if ctl=="^t" then break end -- ignore ^t's data
k = DeserializeValue(iter,true,ctl,data)
if k==nil then
error("Invalid AceSerializer table format (no table end marker)")
end
ctl,data = iter()
v = DeserializeValue(iter,true,ctl,data)
if v==nil then
error("Invalid AceSerializer table format (no table end marker)")
end
res[k]=v
end
else
error("Invalid AceSerializer control code '"..ctl.."'")
end
if not single then
return res,DeserializeValue(iter)
else
return res
end
end
--- Deserializes the data into its original values.
-- Accepts serialized data, ignoring all control characters and whitespace.
-- @param str The serialized data (from :Serialize)
-- @return true followed by a list of values, OR false followed by an error message
function AceSerializer:Deserialize(str)
str = gsub(str, "[%c ]", "") -- ignore all control characters; nice for embedding in email and stuff
local iter = gmatch(str, "(^.)([^^]*)") -- Any ^x followed by string of non-^
local ctl,data = iter()
if not ctl or ctl~="^1" then
-- we purposefully ignore the data portion of the start code, it can be used as an extension mechanism
return false, "Supplied data is not AceSerializer data (rev 1)"
end
return pcall(DeserializeValue, iter)
end
----------------------------------------
-- Base library stuff
----------------------------------------
AceSerializer.internals = { -- for test scripts
SerializeValue = SerializeValue,
SerializeStringHelper = SerializeStringHelper,
}
local mixins = {
"Serialize",
"Deserialize",
}
AceSerializer.embeds = AceSerializer.embeds or {}
function AceSerializer:Embed(target)
for k, v in pairs(mixins) do
target[v] = self[v]
end
self.embeds[target] = true
return target
end
-- Update embeds
for target, v in pairs(AceSerializer.embeds) do
AceSerializer:Embed(target)
end
@@ -1,4 +0,0 @@
<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="AceSerializer-3.0.lua"/>
</Ui>
-441
View File
@@ -1,441 +0,0 @@
--- AceTab-3.0 provides support for tab-completion.
-- Note: This library is not yet finalized.
-- @class file
-- @name AceTab-3.0
-- @release $Id: AceTab-3.0.lua 1287 2022-09-25 09:15:57Z nevcairiel $
local ACETAB_MAJOR, ACETAB_MINOR = 'AceTab-3.0', 9
local AceTab, oldminor = LibStub:NewLibrary(ACETAB_MAJOR, ACETAB_MINOR)
if not AceTab then return end -- No upgrade needed
AceTab.registry = AceTab.registry or {}
-- local upvalues
local _G = _G
local pairs = pairs
local ipairs = ipairs
local type = type
local registry = AceTab.registry
local strfind = string.find
local strsub = string.sub
local strlower = string.lower
local strformat = string.format
local strmatch = string.match
local function printf(...)
DEFAULT_CHAT_FRAME:AddMessage(strformat(...))
end
local function getTextBeforeCursor(this, start)
return strsub(this:GetText(), start or 1, this:GetCursorPosition())
end
-- Hook OnTabPressed and OnTextChanged for the frame, give it an empty matches table, and set its curMatch to 0, if we haven't done so already.
local function hookFrame(f)
if f.hookedByAceTab3 then return end
f.hookedByAceTab3 = true
if f == ChatEdit_GetActiveWindow() then
local origCTP = ChatEdit_CustomTabPressed
function ChatEdit_CustomTabPressed(...)
if AceTab:OnTabPressed(f) then
return origCTP(...)
else
return true
end
end
else
local origOTP = f:GetScript('OnTabPressed')
if type(origOTP) ~= 'function' then
origOTP = function() end
end
f:SetScript('OnTabPressed', function(...)
if AceTab:OnTabPressed(f) then
return origOTP(...)
end
end)
end
f.at3curMatch = 0
f.at3matches = {}
end
local fallbacks, notfallbacks = {}, {} -- classifies completions into those which have preconditions and those which do not. Those without preconditions are only considered if no other completions have matches.
local pmolengths = {} -- holds the number of characters to overwrite according to pmoverwrite and the current prematch
-- ------------------------------------------------------------------------------
-- RegisterTabCompletion( descriptor, prematches, wordlist, usagefunc, listenframes, postfunc, pmoverwrite )
-- See http://www.wowace.com/wiki/AceTab-2.0 for detailed API documentation
--
-- descriptor string Unique identifier for this tab completion set
--
-- prematches string|table|nil String match(es) AFTER which this tab completion will apply.
-- AceTab will ignore tabs NOT preceded by the string(s).
-- If no value is passed, will check all tabs pressed in the specified editframe(s) UNLESS a more-specific tab complete applies.
--
-- wordlist function|table Function that will be passed a table into which it will insert strings corresponding to all possible completions, or an equivalent table.
-- The text in the editbox, the position of the start of the word to be completed, and the uncompleted partial word
-- are passed as second, third, and fourth arguments, to facilitate pre-filtering or conditional formatting, if desired.
--
-- usagefunc function|boolean|nil Usage statement function. Defaults to the wordlist, one per line. A boolean true squelches usage output.
--
-- listenframes string|table|nil EditFrames to monitor. Defaults to ChatFrameEditBox.
--
-- postfunc function|nil Post-processing function. If supplied, matches will be passed through this function after they've been identified as a match.
--
-- pmoverwrite boolean|number|nil Offset the beginning of the completion string in the editbox when making a completion. Passing a boolean true indicates that we want to overwrite
-- the entire prematch string, and passing a number will overwrite that many characters prior to the cursor.
-- This is useful when you want to use the prematch as an indicator character, but ultimately do not want it as part of the text, itself.
--
-- no return
-- ------------------------------------------------------------------------------
function AceTab:RegisterTabCompletion(descriptor, prematches, wordlist, usagefunc, listenframes, postfunc, pmoverwrite)
-- Arg checks
if type(descriptor) ~= 'string' then error("Usage: RegisterTabCompletion(descriptor, prematches, wordlist, usagefunc, listenframes, postfunc, pmoverwrite): 'descriptor' - string expected.", 3) end
if prematches and type(prematches) ~= 'string' and type(prematches) ~= 'table' then error("Usage: RegisterTabCompletion(descriptor, prematches, wordlist, usagefunc, listenframes, postfunc, pmoverwrite): 'prematches' - string, table, or nil expected.", 3) end
if type(wordlist) ~= 'function' and type(wordlist) ~= 'table' then error("Usage: RegisterTabCompletion(descriptor, prematches, wordlist, usagefunc, listenframes, postfunc, pmoverwrite): 'wordlist' - function or table expected.", 3) end
if usagefunc and type(usagefunc) ~= 'function' and type(usagefunc) ~= 'boolean' then error("Usage: RegisterTabCompletion(descriptor, prematches, wordlist, usagefunc, listenframes, postfunc, pmoverwrite): 'usagefunc' - function or boolean expected.", 3) end
if listenframes and type(listenframes) ~= 'string' and type(listenframes) ~= 'table' then error("Usage: RegisterTabCompletion(descriptor, prematches, wordlist, usagefunc, listenframes, postfunc, pmoverwrite): 'listenframes' - string or table expected.", 3) end
if postfunc and type(postfunc) ~= 'function' then error("Usage: RegisterTabCompletion(descriptor, prematches, wordlist, usagefunc, listenframes, postfunc, pmoverwrite): 'postfunc' - function expected.", 3) end
if pmoverwrite and type(pmoverwrite) ~= 'boolean' and type(pmoverwrite) ~= 'number' then error("Usage: RegisterTabCompletion(descriptor, prematches, wordlist, usagefunc, listenframes, postfunc, pmoverwrite): 'pmoverwrite' - boolean or number expected.", 3) end
local pmtable
if type(prematches) == 'table' then
pmtable = prematches
notfallbacks[descriptor] = true
else
pmtable = {}
-- Mark this group as a fallback group if no value was passed.
if not prematches then
pmtable[1] = ""
fallbacks[descriptor] = true
-- Make prematches into a one-element table if it was passed as a string.
elseif type(prematches) == 'string' then
pmtable[1] = prematches
if prematches == "" then
fallbacks[descriptor] = true
else
notfallbacks[descriptor] = true
end
end
end
-- Make listenframes into a one-element table if it was not passed a table of frames.
if not listenframes then -- default
listenframes = {}
for i = 1, NUM_CHAT_WINDOWS do
listenframes[i] = _G["ChatFrame"..i.."EditBox"]
end
elseif type(listenframes) ~= 'table' or type(listenframes[0]) == 'userdata' and type(listenframes.IsObjectType) == 'function' then -- single frame or framename
listenframes = { listenframes }
end
-- Hook each registered listenframe and give it a matches table.
for _, f in pairs(listenframes) do
if type(f) == 'string' then
f = _G[f]
end
if type(f) ~= 'table' or type(f[0]) ~= 'userdata' or type(f.IsObjectType) ~= 'function' then
error(strformat(ACETAB_MAJOR..": Cannot register frame %q; it does not exist", f:GetName()))
end
if f then
if f:GetObjectType() ~= 'EditBox' then
error(strformat(ACETAB_MAJOR..": Cannot register frame %q; it is not an EditBox", f:GetName()))
else
hookFrame(f)
end
end
end
-- Everything checks out; register this completion.
if not registry[descriptor] then
registry[descriptor] = { prematches = pmtable, wordlist = wordlist, usagefunc = usagefunc, listenframes = listenframes, postfunc = postfunc, pmoverwrite = pmoverwrite }
end
end
function AceTab:IsTabCompletionRegistered(descriptor)
return registry and registry[descriptor]
end
function AceTab:UnregisterTabCompletion(descriptor)
registry[descriptor] = nil
pmolengths[descriptor] = nil
fallbacks[descriptor] = nil
notfallbacks[descriptor] = nil
end
-- ------------------------------------------------------------------------------
-- gcbs( s1, s2 )
--
-- s1 string First string to be compared
--
-- s2 string Second string to be compared
--
-- returns the greatest common substring beginning s1 and s2
-- ------------------------------------------------------------------------------
local function gcbs(s1, s2)
if not s1 and not s2 then return end
if not s1 then s1 = s2 end
if not s2 then s2 = s1 end
if #s2 < #s1 then
s1, s2 = s2, s1
end
if strfind(strlower(s2), "^"..strlower(s1)) then
return s1
else
return gcbs(strsub(s1, 1, -2), s2)
end
end
local cursor -- Holds cursor position. Set in :OnTabPressed().
-- ------------------------------------------------------------------------------
-- cycleTab()
-- For when a tab press has multiple possible completions, we need to allow the user to press tab repeatedly to cycle through them.
-- If we have multiple possible completions, all tab presses after the first will call this function to cycle through and insert the different possible matches.
-- This function will stop being called after OnTextChanged() is triggered by something other than AceTab (i.e. the user inputs a character).
-- ------------------------------------------------------------------------------
local previousLength, cMatch, matched, postmatch
local function cycleTab(this)
cMatch = 0 -- Counter across all sets. The pseudo-index relevant to this value and corresponding to the current match is held in this.at3curMatch
matched = false
-- Check each completion group registered to this frame.
for desc, compgrp in pairs(this.at3matches) do
-- Loop through the valid completions for this set.
for m, pm in pairs(compgrp) do
cMatch = cMatch + 1
if cMatch == this.at3curMatch then -- we're back to where we left off last time through the combined list
this.at3lastMatch = m
this.at3lastWord = pm
this.at3curMatch = cMatch + 1 -- save the new cMatch index
matched = true
break
end
end
if matched then break end
end
-- If our index is beyond the end of the list, reset the original uncompleted substring and let the cycle start over next time tab is pressed.
if not matched then
this.at3lastMatch = this.at3origMatch
this.at3lastWord = this.at3origWord
this.at3curMatch = 1
end
-- Insert the completion.
this:HighlightText(this.at3matchStart-1, cursor)
this:Insert(this.at3lastWord or '')
this.at3_last_precursor = getTextBeforeCursor(this) or ''
end
local IsSecureCmd = IsSecureCmd
local candUsage = {}
local numMatches = 0
local firstMatch, hasNonFallback, allGCBS, setGCBS, usage
local text_precursor, text_all, text_pmendToCursor
-- Fill the this.at3matches[descriptor] tables with matching completion pairs for each entry, based on
-- the partial string preceding the cursor position and using the corresponding registered wordlist.
--
-- The entries of the matches tables are of the format raw_match = formatted_match, where raw_match is the plaintext completion and
-- formatted_match is the match after being formatted/altered/processed by the registered postfunc.
-- If no postfunc exists, then the formatted and raw matches are the same.
local pms, pme, pmt, prematchStart, prematchEnd, text_prematch, entry
local function fillMatches(this, desc, fallback)
entry = registry[desc]
-- See what frames are registered for this completion group. If the frame in which we pressed tab is one of them, then we start building matches.
for _, f in ipairs(entry.listenframes) do
if f == this then
-- Try each precondition string registered for this completion group.
for _, prematch in ipairs(entry.prematches) do
-- Test if our prematch string is satisfied.
-- If it is, then we find its last occurence prior to the cursor, calculate and store its pmoverwrite value (if applicable), and start considering completions.
if fallback then prematch = "%s" end
-- Find the last occurence of the prematch before the cursor.
pms, pme, pmt = nil, 1, ''
text_prematch, prematchEnd, prematchStart = nil, nil, nil
while true do
pms, pme, pmt = strfind(text_precursor, "("..prematch..")", pme)
if pms then
prematchStart, prematchEnd, text_prematch = pms, pme, pmt
pme = pme + 1
else
break
end
end
if not prematchStart and fallback then
prematchStart, prematchEnd, text_prematch = 0, 0, ''
end
if prematchStart then
-- text_pmendToCursor should be the sub-word/phrase to be completed.
text_pmendToCursor = strsub(text_precursor, prematchEnd + 1)
-- How many characters should we eliminate before the completion before writing it in.
pmolengths[desc] = entry.pmoverwrite == true and #text_prematch or entry.pmoverwrite or 0
-- This is where we will insert completions, taking the prematch overwrite into account.
this.at3matchStart = prematchEnd + 1 - (pmolengths[desc] or 0)
-- We're either a non-fallback set or all completions thus far have been fallback sets, and the precondition matches.
-- Create cands from the registered wordlist, filling it with all potential (unfiltered) completion strings.
local wordlist = entry.wordlist
local cands = type(wordlist) == 'table' and wordlist or {}
if type(wordlist) == 'function' then
wordlist(cands, text_all, prematchEnd + 1, text_pmendToCursor)
end
if cands ~= false then
local matches = this.at3matches[desc] or {}
for i in pairs(matches) do matches[i] = nil end
-- Check each of the entries in cands to see if it completes the word before the cursor.
-- Finally, increment our match count and set firstMatch, if appropriate.
for _, m in ipairs(cands) do
if strfind(strlower(m), strlower(text_pmendToCursor), 1, 1) == 1 then -- we have a matching completion!
hasNonFallback = hasNonFallback or (not fallback)
matches[m] = entry.postfunc and entry.postfunc(m, prematchEnd + 1, text_all) or m
numMatches = numMatches + 1
if numMatches == 1 then
firstMatch = matches[m]
end
end
end
this.at3matches[desc] = numMatches > 0 and matches or nil
end
end
end
end
end
end
function AceTab:OnTabPressed(this)
if this:GetText() == '' then return true end
-- allow Blizzard to handle slash commands, themselves
if this == ChatEdit_GetActiveWindow() then
local command = this:GetText()
if strfind(command, "^/[%a%d_]+$") then
return true
end
local cmd = strmatch(command, "^/[%a%d_]+")
if cmd and IsSecureCmd(cmd) then
return true
end
end
cursor = this:GetCursorPosition()
text_all = this:GetText()
text_precursor = getTextBeforeCursor(this) or ''
-- If we've already found some matches and haven't done anything since the last tab press, then (continue) cycling matches.
-- Otherwise, reset this frame's matches and proceed to creating our list of possible completions.
this.at3lastMatch = this.at3curMatch > 0 and (this.at3lastMatch or this.at3origWord)
-- Detects if we've made any edits since the last tab press. If not, continue cycling completions.
if text_precursor == this.at3_last_precursor then
return cycleTab(this)
else
for i in pairs(this.at3matches) do this.at3matches[i] = nil end
this.at3curMatch = 0
this.at3origWord = nil
this.at3origMatch = nil
this.at3lastWord = nil
this.at3lastMatch = nil
this.at3_last_precursor = text_precursor
end
numMatches = 0
firstMatch = nil
hasNonFallback = false
for i in pairs(pmolengths) do pmolengths[i] = nil end
for desc in pairs(notfallbacks) do
fillMatches(this, desc)
end
if not hasNonFallback then
for desc in pairs(fallbacks) do
fillMatches(this, desc, true)
end
end
if not firstMatch then
this.at3_last_precursor = "\0"
return true
end
-- We want to replace the entire word with our completion, so highlight it up to the cursor.
-- If only one match exists, then stick it in there and append a space.
if numMatches == 1 then
-- HighlightText takes the value AFTER which the highlighting starts, so we have to subtract 1 to have it start before the first character.
this:HighlightText(this.at3matchStart-1, cursor)
this:Insert(firstMatch)
this:Insert(" ")
else
-- Otherwise, we want to begin cycling through the valid completions.
-- Beginning a cycle also causes the usage statement to be printed, if one exists.
-- Print usage statements for each possible completion (and gather up the GCBS of all matches while we're walking the tables).
allGCBS = nil
for desc, matches in pairs(this.at3matches) do
-- Don't print usage statements for fallback completion groups if we have 'real' completion groups with matches.
if hasNonFallback and fallbacks[desc] then break end
-- Use the group's description as a heading for its usage statements.
DEFAULT_CHAT_FRAME:AddMessage(desc..":")
local usagefunc = registry[desc].usagefunc
if not usagefunc then
-- No special usage processing; just print a list of the (formatted) matches.
for m, fm in pairs(matches) do
DEFAULT_CHAT_FRAME:AddMessage(fm)
allGCBS = gcbs(allGCBS, m)
end
else
-- Print a usage statement based on the corresponding registered usagefunc.
-- candUsage is the table passed to usagefunc to be filled with candidate = usage_statement pairs.
if type(usagefunc) == 'function' then
for i in pairs(candUsage) do candUsage[i] = nil end
-- usagefunc takes the greatest common substring of valid matches as one of its args, so let's find that now.
-- TODO: Make the GCBS function accept a vararg or table, after which we can just pass in the list of matches.
setGCBS = nil
for m in pairs(matches) do
setGCBS = gcbs(setGCBS, m)
end
allGCBS = gcbs(allGCBS, setGCBS)
usage = usagefunc(candUsage, matches, setGCBS, strsub(text_precursor, 1, prematchEnd))
-- If the usagefunc returns a string, then the entire usage statement has been taken care of by usagefunc, and we need only to print it...
if type(usage) == 'string' then
DEFAULT_CHAT_FRAME:AddMessage(usage)
-- ...otherwise, it should have filled candUsage with candidate-usage statement pairs, and we need to print the matching ones.
elseif next(candUsage) and numMatches > 0 then
for m, fm in pairs(matches) do
if candUsage[m] then DEFAULT_CHAT_FRAME:AddMessage(strformat("%s - %s", fm, candUsage[m])) end
end
end
end
end
if next(matches) then
-- Replace the original string with the greatest common substring of all valid completions.
this.at3curMatch = 1
this.at3origWord = strsub(text_precursor, this.at3matchStart, this.at3matchStart + pmolengths[desc] - 1) .. allGCBS or ""
this.at3origMatch = allGCBS or ""
this.at3lastWord = this.at3origWord
this.at3lastMatch = this.at3origMatch
this:HighlightText(this.at3matchStart-1, cursor)
this:Insert(this.at3origWord)
this.at3_last_precursor = getTextBeforeCursor(this) or ''
end
end
end
end
-135
View File
@@ -1,135 +0,0 @@
------------------------------------------------------------------------
r1293 | nevcairiel | 2022-10-22 09:10:10 +0000 (Sat, 22 Oct 2022) | 1 line
Changed paths:
M /trunk
M /trunk/changelog.txt
Update changelog
------------------------------------------------------------------------
r1292 | nevcairiel | 2022-09-29 08:00:11 +0000 (Thu, 29 Sep 2022) | 4 lines
Changed paths:
M /trunk
M /trunk/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua
M /trunk/AceGUI-3.0/widgets/AceGUIContainer-BlizOptionsGroup.lua
AceConfigDialog-3.0: Return a category name on all WoW flavors
On WoW 10.0 this can be passed to Settings.OpenToCategory, on older
variants InterfaceOptionsFrame_OpenToCategory should accept it equally.
------------------------------------------------------------------------
r1291 | nevcairiel | 2022-09-29 07:50:10 +0000 (Thu, 29 Sep 2022) | 1 line
Changed paths:
M /trunk
M /trunk/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua
M /trunk/AceGUI-3.0/widgets/AceGUIContainer-BlizOptionsGroup.lua
AceConfigDialog-3.0: Cleanup category handling
------------------------------------------------------------------------
r1290 | nevcairiel | 2022-09-29 07:40:11 +0000 (Thu, 29 Sep 2022) | 3 lines
Changed paths:
M /trunk
M /trunk/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua
M /trunk/AceGUI-3.0/widgets/AceGUIContainer-BlizOptionsGroup.lua
AceConfigDialog-3.0: Update handling of categories for recent 10.0 changes
Fixes WoWAce #605
------------------------------------------------------------------------
r1289 | nevcairiel | 2022-09-25 16:05:08 +0000 (Sun, 25 Sep 2022) | 1 line
Changed paths:
M /trunk
M /trunk/README.md
Remove references to the old Ace3 Wiki, as its dead.
------------------------------------------------------------------------
r1288 | funkehdude | 2022-09-25 14:19:00 +0000 (Sun, 25 Sep 2022) | 1 line
Changed paths:
M /trunk/AceGUI-3.0/AceGUI-3.0.lua
AceGUI-3.0: Fix a variable that got missed in all the renaming
------------------------------------------------------------------------
r1287 | nevcairiel | 2022-09-25 09:15:57 +0000 (Sun, 25 Sep 2022) | 1 line
Changed paths:
M /trunk
M /trunk/.luacheckrc
M /trunk/AceTab-3.0/AceTab-3.0.lua
M /trunk/LibStub/LibStub.lua
Few more upvalue tweaks
------------------------------------------------------------------------
r1286 | nevcairiel | 2022-09-25 09:15:49 +0000 (Sun, 25 Sep 2022) | 1 line
Changed paths:
M /trunk
M /trunk/.luacheckrc
M /trunk/AceGUI-3.0/AceGUI-3.0.lua
M /trunk/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua
Upvalue a few remaining math functions for consistency
------------------------------------------------------------------------
r1285 | nevcairiel | 2022-09-25 09:15:41 +0000 (Sun, 25 Sep 2022) | 1 line
Changed paths:
M /trunk
A /trunk/.github
A /trunk/.github/workflows
A /trunk/.github/workflows/ci.yml
A /trunk/.github/workflows/pull_request.yml
Add GitHub Actions to run Luacheck
------------------------------------------------------------------------
r1284 | nevcairiel | 2022-09-25 09:15:30 +0000 (Sun, 25 Sep 2022) | 4 lines
Changed paths:
M /trunk
A /trunk/.luacheckrc
M /trunk/AceAddon-3.0/AceAddon-3.0.lua
M /trunk/AceBucket-3.0/AceBucket-3.0.lua
M /trunk/AceComm-3.0/AceComm-3.0.lua
M /trunk/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua
M /trunk/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua
M /trunk/AceConsole-3.0/AceConsole-3.0.lua
M /trunk/AceDB-3.0/AceDB-3.0.lua
M /trunk/AceDBOptions-3.0/AceDBOptions-3.0.lua
M /trunk/AceGUI-3.0/AceGUI-3.0.lua
M /trunk/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua
M /trunk/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua
M /trunk/AceGUI-3.0/widgets/AceGUIContainer-Window.lua
M /trunk/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua
M /trunk/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua
M /trunk/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua
M /trunk/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua
M /trunk/AceGUI-3.0/widgets/AceGUIWidget-Keybinding.lua
M /trunk/AceGUI-3.0/widgets/AceGUIWidget-Label.lua
M /trunk/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua
M /trunk/AceGUI-3.0/widgets/AceGUIWidget-Slider.lua
M /trunk/AceHook-3.0/AceHook-3.0.lua
M /trunk/AceLocale-3.0/AceLocale-3.0.lua
M /trunk/AceSerializer-3.0/AceSerializer-3.0.lua
M /trunk/AceTab-3.0/AceTab-3.0.lua
M /trunk/AceTimer-3.0/AceTimer-3.0.lua
M /trunk/CallbackHandler-1.0/CallbackHandler-1.0.lua
M /trunk/LibStub/LibStub.lua
Luacheck rules and conformance
Also remove references to the old FindGlobals script, which were not
maintained for ages, and the role has been taken by Luacheck now.
------------------------------------------------------------------------
r1283 | nevcairiel | 2022-09-22 10:25:10 +0000 (Thu, 22 Sep 2022) | 1 line
Changed paths:
M /trunk
M /trunk/.editorconfig
A /trunk/README.md
Add README for GitHub
------------------------------------------------------------------------
r1282 | nevcairiel | 2022-09-22 06:10:10 +0000 (Thu, 22 Sep 2022) | 5 lines
Changed paths:
M /trunk
M /trunk/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua
AceGUI-3.0: TabGroup: Implement tabs without Blizzard Templates
In 10.0.0.45687, the Tab functionality was re-designed, requiring us to
keep a local copy if we want identical behavior to continue to be
available in the future.
------------------------------------------------------------------------
-29
View File
@@ -1,29 +0,0 @@
Copyright (c) 2007, Ace3 Development Team
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Redistribution of a stand alone version is strictly prohibited without
prior written authorization from the Lead of the Ace3 Development Team.
* Neither the name of the Ace3 Development Team nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+3
View File
@@ -0,0 +1,3 @@
<Ui xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">
<Script file="LibDBIcon-1.0.lua"/>
</Ui>
@@ -0,0 +1,3 @@
<Ui xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">
<Script file="LibDataBroker-1.1.lua"/>
</Ui>
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -1,4 +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">
<Script file="AceTab-3.0.lua"/>
</Ui>
<Script file="LibDeflate.lua" />
</Ui>
@@ -1,4 +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">
<Script file="AceHook-3.0.lua"/>
</Ui>
<Script file="LibDeflate.lua" />
</Ui>
-44
View File
@@ -1,44 +0,0 @@
--$Id: LibEasyMenu.lua 64 2020-11-18 13:13:15Z arithmandar $
-- //////////////////////////////////////////////////////////////
-- Notes:
-- Functions have been moved to under LibUIDropDownMenu.lua
-- New function calls are as below:
--
-- - lib:EasyMenu(menuList, menuFrame, anchor, x, y, displayMode, autoHideDelay )
-- - lib:EasyMenu_Initialize( frame, level, menuList )
--
-- //////////////////////////////////////////////////////////////
-- Simplified Menu Display System
-- This is a basic system for displaying a menu from a structure table.
--
-- See UIDropDownMenu.lua for the menuList details.
--
-- Args:
-- menuList - menu table
-- menuFrame - the UI frame to populate
-- anchor - where to anchor the frame (e.g. CURSOR)
-- x - x offset
-- y - y offset
-- displayMode - border type
-- autoHideDelay - how long until the menu disappears
--
--
--[[
function EasyMenu(menuList, menuFrame, anchor, x, y, displayMode, autoHideDelay )
if ( displayMode == "MENU" ) then
menuFrame.displayMode = displayMode;
end
UIDropDownMenu_Initialize(menuFrame, EasyMenu_Initialize, displayMode, nil, menuList);
ToggleDropDownMenu(1, nil, menuFrame, anchor, x, y, menuList, nil, autoHideDelay);
end
function EasyMenu_Initialize( frame, level, menuList )
for index = 1, #menuList do
local value = menuList[index]
if (value.text) then
value.index = index;
UIDropDownMenu_AddButton( value, level );
end
end
end
]]
File diff suppressed because it is too large Load Diff
@@ -1,24 +0,0 @@
<!-- $Id: LibUIDropDownMenu.xml 64 2020-11-18 13:13:15Z arithmandar $ -->
<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="LibUIDropDownMenu.lua"/>
<!-- <Include file="LibUIDropDownMenuTemplates.xml"/>
<Button name="L_DropDownList1" toplevel="true" frameStrata="FULLSCREEN_DIALOG" inherits="L_UIDropDownListTemplate" hidden="true" id="1">
<Size>
<AbsDimension x="180" y="10"/>
</Size>
<Scripts>
<OnLoad>
local fontName, fontHeight, fontFlags = _G["L_DropDownList1Button1NormalText"]:GetFont();
L_UIDROPDOWNMENU_DEFAULT_TEXT_HEIGHT = fontHeight;
</OnLoad>
</Scripts>
</Button>
<Button name="L_DropDownList2" toplevel="true" frameStrata="FULLSCREEN_DIALOG" inherits="L_UIDropDownListTemplate" hidden="true" id="2">
<Size>
<AbsDimension x="180" y="10"/>
</Size>
</Button>
-->
</Ui>
+626
View File
@@ -0,0 +1,626 @@
--[[
XXH_Lua_Lib.lua
A high-performance, pure Lua 5.1 implementation of XXHash32 and XXHash64 optimized for World of Warcraft (3.35) addon environment, relying on the native `bit` library for maximum speed and compatibility.
It provides both 32-bit and 64-bit hashing functions (64-bit arithmetic via two 32-bit halves)
------------------------------------------------------------------------------
Version: 1.0.0
Date: October 12, 2025
Author: Skulltrail
Algorithm Credit: Based on the original XXHash algorithm by Yann Collet.
------------------------------------------------------------------------------
API:
- XXH32(inputString, [seed]) -> 32-bit unsigned integer (Lua number, masked to 0xFFFFFFFF) | 1234567890 (32-bit number)
- XXH64(inputString, [seed]) -> 16-char uppercase hex string
- RunSelfTests([opts]) -> Prints test results to chat and returns boolean status.
opts:
- hexDumpAlways = true|false -- if true, shows hex dump for every test
- which = "all"|"lua"|"ascii"|"hex" -- select subset of tests
]]
local bit = bit
local band = bit.band
local bor = bit.bor
local bxor = bit.bxor
local lshift = bit.lshift
local rshift = bit.rshift
local string = string
local sbyte = string.byte
local table = table
local _G = _G
-- =========================================================================
-- CONSTANTS
-- =========================================================================
local P32_1 = 0x9E3779B1
local P32_2 = 0x85EBCA77
local P32_3 = 0xC2B2AE3D
local P32_4 = 0x27D4EB2F
local P32_5 = 0x165667B1
-- 64-bit primes split into hi/lo 32-bit words
local P64_1_H, P64_1_L = 0x9E3779B1, 0x85EBCA87
local P64_2_H, P64_2_L = 0xC2B2AE3D, 0x27D4EB4F
local P64_3_H, P64_3_L = 0x165667B1, 0x9E3779F9
local P64_4_H, P64_4_L = 0x85EBCA77, 0xC2B2AE63
local P64_5_H, P64_5_L = 0x27D4EB2F, 0x165667C5
local U32_MASK = 0xFFFFFFFF
local TWO32 = 4294967296
-- =========================================================================
-- 32-bit helpers
-- =========================================================================
local function rol32_fallback(x, s)
s = band(s or 0, 31)
if s == 0 then
return band(x, U32_MASK)
end
local left = lshift(band(x, U32_MASK), s)
local right = rshift(band(x, U32_MASK), 32 - s)
return band(bor(left, right), U32_MASK)
end
local rol32 = (bit and bit.rol) or rol32_fallback
local function imul32(a, b)
a = band(a or 0, U32_MASK)
b = band(b or 0, U32_MASK)
local a_hi, a_lo = rshift(a, 16), band(a, 0xFFFF)
local b_hi, b_lo = rshift(b, 16), band(b, 0xFFFF)
local p1 = a_lo * b_lo
local p2 = a_lo * b_hi
local p3 = a_hi * b_lo
local mid = rshift(p1, 16) + band(p2, 0xFFFF) + band(p3, 0xFFFF)
local lo32 = band(p1, 0xFFFF) + lshift(band(mid, 0xFFFF), 16)
return band(lo32, U32_MASK)
end
local function read_u32_le(str, offset)
local b1, b2, b3, b4 = sbyte(str, offset, offset + 3)
b1, b2, b3, b4 = b1 or 0, b2 or 0, b3 or 0, b4 or 0
return b1 + b2 * 256 + b3 * 65536 + b4 * 16777216
end
-- =========================================================================
-- XXH32
-- =========================================================================
local function XXH32(str, seed)
local len = table.getn(str)
seed = band(seed or 0, U32_MASK)
local h32
local index = 1
if len >= 16 then
local acc1 = band(seed + P32_1 + P32_2, U32_MASK)
local acc2 = band(seed + P32_2, U32_MASK)
local acc3 = band(seed, U32_MASK)
local acc4 = band(seed - P32_1, U32_MASK)
local limit = len - 15
while index <= limit do
acc1 = imul32(rol32(band(acc1 + imul32(read_u32_le(str, index), P32_2), U32_MASK), 13), P32_1)
acc2 = imul32(rol32(band(acc2 + imul32(read_u32_le(str, index + 4), P32_2), U32_MASK), 13), P32_1)
acc3 = imul32(rol32(band(acc3 + imul32(read_u32_le(str, index + 8), P32_2), U32_MASK), 13), P32_1)
acc4 = imul32(rol32(band(acc4 + imul32(read_u32_le(str, index + 12), P32_2), U32_MASK), 13), P32_1)
index = index + 16
end
h32 = band(rol32(acc1, 1) + rol32(acc2, 7) + rol32(acc3, 12) + rol32(acc4, 18), U32_MASK)
else
h32 = band(seed + P32_5, U32_MASK)
end
h32 = band(h32 + len, U32_MASK)
while index <= len - 3 do
h32 = band(h32 + imul32(read_u32_le(str, index), P32_3), U32_MASK)
h32 = imul32(rol32(h32, 17), P32_4)
index = index + 4
end
-- At most three tail bytes;
local rem = len - index + 1
if rem >= 1 then
h32 = band(h32 + imul32(sbyte(str, index), P32_5), U32_MASK)
h32 = imul32(rol32(h32, 11), P32_1)
index = index + 1
end
if rem >= 2 then
h32 = band(h32 + imul32(sbyte(str, index), P32_5), U32_MASK)
h32 = imul32(rol32(h32, 11), P32_1)
index = index + 1
end
if rem >= 3 then
h32 = band(h32 + imul32(sbyte(str, index), P32_5), U32_MASK)
h32 = imul32(rol32(h32, 11), P32_1)
end
h32 = bxor(h32, rshift(h32, 15))
h32 = imul32(h32, P32_2)
h32 = bxor(h32, rshift(h32, 13))
h32 = imul32(h32, P32_3)
h32 = bxor(h32, rshift(h32, 16))
return h32
end
-- =========================================================================
-- 64-bit helpers (hi, lo)
-- =========================================================================
local function mul32_to64(a, b)
a = band(a or 0, U32_MASK)
b = band(b or 0, U32_MASK)
local a_hi, a_lo = rshift(a, 16), band(a, 0xFFFF)
local b_hi, b_lo = rshift(b, 16), band(b, 0xFFFF)
local p1 = a_lo * b_lo
local p2 = a_lo * b_hi
local p3 = a_hi * b_lo
local p4 = a_hi * b_hi
local mid = rshift(p1, 16) + band(p2, 0xFFFF) + band(p3, 0xFFFF)
local lo_word = band(p1, 0xFFFF) + lshift(band(mid, 0xFFFF), 16)
local hi_word = p4 + rshift(p2, 16) + rshift(p3, 16) + rshift(mid, 16)
return band(hi_word, U32_MASK), band(lo_word, U32_MASK)
end
local function mul64(a_hi, a_lo, b_hi, b_lo)
local p1_hi, p1_lo = mul32_to64(a_lo, b_lo)
local p2_lo = imul32(a_lo, b_hi)
local p3_lo = imul32(a_hi, b_lo)
local hi = band(p1_hi + p2_lo + p3_lo, U32_MASK)
local lo = p1_lo
return hi, lo
end
-- Specialized: 32-bit value x times 64-bit constant (C_H, C_L)
local function mul_u32_const64(x, C_H, C_L)
local hi_part, lo_part = mul32_to64(x, C_L)
hi_part = band(hi_part + imul32(x, C_H), U32_MASK)
return hi_part, lo_part
end
local function add64(a_hi, a_lo, b_hi, b_lo)
a_hi, a_lo = band(a_hi or 0, U32_MASK), band(a_lo or 0, U32_MASK)
b_hi, b_lo = band(b_hi or 0, U32_MASK), band(b_lo or 0, U32_MASK)
local sum_lo = a_lo + b_lo
local carry = (sum_lo >= TWO32) and 1 or 0
if carry ~= 0 then
sum_lo = sum_lo - TWO32
end
local sum_hi = a_hi + b_hi + carry
return band(sum_hi, U32_MASK), band(sum_lo, U32_MASK)
end
local function sub64(a_hi, a_lo, b_hi, b_lo)
a_hi, a_lo = band(a_hi or 0, U32_MASK), band(a_lo or 0, U32_MASK)
b_hi, b_lo = band(b_hi or 0, U32_MASK), band(b_lo or 0, U32_MASK)
local diff_lo = a_lo - b_lo
local borrow = 0
if diff_lo < 0 then
diff_lo = diff_lo + TWO32
borrow = 1
end
local diff_hi = a_hi - b_hi - borrow
return band(diff_hi, U32_MASK), band(diff_lo, U32_MASK)
end
local function rol64(hi, lo, bits)
bits = band(bits or 0, 63)
if bits == 0 then return band(hi, U32_MASK), band(lo, U32_MASK) end
if bits >= 32 then
bits = bits - 32
hi, lo = lo, hi
if bits == 0 then
return band(hi, U32_MASK), band(lo, U32_MASK)
end
end
local new_hi = band(bor(lshift(hi, bits), rshift(lo, 32 - bits)), U32_MASK)
local new_lo = band(bor(lshift(lo, bits), rshift(hi, 32 - bits)), U32_MASK)
return new_hi, new_lo
end
local function rshift64(hi, lo, bits)
bits = band(bits or 0, 63)
hi = band(hi, U32_MASK)
lo = band(lo, U32_MASK)
if bits == 0 then
return hi, lo
elseif bits < 32 then
local new_lo = bor(rshift(lo, bits), lshift(hi, 32 - bits))
local new_hi = rshift(hi, bits)
return band(new_hi, U32_MASK), band(new_lo, U32_MASK)
elseif bits == 32 then
return 0, hi
else
return 0, rshift(hi, bits - 32)
end
end
-- Specialized right shifts used in avalanche (fewer branches)
local function rshift64_33(hi, lo)
-- Shift right 64 by 33: new_hi = 0, new_lo = hi >> 1
return 0, rshift(band(hi, U32_MASK), 1)
end
local function rshift64_29(hi, lo)
-- Shift right 64 by 29: new_hi = hi >> 29, new_lo = (lo >> 29) | (hi << 3)
hi = band(hi, U32_MASK); lo = band(lo, U32_MASK)
local new_hi = rshift(hi, 29)
local new_lo = bor(rshift(lo, 29), lshift(hi, 3))
return band(new_hi, U32_MASK), band(new_lo, U32_MASK)
end
local function rshift64_32(hi, lo)
-- Shift right 64 by 32: new_hi = 0, new_lo = hi
return 0, band(hi, U32_MASK)
end
-- =========================================================================
-- XXH64
-- =========================================================================
local function merge_accumulators(h_h, h_l, a_h, a_l)
local t_h, t_l = mul64(a_h, a_l, P64_2_H, P64_2_L)
t_h, t_l = rol64(t_h, t_l, 31)
t_h, t_l = mul64(t_h, t_l, P64_1_H, P64_1_L)
h_h = bxor(h_h, t_h); h_l = bxor(h_l, t_l)
h_h, h_l = mul64(h_h, h_l, P64_1_H, P64_1_L)
return add64(h_h, h_l, P64_4_H, P64_4_L)
end
local function XXH64_small(str, seed)
-- Specialized fast path for len <= 16 (avoids extra branching/loops)
local len = table.getn(str)
local h_hi, h_lo = 0, band(seed or 0, U32_MASK)
-- h = seed + P5
h_hi, h_lo = add64(h_hi, h_lo, P64_5_H, P64_5_L)
-- h += len
h_hi, h_lo = add64(h_hi, h_lo, 0, len)
local index = 1
if len >= 8 then
local ll = read_u32_le(str, index)
local lh = read_u32_le(str, index + 4)
-- h ^= (lane * P2).rotl(31) * P1
local t_h, t_l = mul64(lh, ll, P64_2_H, P64_2_L)
t_h, t_l = rol64(t_h, t_l, 31)
t_h, t_l = mul64(t_h, t_l, P64_1_H, P64_1_L)
h_hi = bxor(h_hi, t_h); h_lo = bxor(h_lo, t_l)
h_hi, h_lo = rol64(h_hi, h_lo, 27)
h_hi, h_lo = mul64(h_hi, h_lo, P64_1_H, P64_1_L)
h_hi, h_lo = add64(h_hi, h_lo, P64_4_H, P64_4_L)
index = index + 8
len = len - 8
end
if len >= 4 then
local v32 = read_u32_le(str, index)
local m_h, m_l = mul_u32_const64(v32, P64_1_H, P64_1_L)
h_hi = bxor(h_hi, m_h); h_lo = bxor(h_lo, m_l)
h_hi, h_lo = rol64(h_hi, h_lo, 23)
h_hi, h_lo = mul64(h_hi, h_lo, P64_2_H, P64_2_L)
h_hi, h_lo = add64(h_hi, h_lo, P64_3_H, P64_3_L)
index = index + 4
len = len - 4
end
while len > 0 do
local b = sbyte(str, index)
local m_h, m_l = mul_u32_const64(b, P64_5_H, P64_5_L)
h_hi = bxor(h_hi, m_h); h_lo = bxor(h_lo, m_l)
h_hi, h_lo = rol64(h_hi, h_lo, 11)
h_hi, h_lo = mul64(h_hi, h_lo, P64_1_H, P64_1_L)
index = index + 1
len = len - 1
end
-- Avalanche with specialized shifts
local s1_h, s1_l = rshift64_33(h_hi, h_lo)
h_hi = bxor(h_hi, s1_h); h_lo = bxor(h_lo, s1_l)
h_hi, h_lo = mul64(h_hi, h_lo, P64_2_H, P64_2_L)
local s2_h, s2_l = rshift64_29(h_hi, h_lo)
h_hi = bxor(h_hi, s2_h); h_lo = bxor(h_lo, s2_l)
h_hi, h_lo = mul64(h_hi, h_lo, P64_3_H, P64_3_L)
local s3_h, s3_l = rshift64_32(h_hi, h_lo)
h_hi = bxor(h_hi, s3_h); h_lo = bxor(h_lo, s3_l)
return string.format("%08X%08X", h_hi, h_lo)
end
local function XXH64(str, seed)
local len = table.getn(str)
if len <= 16 then
return XXH64_small(str, seed)
end
local seed_hi, seed_lo = 0, band(seed or 0, U32_MASK)
local h_hi, h_lo
local index = 1
if len >= 32 then
local acc1_h, acc1_l = add64(seed_hi, seed_lo, P64_1_H, P64_1_L)
acc1_h, acc1_l = add64(acc1_h, acc1_l, P64_2_H, P64_2_L)
local acc2_h, acc2_l = add64(seed_hi, seed_lo, P64_2_H, P64_2_L)
local acc3_h, acc3_l = seed_hi, seed_lo
local acc4_h, acc4_l = sub64(seed_hi, seed_lo, P64_1_H, P64_1_L)
local limit = len - 31
while index <= limit do
-- Inline read_u64_le
local l1l = read_u32_le(str, index)
local l1h = read_u32_le(str, index + 4)
local l2l = read_u32_le(str, index + 8)
local l2h = read_u32_le(str, index + 12)
local l3l = read_u32_le(str, index + 16)
local l3h = read_u32_le(str, index + 20)
local l4l = read_u32_le(str, index + 24)
local l4h = read_u32_le(str, index + 28)
do
local t_h, t_l = mul64(l1h, l1l, P64_2_H, P64_2_L)
acc1_h, acc1_l = add64(acc1_h, acc1_l, t_h, t_l)
acc1_h, acc1_l = rol64(acc1_h, acc1_l, 31)
acc1_h, acc1_l = mul64(acc1_h, acc1_l, P64_1_H, P64_1_L)
end
do
local t_h, t_l = mul64(l2h, l2l, P64_2_H, P64_2_L)
acc2_h, acc2_l = add64(acc2_h, acc2_l, t_h, t_l)
acc2_h, acc2_l = rol64(acc2_h, acc2_l, 31)
acc2_h, acc2_l = mul64(acc2_h, acc2_l, P64_1_H, P64_1_L)
end
do
local t_h, t_l = mul64(l3h, l3l, P64_2_H, P64_2_L)
acc3_h, acc3_l = add64(acc3_h, acc3_l, t_h, t_l)
acc3_h, acc3_l = rol64(acc3_h, acc3_l, 31)
acc3_h, acc3_l = mul64(acc3_h, acc3_l, P64_1_H, P64_1_L)
end
do
local t_h, t_l = mul64(l4h, l4l, P64_2_H, P64_2_L)
acc4_h, acc4_l = add64(acc4_h, acc4_l, t_h, t_l)
acc4_h, acc4_l = rol64(acc4_h, acc4_l, 31)
acc4_h, acc4_l = mul64(acc4_h, acc4_l, P64_1_H, P64_1_L)
end
index = index + 32
end
local r1h, r1l = rol64(acc1_h, acc1_l, 1)
local r2h, r2l = rol64(acc2_h, acc2_l, 7)
local r3h, r3l = rol64(acc3_h, acc3_l, 12)
local r4h, r4l = rol64(acc4_h, acc4_l, 18)
h_hi, h_lo = add64(r1h, r1l, r2h, r2l)
h_hi, h_lo = add64(h_hi, h_lo, r3h, r3l)
h_hi, h_lo = add64(h_hi, h_lo, r4h, r4l)
h_hi, h_lo = merge_accumulators(h_hi, h_lo, acc1_h, acc1_l)
h_hi, h_lo = merge_accumulators(h_hi, h_lo, acc2_h, acc2_l)
h_hi, h_lo = merge_accumulators(h_hi, h_lo, acc3_h, acc3_l)
h_hi, h_lo = merge_accumulators(h_hi, h_lo, acc4_h, acc4_l)
else
h_hi, h_lo = add64(seed_hi, seed_lo, P64_5_H, P64_5_L)
end
-- h += len
h_hi, h_lo = add64(h_hi, h_lo, 0, len)
-- 8-byte lanes
local limit8 = len - (index - 1) - 7
while limit8 >= 0 do
local ll = read_u32_le(str, index)
local lh = read_u32_le(str, index + 4)
local t_h, t_l = mul64(lh, ll, P64_2_H, P64_2_L)
t_h, t_l = rol64(t_h, t_l, 31)
t_h, t_l = mul64(t_h, t_l, P64_1_H, P64_1_L)
h_hi = bxor(h_hi, t_h); h_lo = bxor(h_lo, t_l)
h_hi, h_lo = rol64(h_hi, h_lo, 27)
h_hi, h_lo = mul64(h_hi, h_lo, P64_1_H, P64_1_L)
h_hi, h_lo = add64(h_hi, h_lo, P64_4_H, P64_4_L)
index = index + 8
limit8 = limit8 - 8
end
-- 4-byte tail: h ^= (read32 * P1); h = rotl(h, 23) * P2 + P3
if index <= table.getn(str) - 3 then
local v32 = read_u32_le(str, index)
local m_h, m_l = mul_u32_const64(v32, P64_1_H, P64_1_L)
h_hi = bxor(h_hi, m_h); h_lo = bxor(h_lo, m_l)
h_hi, h_lo = rol64(h_hi, h_lo, 23)
h_hi, h_lo = mul64(h_hi, h_lo, P64_2_H, P64_2_L)
h_hi, h_lo = add64(h_hi, h_lo, P64_3_H, P64_3_L)
index = index + 4
end
-- 1-byte tails: for each b, h ^= (b * P5); h = rotl(h, 11) * P1
while index <= table.getn(str) do
local b = sbyte(str, index)
local m_h, m_l = mul_u32_const64(b, P64_5_H, P64_5_L)
h_hi = bxor(h_hi, m_h); h_lo = bxor(h_lo, m_l)
h_hi, h_lo = rol64(h_hi, h_lo, 11)
h_hi, h_lo = mul64(h_hi, h_lo, P64_1_H, P64_1_L)
index = index + 1
end
-- Final mix (avalanche) with specialized shifts
local s1_h, s1_l = rshift64_33(h_hi, h_lo)
h_hi = bxor(h_hi, s1_h); h_lo = bxor(h_lo, s1_l)
h_hi, h_lo = mul64(h_hi, h_lo, P64_2_H, P64_2_L)
local s2_h, s2_l = rshift64_29(h_hi, h_lo)
h_hi = bxor(h_hi, s2_h); h_lo = bxor(h_lo, s2_l)
h_hi, h_lo = mul64(h_hi, h_lo, P64_3_H, P64_3_L)
local s3_h, s3_l = rshift64_32(h_hi, h_lo)
h_hi = bxor(h_hi, s3_h); h_lo = bxor(h_lo, s3_l)
return string.format("%08X%08X", h_hi, h_lo)
end
-- =========================================================================
-- DEBUG/TEST UTILITIES
-- =========================================================================
local function to_hex_bytes(str)
local t = {}
for i = 1, table.getn(str) do
t[table.getn(t) + 1] = string.format("%02X", sbyte(str, i))
end
return table.concat(t, " ")
end
local function parse_hex_bytes(hex)
local out = {}
for byte in string.gmatch(hex, "%x%x") do
out[table.getn(out) + 1] = string.char(tonumber(byte, 16))
end
return table.concat(out)
end
local function printable_echo(str)
local step1 = string.gsub(str, "\\", "\\\\")
local step2 = string.gsub(step1, "\0", "\\0")
local step3 = string.gsub(step2, "([\001-\009\011\012\014-\031\127])", function(c)
return string.format("\\x%02X", sbyte(c))
end)
return step3
end
-- =========================================================================
-- SELF-TESTING FUNCTION
-- =========================================================================
local function RunSelfTests(opts)
opts = opts or {}
local hexAlways = not not opts.hexDumpAlways
local which = opts.which or "all"
-- Expectations aligned with Python xxhash and exact bytes:
-- "" -> XXH32 02CC5D05, XXH64 EF46DB3751D8E999
-- 00 -> XXH32 CF65B03E, XXH64 E934A84ADB052768
-- 5C 30 ("\\0") -> XXH32 6257410B, XXH64 5263B0A7F5A1FD64
-- 61 62 63 -> XXH32 32D153FF, XXH64 44BC2CF5AD770999
-- empty seed 0x9E3779B1 -> XXH32 36B78AE7, XXH64 AC75FDA2929B17EF
-- 5C30 61 5C30 62 5C30 63 5C30 -> XXH32 737C5242, XXH64 43AB68FB8CD6407D
-- "Skulltrail" seed 2025 -> XXH32 4A31242C, XXH64 A56F88A6999B63F5
local tests = {
lua = {
{ str = "", seed = 0, exp32 = 0x02CC5D05, exp64 = "EF46DB3751D8E999", label = "empty" },
{ str = "\0", seed = 0, exp32 = 0xCF65B03E, exp64 = "E934A84ADB052768", label = "single NUL 00" },
{ str = "\0a\0", seed = 0, exp32 = false, exp64 = false, label = "00 61 00 (info)" },
{ str = "\0a\0b\0c\0", seed = 0, exp32 = false, exp64 = false, label = "00 61 00 62 00 63 00 (info)" },
{ str = "\0t\0e\0s\0t\0", seed = 0, exp32 = false, exp64 = false, label = "00 74 00 65 00 73 00 74 00 (info)" },
{ str = "", seed = 0x9E3779B1, exp32 = 0x36B78AE7, exp64 = "AC75FDA2929B17EF", label = "empty, seed" },
{ str = "Skulltrail", seed = 2025, exp32 = 0x4A31242C, exp64 = "A56F88A6999B63F5", label = "string+seed" },
},
ascii = {
{ str = "\\0", seed = 0, exp32 = 0x6257410B, exp64 = "5263B0A7F5A1FD64", label = "ASCII \\0 (5C 30)" },
{ str = "\\0a\\0b\\0c\\0",seed = 0, exp32 = 0x737C5242, exp64 = "43AB68FB8CD6407D", label = "ASCII \\0a\\0b\\0c\\0" },
},
hex = {
{ hex = "61 62 63", seed = 0, exp32 = 0x32D153FF, exp64 = "44BC2CF5AD770999", label = "HEX abc" },
{ hex = "00", seed = 0, exp32 = 0xCF65B03E, exp64 = "E934A84ADB052768", label = "HEX 00" },
{ hex = "5C 30", seed = 0, exp32 = 0x6257410B, exp64 = "5263B0A7F5A1FD64", label = "HEX 5C 30 (\"\\0\")" },
{ hex = "5C 30 61 5C 30 62 5C 30 63 5C 30", seed = 0, exp32 = 0x737C5242, exp64 = "43AB68FB8CD6407D", label = "HEX \\0a\\0b\\0c\\0" },
},
}
local selection = {}
if which == "all" or which == "lua" then for _, t in ipairs(tests.lua) do table.insert(selection, { kind = "lua", data = t }) end end
if which == "all" or which == "ascii" then for _, t in ipairs(tests.ascii) do table.insert(selection, { kind = "ascii", data = t }) end end
if which == "all" or which == "hex" then for _, t in ipairs(tests.hex) do table.insert(selection, { kind = "hex", data = t }) end end
local success = true
print("--- Running XXH_Lua_Lib Self-Tests ---")
for _, item in ipairs(selection) do
local kind = item.kind
local t = item.data
local src, shown
if kind == "lua" then
src = t.str
shown = printable_echo(t.str)
elseif kind == "ascii" then
src = t.str
shown = t.str
elseif kind == "hex" then
src = parse_hex_bytes(t.hex)
shown = t.hex
end
local got32 = XXH32(src, t.seed)
local got64 = XXH64(src, t.seed)
if t.exp32 ~= false then
local ok32 = (got32 == t.exp32)
local status32 = ok32 and "|cff00ff00PASS|r" or "|cffff0000FAIL|r"
print(string.format("XXH Test: %s - XXH32 - Input: '%s', Seed: 0x%x", status32, shown, t.seed))
if not ok32 then
print(string.format(" - Expected: 0x%08X", t.exp32))
print(string.format(" - Got: 0x%08X", got32))
success = false
end
if hexAlways or not ok32 then
print(string.format(" - Hex Dump: %s\t\t%s", to_hex_bytes(src), printable_echo(src)))
end
else
print(string.format("XXH Test: INFO - XXH32 - Input: '%s', Seed: 0x%x -> 0x%08X", shown, t.seed, got32))
if hexAlways then print(string.format(" - Hex Dump: %s\t\t%s", to_hex_bytes(src), printable_echo(src))) end
end
if t.exp64 ~= false then
local ok64 = (string.upper(got64) == string.upper(t.exp64))
local status64 = ok64 and "|cff00ff00PASS|r" or "|cffff0000FAIL|r"
print(string.format("XXH Test: %s - XXH64 - Input: '%s', Seed: 0x%x", status64, shown, t.seed))
if not ok64 then
print(string.format(" - Expected: %s", t.exp64))
print(string.format(" - Got: %s", got64))
success = false
end
if hexAlways or not ok64 then
print(string.format(" - Hex Dump: %s\t\t%s", to_hex_bytes(src), printable_echo(src)))
end
else
print(string.format("XXH Test: INFO - XXH64 - Input: '%s', Seed: 0x%x -> %s", shown, t.seed, got64))
if hexAlways then print(string.format(" - Hex Dump: %s\t\t%s", to_hex_bytes(src), printable_echo(src))) end
end
end
if success then
print("|cff00ff00All tests passed successfully!|r")
else
print("|cffff0000One or more tests failed!|r")
end
print("--------------------------------------")
return success
end
-- =========================================================================
-- MODULE EXPORT
-- =========================================================================
local XXH_Lua_Lib = {
XXH32 = XXH32,
XXH64 = XXH64,
RunSelfTests = RunSelfTests,
}
_G.XXH_Lua_Lib = XXH_Lua_Lib
return XXH_Lua_Lib
@@ -0,0 +1,626 @@
--[[
XXH_Lua_Lib.lua
A high-performance, pure Lua 5.1 implementation of XXHash32 and XXHash64 optimized for World of Warcraft (3.35) addon environment, relying on the native `bit` library for maximum speed and compatibility.
It provides both 32-bit and 64-bit hashing functions (64-bit arithmetic via two 32-bit halves)
------------------------------------------------------------------------------
Version: 1.0.0
Date: October 12, 2025
Author: Skulltrail
Algorithm Credit: Based on the original XXHash algorithm by Yann Collet.
------------------------------------------------------------------------------
API:
- XXH32(inputString, [seed]) -> 32-bit unsigned integer (Lua number, masked to 0xFFFFFFFF) | 1234567890 (32-bit number)
- XXH64(inputString, [seed]) -> 16-char uppercase hex string
- RunSelfTests([opts]) -> Prints test results to chat and returns boolean status.
opts:
- hexDumpAlways = true|false -- if true, shows hex dump for every test
- which = "all"|"lua"|"ascii"|"hex" -- select subset of tests
]]
local bit = bit
local band = bit.band
local bor = bit.bor
local bxor = bit.bxor
local lshift = bit.lshift
local rshift = bit.rshift
local string = string
local sbyte = string.byte
local table = table
local _G = _G
-- =========================================================================
-- CONSTANTS
-- =========================================================================
local P32_1 = 0x9E3779B1
local P32_2 = 0x85EBCA77
local P32_3 = 0xC2B2AE3D
local P32_4 = 0x27D4EB2F
local P32_5 = 0x165667B1
-- 64-bit primes split into hi/lo 32-bit words
local P64_1_H, P64_1_L = 0x9E3779B1, 0x85EBCA87
local P64_2_H, P64_2_L = 0xC2B2AE3D, 0x27D4EB4F
local P64_3_H, P64_3_L = 0x165667B1, 0x9E3779F9
local P64_4_H, P64_4_L = 0x85EBCA77, 0xC2B2AE63
local P64_5_H, P64_5_L = 0x27D4EB2F, 0x165667C5
local U32_MASK = 0xFFFFFFFF
local TWO32 = 4294967296
-- =========================================================================
-- 32-bit helpers
-- =========================================================================
local function rol32_fallback(x, s)
s = band(s or 0, 31)
if s == 0 then
return band(x, U32_MASK)
end
local left = lshift(band(x, U32_MASK), s)
local right = rshift(band(x, U32_MASK), 32 - s)
return band(bor(left, right), U32_MASK)
end
local rol32 = (bit and bit.rol) or rol32_fallback
local function imul32(a, b)
a = band(a or 0, U32_MASK)
b = band(b or 0, U32_MASK)
local a_hi, a_lo = rshift(a, 16), band(a, 0xFFFF)
local b_hi, b_lo = rshift(b, 16), band(b, 0xFFFF)
local p1 = a_lo * b_lo
local p2 = a_lo * b_hi
local p3 = a_hi * b_lo
local mid = rshift(p1, 16) + band(p2, 0xFFFF) + band(p3, 0xFFFF)
local lo32 = band(p1, 0xFFFF) + lshift(band(mid, 0xFFFF), 16)
return band(lo32, U32_MASK)
end
local function read_u32_le(str, offset)
local b1, b2, b3, b4 = sbyte(str, offset, offset + 3)
b1, b2, b3, b4 = b1 or 0, b2 or 0, b3 or 0, b4 or 0
return b1 + b2 * 256 + b3 * 65536 + b4 * 16777216
end
-- =========================================================================
-- XXH32
-- =========================================================================
local function XXH32(str, seed)
local len = table.getn(str)
seed = band(seed or 0, U32_MASK)
local h32
local index = 1
if len >= 16 then
local acc1 = band(seed + P32_1 + P32_2, U32_MASK)
local acc2 = band(seed + P32_2, U32_MASK)
local acc3 = band(seed, U32_MASK)
local acc4 = band(seed - P32_1, U32_MASK)
local limit = len - 15
while index <= limit do
acc1 = imul32(rol32(band(acc1 + imul32(read_u32_le(str, index), P32_2), U32_MASK), 13), P32_1)
acc2 = imul32(rol32(band(acc2 + imul32(read_u32_le(str, index + 4), P32_2), U32_MASK), 13), P32_1)
acc3 = imul32(rol32(band(acc3 + imul32(read_u32_le(str, index + 8), P32_2), U32_MASK), 13), P32_1)
acc4 = imul32(rol32(band(acc4 + imul32(read_u32_le(str, index + 12), P32_2), U32_MASK), 13), P32_1)
index = index + 16
end
h32 = band(rol32(acc1, 1) + rol32(acc2, 7) + rol32(acc3, 12) + rol32(acc4, 18), U32_MASK)
else
h32 = band(seed + P32_5, U32_MASK)
end
h32 = band(h32 + len, U32_MASK)
while index <= len - 3 do
h32 = band(h32 + imul32(read_u32_le(str, index), P32_3), U32_MASK)
h32 = imul32(rol32(h32, 17), P32_4)
index = index + 4
end
-- At most three tail bytes;
local rem = len - index + 1
if rem >= 1 then
h32 = band(h32 + imul32(sbyte(str, index), P32_5), U32_MASK)
h32 = imul32(rol32(h32, 11), P32_1)
index = index + 1
end
if rem >= 2 then
h32 = band(h32 + imul32(sbyte(str, index), P32_5), U32_MASK)
h32 = imul32(rol32(h32, 11), P32_1)
index = index + 1
end
if rem >= 3 then
h32 = band(h32 + imul32(sbyte(str, index), P32_5), U32_MASK)
h32 = imul32(rol32(h32, 11), P32_1)
end
h32 = bxor(h32, rshift(h32, 15))
h32 = imul32(h32, P32_2)
h32 = bxor(h32, rshift(h32, 13))
h32 = imul32(h32, P32_3)
h32 = bxor(h32, rshift(h32, 16))
return h32
end
-- =========================================================================
-- 64-bit helpers (hi, lo)
-- =========================================================================
local function mul32_to64(a, b)
a = band(a or 0, U32_MASK)
b = band(b or 0, U32_MASK)
local a_hi, a_lo = rshift(a, 16), band(a, 0xFFFF)
local b_hi, b_lo = rshift(b, 16), band(b, 0xFFFF)
local p1 = a_lo * b_lo
local p2 = a_lo * b_hi
local p3 = a_hi * b_lo
local p4 = a_hi * b_hi
local mid = rshift(p1, 16) + band(p2, 0xFFFF) + band(p3, 0xFFFF)
local lo_word = band(p1, 0xFFFF) + lshift(band(mid, 0xFFFF), 16)
local hi_word = p4 + rshift(p2, 16) + rshift(p3, 16) + rshift(mid, 16)
return band(hi_word, U32_MASK), band(lo_word, U32_MASK)
end
local function mul64(a_hi, a_lo, b_hi, b_lo)
local p1_hi, p1_lo = mul32_to64(a_lo, b_lo)
local p2_lo = imul32(a_lo, b_hi)
local p3_lo = imul32(a_hi, b_lo)
local hi = band(p1_hi + p2_lo + p3_lo, U32_MASK)
local lo = p1_lo
return hi, lo
end
-- Specialized: 32-bit value x times 64-bit constant (C_H, C_L)
local function mul_u32_const64(x, C_H, C_L)
local hi_part, lo_part = mul32_to64(x, C_L)
hi_part = band(hi_part + imul32(x, C_H), U32_MASK)
return hi_part, lo_part
end
local function add64(a_hi, a_lo, b_hi, b_lo)
a_hi, a_lo = band(a_hi or 0, U32_MASK), band(a_lo or 0, U32_MASK)
b_hi, b_lo = band(b_hi or 0, U32_MASK), band(b_lo or 0, U32_MASK)
local sum_lo = a_lo + b_lo
local carry = (sum_lo >= TWO32) and 1 or 0
if carry ~= 0 then
sum_lo = sum_lo - TWO32
end
local sum_hi = a_hi + b_hi + carry
return band(sum_hi, U32_MASK), band(sum_lo, U32_MASK)
end
local function sub64(a_hi, a_lo, b_hi, b_lo)
a_hi, a_lo = band(a_hi or 0, U32_MASK), band(a_lo or 0, U32_MASK)
b_hi, b_lo = band(b_hi or 0, U32_MASK), band(b_lo or 0, U32_MASK)
local diff_lo = a_lo - b_lo
local borrow = 0
if diff_lo < 0 then
diff_lo = diff_lo + TWO32
borrow = 1
end
local diff_hi = a_hi - b_hi - borrow
return band(diff_hi, U32_MASK), band(diff_lo, U32_MASK)
end
local function rol64(hi, lo, bits)
bits = band(bits or 0, 63)
if bits == 0 then return band(hi, U32_MASK), band(lo, U32_MASK) end
if bits >= 32 then
bits = bits - 32
hi, lo = lo, hi
if bits == 0 then
return band(hi, U32_MASK), band(lo, U32_MASK)
end
end
local new_hi = band(bor(lshift(hi, bits), rshift(lo, 32 - bits)), U32_MASK)
local new_lo = band(bor(lshift(lo, bits), rshift(hi, 32 - bits)), U32_MASK)
return new_hi, new_lo
end
local function rshift64(hi, lo, bits)
bits = band(bits or 0, 63)
hi = band(hi, U32_MASK)
lo = band(lo, U32_MASK)
if bits == 0 then
return hi, lo
elseif bits < 32 then
local new_lo = bor(rshift(lo, bits), lshift(hi, 32 - bits))
local new_hi = rshift(hi, bits)
return band(new_hi, U32_MASK), band(new_lo, U32_MASK)
elseif bits == 32 then
return 0, hi
else
return 0, rshift(hi, bits - 32)
end
end
-- Specialized right shifts used in avalanche (fewer branches)
local function rshift64_33(hi, lo)
-- Shift right 64 by 33: new_hi = 0, new_lo = hi >> 1
return 0, rshift(band(hi, U32_MASK), 1)
end
local function rshift64_29(hi, lo)
-- Shift right 64 by 29: new_hi = hi >> 29, new_lo = (lo >> 29) | (hi << 3)
hi = band(hi, U32_MASK); lo = band(lo, U32_MASK)
local new_hi = rshift(hi, 29)
local new_lo = bor(rshift(lo, 29), lshift(hi, 3))
return band(new_hi, U32_MASK), band(new_lo, U32_MASK)
end
local function rshift64_32(hi, lo)
-- Shift right 64 by 32: new_hi = 0, new_lo = hi
return 0, band(hi, U32_MASK)
end
-- =========================================================================
-- XXH64
-- =========================================================================
local function merge_accumulators(h_h, h_l, a_h, a_l)
local t_h, t_l = mul64(a_h, a_l, P64_2_H, P64_2_L)
t_h, t_l = rol64(t_h, t_l, 31)
t_h, t_l = mul64(t_h, t_l, P64_1_H, P64_1_L)
h_h = bxor(h_h, t_h); h_l = bxor(h_l, t_l)
h_h, h_l = mul64(h_h, h_l, P64_1_H, P64_1_L)
return add64(h_h, h_l, P64_4_H, P64_4_L)
end
local function XXH64_small(str, seed)
-- Specialized fast path for len <= 16 (avoids extra branching/loops)
local len = table.getn(str)
local h_hi, h_lo = 0, band(seed or 0, U32_MASK)
-- h = seed + P5
h_hi, h_lo = add64(h_hi, h_lo, P64_5_H, P64_5_L)
-- h += len
h_hi, h_lo = add64(h_hi, h_lo, 0, len)
local index = 1
if len >= 8 then
local ll = read_u32_le(str, index)
local lh = read_u32_le(str, index + 4)
-- h ^= (lane * P2).rotl(31) * P1
local t_h, t_l = mul64(lh, ll, P64_2_H, P64_2_L)
t_h, t_l = rol64(t_h, t_l, 31)
t_h, t_l = mul64(t_h, t_l, P64_1_H, P64_1_L)
h_hi = bxor(h_hi, t_h); h_lo = bxor(h_lo, t_l)
h_hi, h_lo = rol64(h_hi, h_lo, 27)
h_hi, h_lo = mul64(h_hi, h_lo, P64_1_H, P64_1_L)
h_hi, h_lo = add64(h_hi, h_lo, P64_4_H, P64_4_L)
index = index + 8
len = len - 8
end
if len >= 4 then
local v32 = read_u32_le(str, index)
local m_h, m_l = mul_u32_const64(v32, P64_1_H, P64_1_L)
h_hi = bxor(h_hi, m_h); h_lo = bxor(h_lo, m_l)
h_hi, h_lo = rol64(h_hi, h_lo, 23)
h_hi, h_lo = mul64(h_hi, h_lo, P64_2_H, P64_2_L)
h_hi, h_lo = add64(h_hi, h_lo, P64_3_H, P64_3_L)
index = index + 4
len = len - 4
end
while len > 0 do
local b = sbyte(str, index)
local m_h, m_l = mul_u32_const64(b, P64_5_H, P64_5_L)
h_hi = bxor(h_hi, m_h); h_lo = bxor(h_lo, m_l)
h_hi, h_lo = rol64(h_hi, h_lo, 11)
h_hi, h_lo = mul64(h_hi, h_lo, P64_1_H, P64_1_L)
index = index + 1
len = len - 1
end
-- Avalanche with specialized shifts
local s1_h, s1_l = rshift64_33(h_hi, h_lo)
h_hi = bxor(h_hi, s1_h); h_lo = bxor(h_lo, s1_l)
h_hi, h_lo = mul64(h_hi, h_lo, P64_2_H, P64_2_L)
local s2_h, s2_l = rshift64_29(h_hi, h_lo)
h_hi = bxor(h_hi, s2_h); h_lo = bxor(h_lo, s2_l)
h_hi, h_lo = mul64(h_hi, h_lo, P64_3_H, P64_3_L)
local s3_h, s3_l = rshift64_32(h_hi, h_lo)
h_hi = bxor(h_hi, s3_h); h_lo = bxor(h_lo, s3_l)
return string.format("%08X%08X", h_hi, h_lo)
end
local function XXH64(str, seed)
local len = table.getn(str)
if len <= 16 then
return XXH64_small(str, seed)
end
local seed_hi, seed_lo = 0, band(seed or 0, U32_MASK)
local h_hi, h_lo
local index = 1
if len >= 32 then
local acc1_h, acc1_l = add64(seed_hi, seed_lo, P64_1_H, P64_1_L)
acc1_h, acc1_l = add64(acc1_h, acc1_l, P64_2_H, P64_2_L)
local acc2_h, acc2_l = add64(seed_hi, seed_lo, P64_2_H, P64_2_L)
local acc3_h, acc3_l = seed_hi, seed_lo
local acc4_h, acc4_l = sub64(seed_hi, seed_lo, P64_1_H, P64_1_L)
local limit = len - 31
while index <= limit do
-- Inline read_u64_le
local l1l = read_u32_le(str, index)
local l1h = read_u32_le(str, index + 4)
local l2l = read_u32_le(str, index + 8)
local l2h = read_u32_le(str, index + 12)
local l3l = read_u32_le(str, index + 16)
local l3h = read_u32_le(str, index + 20)
local l4l = read_u32_le(str, index + 24)
local l4h = read_u32_le(str, index + 28)
do
local t_h, t_l = mul64(l1h, l1l, P64_2_H, P64_2_L)
acc1_h, acc1_l = add64(acc1_h, acc1_l, t_h, t_l)
acc1_h, acc1_l = rol64(acc1_h, acc1_l, 31)
acc1_h, acc1_l = mul64(acc1_h, acc1_l, P64_1_H, P64_1_L)
end
do
local t_h, t_l = mul64(l2h, l2l, P64_2_H, P64_2_L)
acc2_h, acc2_l = add64(acc2_h, acc2_l, t_h, t_l)
acc2_h, acc2_l = rol64(acc2_h, acc2_l, 31)
acc2_h, acc2_l = mul64(acc2_h, acc2_l, P64_1_H, P64_1_L)
end
do
local t_h, t_l = mul64(l3h, l3l, P64_2_H, P64_2_L)
acc3_h, acc3_l = add64(acc3_h, acc3_l, t_h, t_l)
acc3_h, acc3_l = rol64(acc3_h, acc3_l, 31)
acc3_h, acc3_l = mul64(acc3_h, acc3_l, P64_1_H, P64_1_L)
end
do
local t_h, t_l = mul64(l4h, l4l, P64_2_H, P64_2_L)
acc4_h, acc4_l = add64(acc4_h, acc4_l, t_h, t_l)
acc4_h, acc4_l = rol64(acc4_h, acc4_l, 31)
acc4_h, acc4_l = mul64(acc4_h, acc4_l, P64_1_H, P64_1_L)
end
index = index + 32
end
local r1h, r1l = rol64(acc1_h, acc1_l, 1)
local r2h, r2l = rol64(acc2_h, acc2_l, 7)
local r3h, r3l = rol64(acc3_h, acc3_l, 12)
local r4h, r4l = rol64(acc4_h, acc4_l, 18)
h_hi, h_lo = add64(r1h, r1l, r2h, r2l)
h_hi, h_lo = add64(h_hi, h_lo, r3h, r3l)
h_hi, h_lo = add64(h_hi, h_lo, r4h, r4l)
h_hi, h_lo = merge_accumulators(h_hi, h_lo, acc1_h, acc1_l)
h_hi, h_lo = merge_accumulators(h_hi, h_lo, acc2_h, acc2_l)
h_hi, h_lo = merge_accumulators(h_hi, h_lo, acc3_h, acc3_l)
h_hi, h_lo = merge_accumulators(h_hi, h_lo, acc4_h, acc4_l)
else
h_hi, h_lo = add64(seed_hi, seed_lo, P64_5_H, P64_5_L)
end
-- h += len
h_hi, h_lo = add64(h_hi, h_lo, 0, len)
-- 8-byte lanes
local limit8 = len - (index - 1) - 7
while limit8 >= 0 do
local ll = read_u32_le(str, index)
local lh = read_u32_le(str, index + 4)
local t_h, t_l = mul64(lh, ll, P64_2_H, P64_2_L)
t_h, t_l = rol64(t_h, t_l, 31)
t_h, t_l = mul64(t_h, t_l, P64_1_H, P64_1_L)
h_hi = bxor(h_hi, t_h); h_lo = bxor(h_lo, t_l)
h_hi, h_lo = rol64(h_hi, h_lo, 27)
h_hi, h_lo = mul64(h_hi, h_lo, P64_1_H, P64_1_L)
h_hi, h_lo = add64(h_hi, h_lo, P64_4_H, P64_4_L)
index = index + 8
limit8 = limit8 - 8
end
-- 4-byte tail: h ^= (read32 * P1); h = rotl(h, 23) * P2 + P3
if index <= table.getn(str) - 3 then
local v32 = read_u32_le(str, index)
local m_h, m_l = mul_u32_const64(v32, P64_1_H, P64_1_L)
h_hi = bxor(h_hi, m_h); h_lo = bxor(h_lo, m_l)
h_hi, h_lo = rol64(h_hi, h_lo, 23)
h_hi, h_lo = mul64(h_hi, h_lo, P64_2_H, P64_2_L)
h_hi, h_lo = add64(h_hi, h_lo, P64_3_H, P64_3_L)
index = index + 4
end
-- 1-byte tails: for each b, h ^= (b * P5); h = rotl(h, 11) * P1
while index <= table.getn(str) do
local b = sbyte(str, index)
local m_h, m_l = mul_u32_const64(b, P64_5_H, P64_5_L)
h_hi = bxor(h_hi, m_h); h_lo = bxor(h_lo, m_l)
h_hi, h_lo = rol64(h_hi, h_lo, 11)
h_hi, h_lo = mul64(h_hi, h_lo, P64_1_H, P64_1_L)
index = index + 1
end
-- Final mix (avalanche) with specialized shifts
local s1_h, s1_l = rshift64_33(h_hi, h_lo)
h_hi = bxor(h_hi, s1_h); h_lo = bxor(h_lo, s1_l)
h_hi, h_lo = mul64(h_hi, h_lo, P64_2_H, P64_2_L)
local s2_h, s2_l = rshift64_29(h_hi, h_lo)
h_hi = bxor(h_hi, s2_h); h_lo = bxor(h_lo, s2_l)
h_hi, h_lo = mul64(h_hi, h_lo, P64_3_H, P64_3_L)
local s3_h, s3_l = rshift64_32(h_hi, h_lo)
h_hi = bxor(h_hi, s3_h); h_lo = bxor(h_lo, s3_l)
return string.format("%08X%08X", h_hi, h_lo)
end
-- =========================================================================
-- DEBUG/TEST UTILITIES
-- =========================================================================
local function to_hex_bytes(str)
local t = {}
for i = 1, table.getn(str) do
t[table.getn(t) + 1] = string.format("%02X", sbyte(str, i))
end
return table.concat(t, " ")
end
local function parse_hex_bytes(hex)
local out = {}
for byte in string.gmatch(hex, "%x%x") do
out[table.getn(out) + 1] = string.char(tonumber(byte, 16))
end
return table.concat(out)
end
local function printable_echo(str)
local step1 = string.gsub(str, "\\", "\\\\")
local step2 = string.gsub(step1, "\0", "\\0")
local step3 = string.gsub(step2, "([\001-\009\011\012\014-\031\127])", function(c)
return string.format("\\x%02X", sbyte(c))
end)
return step3
end
-- =========================================================================
-- SELF-TESTING FUNCTION
-- =========================================================================
local function RunSelfTests(opts)
opts = opts or {}
local hexAlways = not not opts.hexDumpAlways
local which = opts.which or "all"
-- Expectations aligned with Python xxhash and exact bytes:
-- "" -> XXH32 02CC5D05, XXH64 EF46DB3751D8E999
-- 00 -> XXH32 CF65B03E, XXH64 E934A84ADB052768
-- 5C 30 ("\\0") -> XXH32 6257410B, XXH64 5263B0A7F5A1FD64
-- 61 62 63 -> XXH32 32D153FF, XXH64 44BC2CF5AD770999
-- empty seed 0x9E3779B1 -> XXH32 36B78AE7, XXH64 AC75FDA2929B17EF
-- 5C30 61 5C30 62 5C30 63 5C30 -> XXH32 737C5242, XXH64 43AB68FB8CD6407D
-- "Skulltrail" seed 2025 -> XXH32 4A31242C, XXH64 A56F88A6999B63F5
local tests = {
lua = {
{ str = "", seed = 0, exp32 = 0x02CC5D05, exp64 = "EF46DB3751D8E999", label = "empty" },
{ str = "\0", seed = 0, exp32 = 0xCF65B03E, exp64 = "E934A84ADB052768", label = "single NUL 00" },
{ str = "\0a\0", seed = 0, exp32 = false, exp64 = false, label = "00 61 00 (info)" },
{ str = "\0a\0b\0c\0", seed = 0, exp32 = false, exp64 = false, label = "00 61 00 62 00 63 00 (info)" },
{ str = "\0t\0e\0s\0t\0", seed = 0, exp32 = false, exp64 = false, label = "00 74 00 65 00 73 00 74 00 (info)" },
{ str = "", seed = 0x9E3779B1, exp32 = 0x36B78AE7, exp64 = "AC75FDA2929B17EF", label = "empty, seed" },
{ str = "Skulltrail", seed = 2025, exp32 = 0x4A31242C, exp64 = "A56F88A6999B63F5", label = "string+seed" },
},
ascii = {
{ str = "\\0", seed = 0, exp32 = 0x6257410B, exp64 = "5263B0A7F5A1FD64", label = "ASCII \\0 (5C 30)" },
{ str = "\\0a\\0b\\0c\\0",seed = 0, exp32 = 0x737C5242, exp64 = "43AB68FB8CD6407D", label = "ASCII \\0a\\0b\\0c\\0" },
},
hex = {
{ hex = "61 62 63", seed = 0, exp32 = 0x32D153FF, exp64 = "44BC2CF5AD770999", label = "HEX abc" },
{ hex = "00", seed = 0, exp32 = 0xCF65B03E, exp64 = "E934A84ADB052768", label = "HEX 00" },
{ hex = "5C 30", seed = 0, exp32 = 0x6257410B, exp64 = "5263B0A7F5A1FD64", label = "HEX 5C 30 (\"\\0\")" },
{ hex = "5C 30 61 5C 30 62 5C 30 63 5C 30", seed = 0, exp32 = 0x737C5242, exp64 = "43AB68FB8CD6407D", label = "HEX \\0a\\0b\\0c\\0" },
},
}
local selection = {}
if which == "all" or which == "lua" then for _, t in ipairs(tests.lua) do table.insert(selection, { kind = "lua", data = t }) end end
if which == "all" or which == "ascii" then for _, t in ipairs(tests.ascii) do table.insert(selection, { kind = "ascii", data = t }) end end
if which == "all" or which == "hex" then for _, t in ipairs(tests.hex) do table.insert(selection, { kind = "hex", data = t }) end end
local success = true
print("--- Running XXH_Lua_Lib Self-Tests ---")
for _, item in ipairs(selection) do
local kind = item.kind
local t = item.data
local src, shown
if kind == "lua" then
src = t.str
shown = printable_echo(t.str)
elseif kind == "ascii" then
src = t.str
shown = t.str
elseif kind == "hex" then
src = parse_hex_bytes(t.hex)
shown = t.hex
end
local got32 = XXH32(src, t.seed)
local got64 = XXH64(src, t.seed)
if t.exp32 ~= false then
local ok32 = (got32 == t.exp32)
local status32 = ok32 and "|cff00ff00PASS|r" or "|cffff0000FAIL|r"
print(string.format("XXH Test: %s - XXH32 - Input: '%s', Seed: 0x%x", status32, shown, t.seed))
if not ok32 then
print(string.format(" - Expected: 0x%08X", t.exp32))
print(string.format(" - Got: 0x%08X", got32))
success = false
end
if hexAlways or not ok32 then
print(string.format(" - Hex Dump: %s\t\t%s", to_hex_bytes(src), printable_echo(src)))
end
else
print(string.format("XXH Test: INFO - XXH32 - Input: '%s', Seed: 0x%x -> 0x%08X", shown, t.seed, got32))
if hexAlways then print(string.format(" - Hex Dump: %s\t\t%s", to_hex_bytes(src), printable_echo(src))) end
end
if t.exp64 ~= false then
local ok64 = (string.upper(got64) == string.upper(t.exp64))
local status64 = ok64 and "|cff00ff00PASS|r" or "|cffff0000FAIL|r"
print(string.format("XXH Test: %s - XXH64 - Input: '%s', Seed: 0x%x", status64, shown, t.seed))
if not ok64 then
print(string.format(" - Expected: %s", t.exp64))
print(string.format(" - Got: %s", got64))
success = false
end
if hexAlways or not ok64 then
print(string.format(" - Hex Dump: %s\t\t%s", to_hex_bytes(src), printable_echo(src)))
end
else
print(string.format("XXH Test: INFO - XXH64 - Input: '%s', Seed: 0x%x -> %s", shown, t.seed, got64))
if hexAlways then print(string.format(" - Hex Dump: %s\t\t%s", to_hex_bytes(src), printable_echo(src))) end
end
end
if success then
print("|cff00ff00All tests passed successfully!|r")
else
print("|cffff0000One or more tests failed!|r")
end
print("--------------------------------------")
return success
end
-- =========================================================================
-- MODULE EXPORT
-- =========================================================================
local XXH_Lua_Lib = {
XXH32 = XXH32,
XXH64 = XXH64,
RunSelfTests = RunSelfTests,
}
_G.XXH_Lua_Lib = XXH_Lua_Lib
return XXH_Lua_Lib
-458
View File
@@ -1,458 +0,0 @@
Ace3 Release - Revision r1294 (October 22nd, 2022)
--------------------------------------------------
- Ace3 should be fully supported on WoW 10.0
- AceGUI-3.0: TabGroup: Fixes for WoW 10.0 template changes
- AceConfigDialog-3.0: New Settings panel integration for WoW 10.0
Ace3 Release - Revision r1281 (September 21st, 2022)
--------------------------------------------------
- AceGUI-3.0: Preliminary support for WoW 10.0
- AceGUI-3.0: MultiLineEditBox: Fixed an issue with mouse interactivity on re-cycled editboxes in certain circumstances
- AceGUI-3.0: Label: Use font objects to allow font fallback mechanics to be used
Ace3 Release - Revision r1259 (February 23rd, 2022)
--------------------------------------------------
- AceGUI-3.0: Dropdown: Fix double click sound on toggling the dropdown (Issue #575)
- AceConfigDialog-3.0: Fix width number multiplier on multiselects (Issue #584)
Ace3 Release - Revision r1252 (May 17th, 2021)
--------------------------------------------------
- AceConfigDialog-3.0: Increased the frame level of dialogs to allow other addons to draw below them
- AceConfigDialog-3.0: The validation/confirmation popup is now opaque and not click-through, to avoid accidentally activating options below it
- AceHook-3.0: Allow UnhookAll to be used without embedding (Fixes #558)
Ace3 Release - Revision r1241 (October 13th, 2020)
--------------------------------------------------
- AceAddon-3.0: Suppress more Blizzard addon load events from activating Ace3 addons "too early", causing loading issues.
- AceGUI-3.0: Updated for Backdrop changes in WoW 9.0
- AceGUI-3.0: Re-structured widget releasing to avoid recursive release in some circumstances
- AceGUI-3.0: Label: Anchors are being refreshed when the font is changed (Ticket #540)
- AceGUI-3.0: Dropdown: Initialize the widget with an empty list so that AddItem can be used on a fresh dropdown (Ticket #542)
Ace3 Release - Revision r1227 (August 12th, 2019)
-------------------------------------------------
- AceConfigDialog-3.0: Fixed an issue with a missing template on WoW Classic (Ticket #517)
Ace3 Release - Revision r1224 (August 1st, 2019)
------------------------------------------------
- AceConfigDialog-3.0: Replace use of StaticPopup with a custom frame to minimize taint
- AceGUI-3.0: Ensure the OnLeave callback on various widgets still fires when its being released while visible (Ticket #505)
- AceGUI-3.0: Various fixes for anchoring problems in WoW 8.2 (Ticket #512, and other reports)
Ace3 Release - Revision r1214 (June 26th, 2019)
-----------------------------------------------
- AceConfigDialog-3.0: Exposed "select" type sorting control through a new "sorting" config table member
- AceConfigDialog-3.0: Clear existing anchors on the GameTooltip before re-anchoring it for 8.2 compatibility
- AceConfigDialog-3.0: Improved options table sorting algorithm to produce a stable result in certain edge cases (Ticket #501)
- AceConfigRegistry-3.0: Added missing custom controls entries for all types added in the last release (Ticket #494)
- AceGUI-3.0: ColorPicker: Removed usage of Show/HideUIPanel for WoW 8.2 compatibiliy
- AceGUI-3.0: DropDown: Improved dropdown sorting algorithm to support tables with mixed string and numeric keys
Ace3 Release - Revision r1200 (January 24th, 2019)
--------------------------------------------------
- Cleanup for WoW 8.0 improvements
- AceGUI-3.0: Worked around various quirks in the WoW 8.0/8.1 API
- AceGUI-3.0: ColorPicker: Store references to the background/checkers textures (Ticket #473)
- AceConfigDialog-3.0: Allow custom controls for almost all option types (Ticket #475)
Ace3 Release - Revision r1182 (July 17th, 2018)
-----------------------------------------------
- AceComm-3.0: Support numeric targets for custom channels (Ticket #419)
- AceComm-3.0/ChatThrottleLib: Updated for WoW 8.0 API changes
- AceConfig-3.0: Allow number values for the "width" parameter, which acts as a multiplier of the default width
- AceConfigDialog-3.0: Enable iconCoords for the main level of a tree group (Ticket #417)
- AceGUI-3.0: Implement a Table Layout (#442)
- AceGUI-3.0: EditBox: Only try to handle dragging if a valid object is being dragged into the text box
- AceGUI-3.0: Various fixes and work-arounds for WoW 8.0 changes
Ace3 Release - Revision r1166 (August 29th, 2017)
-------------------------------------------------
- Updated any use of PlaySound to the new numeric constants (Fix for WoW 7.3)
- AceConfigDialog-3.0: implement fallback validation feedback in a StaticPopup (Ticket #2)
Ace3 Release - Revision r1158 (March 28th, 2017)
------------------------------------------------
- AceGUI-3.0: Fire OnShow events from Frame and Windows containers (Ticket #396)
- AceGUI-3.0: Add SetJustifyV/H API to the Label/InteractiveLabel widgets (Ticket #397)
Ace3 Release - Revision r1151 (July 18th, 2016)
-----------------------------------------------
- AceConfig-3.0: Allow specifying images using the numeric fileID (Ticket #389)
- AceGUI-3.0: Use SetColorTexture in WoW 7.0
- AceGUI-3.0: Expose the HighlightText API for EditBox and MultiLineEditBox Widgets (Ticket #378)
- AceGUI-3.0: Keybinding: Support MouseWheel Up/Down bindings (Ticket #372)
- AceGUI-3.0: TreeGroup: Refresh the tree in an OnUpdate once after Acquire, not only after creation (Fixes missing tree in WoW 7.0)
- AceSerializer-3.0: Create consistent tokens for infinity, independent of the clients platform
Ace3 Release - Revision r1134 (June 23rd, 2015)
-----------------------------------------------
- AceGUI-3.0: TreeGroup: Prevent Word Wrap in tree elements
Ace3 Release - Revision r1128 (February 24th, 2015)
---------------------------------------------------
- AceGUI-3.0: Fixed an error in GameTooltip handling causing wrong formatting in some cases
Ace3 Release - Revision r1122 (October 14th, 2014)
--------------------------------------------------
- AceDB-3.0: Now using the GetCurrentRegion() API to determine region-based profile keys (fix for WoW 6.0)
- AceComm-3.0: Update ChatThrottleLib to v23
- AceConfigDialog-3.0: Show a more meaningful title on Blizzard Options Groups (Ticket #353)
- AceGUI-3.0: ColorPicker: Frame Level is automatically increased to ensure the color picker frame is above the option panel
- AceGUI-3.0: DropDown: Properly disable all clickable areas when the dropdown is disabled (Ticket #360)
- AceHook-3.0: Always use HookScript when hooking scripts in a secure fashion (Ticket #338)
- AceTimer-3.0: New timer implementation based on C_Timer.After
Ace3 Release - Revision r1109 (February 19th, 2014)
---------------------------------------------------
- AceComm-3.0: Ambiguate addon comm messages to restore behavior to be identical to pre-5.4.7
- AceConfigRegistry-3.0: Added an option to skip options table validation on registering
Ace3 Release - Revision r1104 (October 31st, 2013)
--------------------------------------------------
- AceGUI-3.0: Flow Layout: Added a safeguard to prevent an infinite loop in the layout engine
- AceGUI-3.0: DropDown: Adjust its style slightly to closer resemble the Blizzard DropDown Widget
- AceGUI-3.0: DropDown: API enhancements to specify the width of the pullout and be notified when its opened
Ace3 Release - Revision r1098 (September 13th, 2013)
----------------------------------------------------
- AceDB-3.0: Switch characters to the default profile if their active profile is deleted (Ticket #324)
- AceConfigDialog-3.0: Try to prevent static popup taint (Ticket #322)
- AceGUI-3.0: Button: Add a new "Auto Width" option (Ticket #310)
- AceGUI-3.0: DropDown: Make the entire DropDown widget clickable (Ticket #339)
- AceGUI-3.0: EditBox: Allow dragging macros to the editbox (which will then contain the macros name) (Ticket #337)
- AceGUI-3.0: Slider: Add a workaround for the broken slider steps in WoW 5.4 (Ticket #346)
- AceGUI-3.0: TreeGroup: Fix an issue introduced by 5.4 broken scrollbars (Ticket #345)
- AceHook-3.0: Allow hooking of AnimationGroup scripts (Ticket #314)
Ace3 Release - Revision r1086 (May 21st, 2013)
----------------------------------------------
- AceAddon-3.0: Improved behavior when loading modules during game startup, ensures proper loading order
Ace3 Release - Revision r1083 (March 4th, 2013)
-----------------------------------------------
- AceTimer-3.0: Fixed an issue that caused the parameter list passed to the callback to be cut off at nil values
- AceGUI-3.0: InlineGroup: The title attribute is properly reset for recycled objects
Ace3 Release - Revision r1078 (February 10th, 2013)
---------------------------------------------------
- AceTimer-3.0: Re-write based on AnimationTimers
- AceHook-3.0: Improved checks/error messages when trying to hook a script on a "nil" frame
- AceDBOptions-3.0: Added Italian locale
- AceGUI-3.0: BlizOptionsGroup: Fixed the "default" button callback
- AceGUI-3.0: Colorpicker: The colorpicker is now clamped to the screen
Ace3 Release - Revision r1061 (August 27th, 2012)
-------------------------------------------------
- AceConfigDialog-3.0: Try to avoid potential taints in static popup dialogs
- AceConfigDialog-3.0: Sort multiselects with "radio" style
- AceGUI-3.0: Support for WoW 5.0
- AceGUI-3.0: MultiLineEditBox: Support shift-click'ing items/spells/etc. into the editbox
- AceGUI-3.0: Label: Fix text alignment (Ticket #301)
- AceGUI-3.0: Checkbox: Description text on a disable checkbox should look disabled (Ticket #304)
- AceGUI-3.0: Keybinding: Ensure the Keybinding popup is on the top level (Ticket #305)
Ace3 Release - Revision r1041 (November 29th, 2011)
---------------------------------------------------
- AceDB-3.0: Added locale and factionrealmregion profile keys
- AceSerializer-3.0: Removed support for NaN, as WoW 4.3 does no longer allow it.
- AceGUI-3.0: Frame: Add :EnableResize (Ticket #214)
Ace3 Release - Revision r1032 (June 29th, 2011)
-----------------------------------------------
- AceTab-3.0: Improvements to Match handling (Ticket #255 and #256)
- AceGUI-3.0: DropDown layout fix with hidden labels (Ticket #234)
Ace3 Release - Revision r1025 (April 27th, 2011)
------------------------------------------------
- AceComm-3.0: Updated for 4.1 changes - now handles RegisterAddonMessagePrefix internally for you.
- AceGUI-3.0: TabGroup: Fixed width of tabs in 4.1(Ticket #243)
Ace3 Release - Revision r1009 (February 9th, 2011)
--------------------------------------------------
- AceLocale-3.0: Fix erronous assumption that the default locale is always the first to be registered for the :NewLocale() "silent" flag. The flag must now be set on the FIRST locale to be registered.
- AceLocale-3.0: The :NewLocale() "silent" flag may now be set to the string "raw", meaning nils are returned for unknown translations.
- AceGUI-3.0: Fix the disabled state of Icon widgets
- AceGUI-3.0: The header of the Frame widget now dynamically changes size to fit the text (Ticket #171)
- AceGUI-3.0: Its now possible to define a custom order the elements in a dropdown widget
- AceGUI-3.0: Improved widget focus behaviour across the board (Ticket #192, #193)
- AceGUI-3.0: Fixed a bug that made it impossible to block the tree widget from being user resizable (Ticket #163)
- AceGUI-3.0: Fixed a bug that caused TreeGroups to become unresponsive under certain conditions (Ticket #189, #202)
- AceGUI-3.0: Enhanced the DropDown widget to allow it to be reused more easily.
- AceConfigDialog-3.0: Select Groups now have the proper order in the dropdown (Ticket #184)
- AceConfigDialog-3.0: Implemented "radio" style select boxes (Ticket #149)
Ace3 Release - Revision r981 (October 27th, 2010)
-------------------------------------------------
- AceAddon-3.0: Fixed a library upgrading issue
- AceAddon-3.0: Modules are now enabled in loading order
- AceGUI-3.0: Keybinding: The widget will no longer steal keybindings even when inactive (Ticket #169)
- AceGUI-3.0: EditBox: Fixed spell drag'n'drop
Ace3 Release - Revision r971 (October 12th, 2010)
-------------------------------------------------
- Small fixes and adjustments for the 4.0 Content Patch.
- AceGUI-3.0: ScrollFrame: Allow for a small margin of error when determining if the scroll bar should be shown.
- AceGUI-3.0: Added new widget APIs: GetText for EditBox and DisableButton for MultiLineEditBox
Ace3 Release - Revision r960 (July 20th, 2010)
----------------------------------------------
- AceGUI-3.0: Label: Reset Image Size and TexCoords on Acquire (Ticket #110)
- AceGUI-3.0: CheckBox: Re-apply the disabled state after setting a value, so the visuals are correct in either case. (Ticket #107)
- AceGUI-3.0: Icon: Fix the vertical size. It'll now properly scale with the image size, and not be fixed to about 110px. (Ticket #104)
- AceGUI-3.0: External Containers (Frame, Window) should always start in a visible state. (Ticket #121)
- AceGUI-3.0: Added Blizzard sounds to widgets (Ticket #120)
- AceGUI-3.0: CheckBox: check for self.desc:GetText() being nil as well as "" to prevent setting the wrong height on the checkbox causing bouncing checkboxes.
- AceGUI-3.0: Rewrite of the MultiLineEditBox (Ticket #68)
- AceGUI-3.0: CheckBox: Fix alignment of the text in OnMouseDown when an image is set. (Ticket #142)
- AceGUI-3.0: Add SetMaxLetters APIs to EB and MLEB (Ticket #135)
- AceGUI-3.0: Frame: Add events for OnEnter/OnLeave of the statusbar (Ticket #139)
- AceGUI-3.0: Major cleanups and refactoring in nearly all widgets and containers.
- AceConfigDialog-3.0: Always obey the min/max values on range-type widgets (Ticket #114)
- AceConfigDialog-3.0: Pass iconCoords set on groups in the options table to the tree widget (Ticket #111)
- AceConfigDialog-3.0: Implement "softMin" and "softMax", allowing for a UI-specific minimum/maximum for range controls, while allowing manual input of values in the old min/max range. (Ticket #123)
- AceConfigDialog-3.0: Don't close frames in CloseAll that are being opened after the CloseAll event was dispatched. (Ticket #132).
- AceSerializer-3.0: Fix encoding & decoding of \030. (Ticket #115)
- AceDB-3.0: Remove empty sections on logout, keeping the SV clean of more useless informations.
- AceDBOptions-3.0.lua: Fix a string typo (Ticket #141)
Ace3 Release - Revision r907 (December 16th, 2009)
---------------------------------------------------
- AceGUI-3.0: Frame: Properly save the width in the status table.
- AceConfigCmd-3.0: Properly handle help output of inline groups with a different handler. (Ticket #101)
- AceConfigDialog-3.0: Don't bail out and error when a dialogControl was invalid, instead show the error and fallback to the default control for that type.
- AceConfigDialog-3.0: Fix a hickup with the OnUpdate script not getting upgraded properly in some situations.
Ace3 Release - Revision r900 (December 8th, 2009)
--------------------------------------------------
- AceGUI-3.0: Alot of visual fixes regarding margins and general widget styles.
- AceGUI-3.0: Ability to accept links for EditBox Widget (Ticket #21)
- AceGUI-3.0: ScrollFrame: Hide the scrollbar when there is no overflowing content, and allow the Layout functions to use that space for widgets.
- AceGUI-3.0: DropDown: Added a GetValue() API to the Widget (Ticket #69)
- AceGUI-3.0: Button: Pass the arguments of the OnClick handler to the OnClick callback (Ticket #57)
- AceGUI-3.0: add a Window container, basically a plain window with close button
- AceGUI-3.0: Add support for inline descriptions to the checkbox widget.
- AceGUI-3.0: Added an API to the Window container to disable the user-resizing of the same. (Ticket #80)
- AceGUI-3.0: TreeGroup: Allow iconCoords to be passed for the tree elements. (Ticket #59)
- AceGUI-3.0: Slider: Add a more visible backdrop/border around the manual input area (Ticket #98, #46)
- AceGUI-3.0: Allow displaying a image in front of the checkbox label. (Ticket #82)
- AceConfig-3.0: Added an experimental "descStyle" member to all option table nodes that allows you to control the way the description is presented.
Supported values are "tooltip" for the old behaviour, and "inline" for a inline display of the description, pending support in AceGUI-3.0 widgets.
- AceConfigCmd-3.0: Properly parse functions and methods supplied for the "hidden" option table member. (Ticket #96)
- AceConfigDialog-3.0: Fix the unpacking of the basepath arguments when internally calling :Open (Ticket #90)
- AceConfigDialog-3.0: Properly refresh BlizOptions Windows which are registered with a path on NotifyChange. (Ticket #93)
- AceConfigDialog-3.0: Allow image/imageCoords on toogle elements (Note that the width/height of the image on the toggle cannot be changed) (Ticket #82)
- AceConfigDialog-3.0: Pass the groups "name" tag to DropDownGroups as the title. (Ticket #79)
- AceDB-3.0: Remove the metatable from the DB before removing defaults, so we don't accidentally invoke it in the process. (Ticket #66)
- AceDB-3.0: Don't save the profileKeys for namespaces, since we use the profile of the parent DB anyway. This will cut down on SV complexity when using alot of namespaces.
- AceDB-3.0: Don't fire the OnProfileReset callback when copying a profile.
- AceDBOptions-3.0: Show the current profile on the dialog. (Ticket #56)
- AceComm-3.0: Add callbacks for message chunks going out the wire (via CTL). Useful for displaying progress for very large messages.
- AceConsole-3.0: Add :Printf() so you don't have to do Print(format())
Ace3 Beta - Revision 820 (August 7th, 2009)
--------------------------------------------
- AceComm-3.0: Updated ChatThrottleLib to v21
- AceGUI-3.0: Fixed a glitch in the TabGroup code that caused tabs to be unresponsive under rare conditions. (Ticket #38)
- AceGUI-3.0: Consistent "disabled" behaviour of all widgets. (Ticket #47)
- AceGUI-3.0: Changed the way widgets are handled on release to avoid a crash in the game client. (Ticket #49)
- AceGUI-3.0: Fixed a glitch in the button graphics. (Ticket #58)
- AceGUI-3.0: Localized the "Close" Text on the Frame widget.
Ace3 Beta - Revision 803 (April 14th, 2009)
--------------------------------------------
- AceConfig-3.0: Allow spaces in the keys of config tables. Spaces will be changed on the fly to underscores in AceConfigCmd-3.0 - there is no collision check in place, yet.
- AceConfig-3.0: Support a "fontSize" attribute to the description type. Possible values are "small" (default), "medium" and "large".
- AceConfigDialog-3.0: Fixed an error that would occur when calling InterfaceOptionsFrame_OpenToCategory from within an event handler in a Blizzard Options integrated frame. (Ticket #33)
- AceConfigDialog-3.0: The "execute" type does now recognize the "image" attributes, and will display a clickable icon instead of the button when an image is supplied. (Ticket #35)
- AceConfigDialog-3.0: Pass icons defined in the option table to the TreeGroup widget (Ticket #20)
- AceConfigDialog-3.0: Fixed a bug that caused an empty group widget to be drawn if all groups were hidden.
- AceConfigCmd-3.0: Improved the behaviour of select and multiselect elements. (Ticket #26)
- AceDB-3.0: Add a GetNamespace function to the DB Objects which returns an existing namespace from the DB object.
- AceGUI-3.0 Slider Widget: Properly show percentage values as min/max if isPercent is true. (Ticket #32)
- AceGUI-3.0: Fixed an error in the TreeGroup Widget that caused execution to stop if no name was provided.
- AceGUI-3.0: Fixed the behaviour of the MultiLineEditbox Widget (Accept button not clickable). (Ticket #28)
- AceGUI-3.0: TabGroup: Set a maximum width for tabs based on the size of the widget. (Ticket #34)
- AceGUI-3.0: Added a new InteractiveLabel with OnEnter/OnLeave/OnClick callbacks and a highlight texture
- AceGUI-3.0: Add SetFont and SetFontObject functions to the Label widget (and the new InteractiveLabel)
- AceGUI-3.0: Support icons in the TreeGroup display. (Ticket #20)
- AceGUI-3.0: Added a new :SetRelativeWidth Widget-API that allows you to set the width of widgets relative to their container.
- AceGUI-3.0: Alot of fixes, tweaks and consistency changes.
Ace3 Beta - Revision 741 (Feb 15th, 2009)
--------------------------------------------
- AceDBOptions-3.0: Disable the "Copy From" and "Delete" dropdowns if there are no profiles to choose from. (Ticket #19)
- AceGUI-3.0: Improve TabGroup visual style - only stretch them to the full width if they would use more then 75% of the exisiting space.
- AceGUI-3.0: Added a third optional argument to <container>:AddChild() to specify the position for the new widget. (Ticket #22)
- AceConfigCmd-3.0: Improve help output when viewing groups.
- AceConfigDialog-3.0: Refresh the Options Panel after a confirmation is canceled to reset the value to its previous value. (Ticket #23)
- AceDB-3.0: Fix a data inconsistency when using false as a table key. (Ticket #25)
Ace3 Beta - Revision 722 (Jan 4th, 2009)
--------------------------------------------
- AceHook-3.0: Fix :SecureHookScript to not fail on previously empty scripts since frame:HookScript does nothing at all in that case. (Ticket #16)
- AceLocale-3.0: Implement 'silent' option for :NewLocale to disable the warnings on unknown entrys (Ticket #18)
- AceTimer-3.0: Implement :TimeLeft(handle) function (Ticket #10)
- AceGUI-3.0: Fix TabGroup tab resizing to be consistent
- AceGUI-3.0: Fixed EditBox alignment when the label is disabled (Ticket #13)
- AceDB-3.0: Implement OnProfileShutdown callback (Ticket #7)
- AceDBOptions-3.0: Updated esES and ruRU locale
Ace3 Beta - Revision 706 (Oct 18th, 2008)
--------------------------------------------
- First Beta release after WoWAce move
- Removed WoW 2.4.x compat layer
- AceGUI-3.0: Fix disabling of the Multiline Editbox
- AceGUI-3.0: Improvements to the Keybinding Widget
Ace3 Beta - Revision 81437 (Sept 6th, 2008)
--------------------------------------------
- AceConfigDialog-3.0: the confirm callback will now receive the new value that is being set (same signature as the validate callback)
- AceConfigDialog-3.0: :Close and :CloseAll are now safe to call from within callbacks.
- AceGUI-3.0: Added new methods to the widget base table, see ACE-205 for full reference
- AceGUI-3.0: Various fixes to Widgets and recycling process
- Now compatible with WoW 3.0 (compat layer is to be removed upon 3.0 release)
Ace3 Beta - Revision 76325 (June 9th, 2008)
--------------------------------------------
- AceGUI-3.0: Finish Multiselect support for the Dropdown widget (nargiddley)
- AceGUI-3.0: Re-write TabGroup layouting (nargiddley)
- AceGUI-3.0: TreeGroup: Add :EnableButtonTooltips(enable) to make the default tooltips on the tree optional, enabled by default. (nargiddley)
- AceGUI-3.0: TabGroup: Add OnTabEnter and OnTabLeave Callbacks (nargiddley)
- AceConfigDialog-3.0: Add :SelectGroup(appName, ...) - Selects the group given by the path specified then refreshes open windows. (nargiddley)
- AceConfigDialog-3.0: :Open now accepts an optional path, when given will open the window with only the given group and its children visible (nargiddley)
- AceConfigDialog-3.0: :AddToBlizOptions now accepts an optional path, this will add the config page to display the specified group and its children only. (nargiddley)
- AceConfigDialog-3.0: ACE-189: allow multiselect to be shown as a dropdown by setting dialogControl = "Dropdown" (nargiddley)
- AceConfigDialog-3.0: Add Custom tooltips to the TreeGroup and TabGroup, shows both name and desc for the group. (nargiddley)
- AceConfigCmd-3.0: ACE-195: Remove unneeded references to .confirm, will no longer error when .confirm is a boolean (nargiddley)
- AceAddon-3.0: Allow for an optional first argument to NewAddon to be a table to be used as the base for the addon. (ammo)
Ace3 Beta - Revision 74633 (May 19th, 2008)
--------------------------------------------
- AceTimer-3.0: ACE-173: don't error on nil handle for CancelTimer(), just bail out early. (ammo)
- AceGUI-3.0: ACE-161, ACE-180, ACE-181: New and improved DropDown widget (originally coded by Borlox) (nargiddley,nevcairiel)
- AceGUI-3.0: AceGUI will call OnWidthSet and OnHeightSet as frames resize (nargiddley)
- AceGUI-3.0: TabGroup: Use OptionsFrameTabButtonTemplate for tabs (nargiddley)
- AceGUI-3.0: TabGroup: Tabs now span multiple lines when there are too many to fit in the width of the frame (nargiddley)
- AceGUI-3.0: TreeGroup: Tree is now sizable by dragging, orig patch by yssaril (nargiddley)
- AceGUI-3.0: Flow layout will now reduce widgets width to fit rather than leaving them sticking out the side of container widgets (nargiddley)
- AceGUI-3.0: Dropdowns will no longer be left open in the background when the frame is clicked or other widgets are activated (nargiddley)
- AceGUI-3.0: ACE-159: Rename Release to OnRelease and Acquire to OnAcquire for widgets. (nargiddley)
- AceGUI-3.0: ACE-171: add IsVisible and IsShown methods to the widget metatable (nargiddley)
- AceGUI-3.0: ACE-164: add tooltips to tree to show full text of childs that got clipped (ammo)
- AceGUI-3.0: ACE-174: make buttons in AceGUI-3.0 locale independant (ammo)
- AceGUI-3.0: ACE-166: fix treegroup visual bug (ammo)
- AceGUI-3.0: ACE-184: make numeric entry for slider more intuitive (ammo)
- AceConfigCmd-3.0: ACE-172 - ignore description in cmd (ammo)
- AceConsole-3.0: nolonger check for existance of slashcommands, overwrite where needed. Last one wins, this enables AddonLoader to X-LoadOn-Slash and override the slashcommand from AddonLoader slashcommand with an Ace3 one. (Ammo)
Ace3 Beta - Revision 69509 (April 13th, 2008)
---------------------------------------------
- AceComm-3.0: turn off error messages when receiving invalid multi-part messages (its happening on login etc) (nevcairiel)
- AceDBOptions-3.0: shorten info text at top to prevent scrollbars. (nevcairiel)
- AceHook-3.0: ACE-162: fix unhooking of objects that were not actually hooked (nevcairiel)
- AceDB-3.0: fire the DB callbacks after the namespaces changed their profile as well (nevcairiel)
- AceDB-3.0: namespaces can now be individually reset using :ResetProfile() on the namespace directly (nevcairiel)
- AceDB-3.0: added a optional argument to :ResetProfile to not populate the reset to all namespaces (so the main profile can reset individually without reseting all namespaces too) (nevcairiel)
Ace3 Beta - Revision 66329 (March 27th, 2008)
---------------------------------------------
- Overall 2.4 clean ups - removing 2.4 checks and work arounds (nevcairiel)
- AceBucket-3.0: clear the timer reference when unregistering a bucket to prevent a error when unregistering a bucket that was never fired (nevcairiel)
- AceAddon-3.0: Bugfix when enabling/disabling modules from the parents OnEnable after disabling / enabling the parent addon. (ammo)
- AceGUI-3.0: Don't parent the BlizOptionsGroup widget to UIParent and Hide it by default. Fixes stray controls on the screen. (nargiddley)
- AceConfigDialog-3.0: Config windows without a default size won't incorrectly get a default size from a previously open window. (nargiddley)
- AceDBOptions-3.0: added zhCN and zhTW locale (nevcairiel)
Ace3 Beta - Revision 65665 (March 25th, 2008)
---------------------------------------------
- AceGUI-3.0: ACE-139: Changed all Widgets to resemble the Blizzard 2.4 Options Style (nevcairiel)
- AceGUI-3.0: Fixed "List"-Layout not reporting new width to "fill"-mode widgets (mikk)
- AceGUI-3.0: added :SetColor to the Label widget (nevcairiel)
- AceGUI-3.0: ACE-132: ColorPicker: added checkers texture for better alpha channel display, and fixed "white"-texture bug (nevcairiel,nargiddley,ammo)
- AceConfig-3.0: ACE-113: Added uiName, uiType, handler, option, type to the info table (nevcairiel,nargiddley)
- AceConfigDialog-3.0: ACE-139: Adjusted for 2.4 options panels (nevcairiel)
- AceConfigDialog-3.0: Use "width" parameter for the description widget (if present) (nevcairiel)
- AceConfigDialog-3.0: ACE-135: Add support for specifying a rowcount for multiline editboxes (nargiddley)
- AceConfigDialog-3.0: :AddToBlizOptions will return the frame registered so you can use it in InterfaceOptionsFrame_OpenToFrame (nevcairiel)
- AceConfigCmd-3.0: handle "hidden" in help-output (nevcairiel)
- AceHook-3.0: fix unhooking of secure hooks (nevcairiel)
- AceDBOptions-3.0: add optional argument to GetOptionsTable(db[, noDefaultProfiles]) - if set to true will not show the default profiles in the profile selection (nevcairiel)
- AceDBOptions-3.0: added koKR locale (nevcairiel)
- Ace3 Standalone: Removed the "Ace3" Category from the 2.4 options panel (nevcairiel)
Ace3 Beta - Revision 64176 (March 10th, 2008)
---------------------------------------------
- AceGUI-3.0: Improve Alpha handling for the ColorPicker widget, ColorPicker widget closes the ColorPickerFrame before opening to prevent values getting carried over (nargiddley)
- AceGUI-3.0: The Slider widget will only react to the mousewheel after it has been clicked (anywhere including the label) to prevent accidental changes to the value when trying to scroll the container it is in (nargiddley)
- AceGUI-3.0: The TreeGroup widget is scrollable with the mousewheel (nargiddley)
- AceGUI-3.0: ACE-154: Fix frame levels in more cases to prevent widgets ending up behind their containers (nargiddley)
- AceConfigDialog: Color picker obeys hasAlpha on the color type (nargiddley)
- AceConfigDialog-3.0: ACE-155: Make sure that the selected group is type='group' when checking if it exists (nargiddley)
- AceDBOptions-3.0: added frFR locale (nevcairiel)
Ace3 Beta - Revision 63886 (March 8th, 2008)
---------------------------------------------
- AceDBOptions-3.0: new library to provide a Ace3Options table to control the AceDB-3.0 profiles (nevcairiel)
- AceDB-3.0: add "silent" option to DeleteProfile and CopyProfile when we deal with namespaces (nevcairiel)
- AceDB-3.0: implement library upgrade path (nevcairiel)
- AceDB-3.0: ACE-146: fix problem with non-table values overruling ['*']-type defaults (nevcairiel)
- AceConsole-3.0: treat |T|t texture links similar to |H|h|h links. (ammo)
- AceGUI-3.0: Use Blizzard Templates for the EditBox and DropDown widget (nevcairiel)
- AceBucket-3.0: ACE-150: callback is now optional, if not supplied will use the eventname as method name (only possible if one event is supplied, and not a event table) (nevcairiel)
- tests: adjust tests for AceGUI and AceConsole changes (nevcairiel)
Ace3 Beta - Revision 63220 (Feb 29th, 2008)
---------------------------------------------
- AceTimer-3.0: CancelAllTimers() now cancels silent (elkano)
- AceConfigDialog: Add :SetDefaultSize(appName, width, height), sets the size the dialog will open to. Does not effect already open windows. (nargiddley)
- AceConfigDialog: Fix typo in type check for range values (nargiddley)
- AceGUI: ColorPicker widget will correctly fire OnValueChanged for the cancel event of the colorpicker popup. Reset ColorPicker's color on Acquire. (nargiddley)
- AceGUI: Fix Spelling of Aquire -> Acquire for widgets, all custom widgets will need to be updated. A warning will be printed for widgets not upgraded yet. (nargiddley)
- AceConfigCmd-3.0: add simple coloring to slashcommand output. (ammo)
- AceConsole-3.0: add some color to :Print (ammo)
- AceAddon-3.0: set error level on library embedding to point to the :NewAddon call (nevcairiel)
Ace3 Beta - Revision 62182 (Feb 20th, 2008)
---------------------------------------------
- Ace3 StandAlone: Add a page to the Blizzard 2.4 Interface Options with icons to open dialogs for configs registered when installed standalone (nargiddley)
- AceConfigDialog: type = 'description' now uses the fields image and imageCoords instead of icon and iconCoords, add imageWidth and imageHeight (nargiddley)
- AceConfigDialog: Add :AddToBlizzardOptions(appName, name), this will add the specified config to the Blizzard Options pane new in 2.4. This will only be available if running on the 2.4 PTR (nargiddley)
- AceDB: fix GetProfiles() when setting the same profile twice (nevcairiel)
- AceDB: bail out of :SetProfile early when trying to set to the same profile (nevcairiel)
- AceDB: add nil checks to metatable handling (nevcairiel)
- AceDB: clear tables that are empty after defaults removal (nevcairiel)
- AceGUI: Fix a couple of layout bugs causing the width of groups to be wrong (nargiddley)
- AceGUI: Add Icon widget (nargiddley)
- AceGUI: Allow room for the border in the BlizOptionsGroup widget (nargiddley)
- AceGUI: Button and Keybinding use UIPanelButtonTemplate2 (nargiddley)
- AceConsole-3.0: Fix bug where no table for [self] was created when registering weak commands (ammo)
- AceTimer-3.0: add missing :OnEmbedDisable (ammo)
- AceAddon-3.0: added :GetName() that will always return the "real" name of a addon or module object without any prefixes (nevcairiel)
Ace3 Beta - Revision 60697 (Feb 9th, 2008)
---------------------------------------------
- CallbackHandler-1.0: remove unnecessary table creation if a event is fired thats not registered (nevcairiel)
- AceAddon-3.0: fixed a bug with recursive addon loading (nevcairiel)
- AceGUI: Update TabGroup's tablist format, tabs are selected by value not index (nargiddley)
- AceGUI: Add MultiLineEditBox widget (nargiddley, originally by bam)
- AceGUI: Small fix to the flow layout preventing controls overlapping in some cases (nargiddley)
- AceConfigDialog: Implement control and dialogControl for types 'input' and 'select' (nargiddley)
- AceConfigDialog: Add support for multiline = true on type = 'input' (nargiddley)
- AceConfigDialog: Fix an error when all groups are hidden in a group with childGroups = 'select' (nargiddley)
- AceConfigDialog: type = 'description' will now show .icon as an image with its text (nargiddley)
- AceConfigDialog: multiline inputs are no longer forced to width = "full" (nargiddley)
- AceConfigDialog: bug fix when loading without AceConsole present (nevcairiel)
Ace3 Beta - Revision 60545 (Feb 7th, 2008)
---------------------------------------------
- AceGUI: SetToplevel(true) for the Frame widget, multiple open windows should play nice together now (nargiddley)
- AceGUI: Move Frames to the FULLSCREEN_DIALOG strata (nargiddley)
- AceGUI: Dropdown, Editbox and Keybinding labels grey out when disabled (nargiddley)
- AceGUI: Add OnClick callback to the TreeGroup widget (nargiddley)
- AceConfigDialog: Confirm popups will be above the config window (nargiddley)
Ace3 Beta - Revision 60163 (Feb 3rd, 2008)
---------------------------------------------
- Initial Beta release