Skip to content

Commit

Permalink
Merge branch 'release/3.13.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
evil-morfar committed Aug 14, 2024
2 parents fae6cac + d6cb1bf commit 8b3db95
Show file tree
Hide file tree
Showing 16 changed files with 215 additions and 363 deletions.
18 changes: 18 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,23 @@
"todo-tree.tree.showCountsInTree": false,
"Lua.runtime.path": [
"${workspace}/__tests/?.lua"
],
"Lua.runtime.version": "Lua 5.1",
"Lua.runtime.builtin": {
"basic": "disable",
"debug": "disable",
"io": "disable",
"math": "disable",
"os": "disable",
"package": "disable",
"string": "disable",
"table": "disable",
"utf8": "disable"
},
"Lua.workspace.library": [
"~\\.vscode\\extensions\\ketho.wow-api-0.16.8\\Annotations"
],
"Lua.diagnostics.globals": [
"lfs"
]
}
1 change: 1 addition & 0 deletions Core/Defaults.lua
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ addon.defaults = {
-- Other
iLvlDecimal = false,
showAutoGroupLootWarning = true, -- Show warning OnMLDBReceived if autoGroupLoot is on.
defaultHistoryExport = "player",

UI = { -- stores all ui information
["**"] = { -- Defaults
Expand Down
41 changes: 40 additions & 1 deletion Libs/AceComm-3.0/ChatThrottleLib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
-- LICENSE: ChatThrottleLib is released into the Public Domain
--

local CTL_VERSION = 28
local CTL_VERSION = 29

local _G = _G

Expand Down Expand Up @@ -249,6 +249,14 @@ function ChatThrottleLib:Init()
end)
end

-- v29: Hook BNSendGameData for traffic logging
if not self.securelyHookedBNGameData then
self.securelyHookedBNGameData = true
hooksecurefunc("BNSendGameData", function(...)
return ChatThrottleLib.Hook_BNSendGameData(...)
end)
end

self.nBypass = 0
end

Expand Down Expand Up @@ -280,6 +288,9 @@ end
function ChatThrottleLib.Hook_SendAddonMessageLogged(prefix, text, chattype, destination, ...)
ChatThrottleLib.Hook_SendAddonMessage(prefix, text, chattype, destination, ...)
end
function ChatThrottleLib.Hook_BNSendGameData(destination, prefix, text)
ChatThrottleLib.Hook_SendAddonMessage(prefix, text, "WHISPER", destination)
end



Expand Down Expand Up @@ -630,6 +641,34 @@ function ChatThrottleLib:SendAddonMessageLogged(prio, prefix, text, chattype, ta
SendAddonMessageInternal(self, sendFunction, prio, prefix, text, chattype, target, queueName, callbackFn, callbackArg)
end

local function BNSendGameDataReordered(prefix, text, _, gameAccountID)
return _G.BNSendGameData(gameAccountID, prefix, text)
end

function ChatThrottleLib:BNSendGameData(prio, prefix, text, chattype, gameAccountID, queueName, callbackFn, callbackArg)
-- Note that this API is intentionally limited to 255 bytes of data
-- for reasons of traffic fairness, which is less than the 4078 bytes
-- BNSendGameData natively supports. Additionally, a chat type is required
-- but must always be set to 'WHISPER' to match what is exposed by the
-- receipt event.
--
-- If splitting messages, callers must also be aware that message
-- delivery over BNSendGameData is unordered.

if not self or not prio or not prefix or not text or not gameAccountID or not chattype or not self.Prio[prio] then
error('Usage: ChatThrottleLib:BNSendGameData("{BULK||NORMAL||ALERT}", "prefix", "text", "chattype", gameAccountID)', 2)
elseif callbackFn and type(callbackFn)~="function" then
error('ChatThrottleLib:BNSendGameData(): callbackFn: expected function, got '..type(callbackFn), 2)
elseif #text>255 then
error("ChatThrottleLib:BNSendGameData(): message length cannot exceed 255 bytes", 2)
elseif chattype ~= "WHISPER" then
error("ChatThrottleLib:BNSendGameData(): chat type must be 'WHISPER'", 2)
end

local sendFunction = BNSendGameDataReordered
SendAddonMessageInternal(self, sendFunction, prio, prefix, text, chattype, gameAccountID, queueName, callbackFn, callbackArg)
end


-----------------------------------------------------------------------
-- Get the ball rolling!
Expand Down
12 changes: 8 additions & 4 deletions Libs/AceGUI-3.0/widgets/AceGUIwidget-EditBox.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--[[-----------------------------------------------------------------------------
EditBox Widget
-------------------------------------------------------------------------------]]
local Type, Version = "EditBox", 28
local Type, Version = "EditBox", 29
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end

Expand All @@ -10,7 +10,7 @@ local tostring, pairs = tostring, pairs

-- WoW APIs
local PlaySound = PlaySound
local GetCursorInfo, ClearCursor, GetSpellInfo = GetCursorInfo, ClearCursor, GetSpellInfo
local GetCursorInfo, ClearCursor = GetCursorInfo, ClearCursor
local CreateFrame, UIParent = CreateFrame, UIParent
local _G = _G

Expand Down Expand Up @@ -76,12 +76,16 @@ end

local function EditBox_OnReceiveDrag(frame)
local self = frame.obj
local type, id, info = GetCursorInfo()
local type, id, info, extra = GetCursorInfo()
local name
if type == "item" then
name = info
elseif type == "spell" then
name = GetSpellInfo(id, info)
if C_Spell and C_Spell.GetSpellName then
name = C_Spell.GetSpellName(extra)
else
name = GetSpellInfo(id, info)
end
elseif type == "macro" then
name = GetMacroInfo(id)
end
Expand Down
12 changes: 8 additions & 4 deletions Libs/AceGUI-3.0/widgets/AceGUIwidget-MultiLineEditBox.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
local Type, Version = "MultiLineEditBox", 32
local Type, Version = "MultiLineEditBox", 33
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end

-- Lua APIs
local pairs = pairs

-- WoW APIs
local GetCursorInfo, GetSpellInfo, ClearCursor = GetCursorInfo, GetSpellInfo, ClearCursor
local GetCursorInfo, ClearCursor = GetCursorInfo, ClearCursor
local CreateFrame, UIParent = CreateFrame, UIParent
local _G = _G

Expand Down Expand Up @@ -100,9 +100,13 @@ local function OnMouseUp(self)
end

local function OnReceiveDrag(self) -- EditBox / ScrollFrame
local type, id, info = GetCursorInfo()
local type, id, info, extra = GetCursorInfo()
if type == "spell" then
info = GetSpellInfo(id, info)
if C_Spell and C_Spell.GetSpellName then
info = C_Spell.GetSpellName(extra)
else
info = GetSpellInfo(id, info)
end
elseif type ~= "item" then
return
end
Expand Down
6 changes: 3 additions & 3 deletions Libs/AceTimer-3.0/AceTimer-3.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
-- make into AceTimer.
-- @class file
-- @name AceTimer-3.0
-- @release $Id: AceTimer-3.0.lua 1284 2022-09-25 09:15:30Z nevcairiel $
-- @release $Id: AceTimer-3.0.lua 1342 2024-05-26 11:49:35Z nevcairiel $

local MAJOR, MINOR = "AceTimer-3.0", 17 -- Bump minor on changes
local AceTimer, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
Expand Down Expand Up @@ -78,7 +78,7 @@ end

--- Schedule a new one-shot timer.
-- The timer will fire once in `delay` seconds, unless canceled before.
-- @param callback Callback function for the timer pulse (funcref or method name).
-- @param func Callback function for the timer pulse (funcref or method name).
-- @param delay Delay for the timer, in seconds.
-- @param ... An optional, unlimited amount of arguments to pass to the callback function.
-- @usage
Expand Down Expand Up @@ -107,7 +107,7 @@ end

--- Schedule a repeating timer.
-- The timer will fire every `delay` seconds, until canceled.
-- @param callback Callback function for the timer pulse (funcref or method name).
-- @param func Callback function for the timer pulse (funcref or method name).
-- @param delay Delay for the timer, in seconds.
-- @param ... An optional, unlimited amount of arguments to pass to the callback function.
-- @usage
Expand Down
Loading

0 comments on commit 8b3db95

Please sign in to comment.