From dca6f2edd54cd05f56f7993171cab8e293d585db Mon Sep 17 00:00:00 2001 From: evil_morfar <10189576+evil-morfar@users.noreply.github.com> Date: Mon, 5 Aug 2024 14:33:24 +0200 Subject: [PATCH 1/7] Added winners of item to VF --- Modules/votingFrame.lua | 47 +++++++++++++++++++---------------------- changelog.md | 9 ++++++++ 2 files changed, 31 insertions(+), 25 deletions(-) diff --git a/Modules/votingFrame.lua b/Modules/votingFrame.lua index 4b3ca534..c94dde39 100644 --- a/Modules/votingFrame.lua +++ b/Modules/votingFrame.lua @@ -981,16 +981,6 @@ function RCVotingFrame:UpdateMoreInfo(row, data) return self.frame.moreInfo:Hide() end - local awardHistory = self:GetItemAwardHistory(lootTable[session].link) - -- The names needs sorting - local sortedAwardHistory = TempTable:Acquire() - local i = 1 - for cName in pairs(awardHistory) do - sortedAwardHistory[i] = cName - i = i + 1 - end - table.sort(sortedAwardHistory) - local tip = self.frame.moreInfo -- shortening tip:SetOwner(self.frame, "ANCHOR_RIGHT") @@ -1020,26 +1010,33 @@ function RCVotingFrame:UpdateMoreInfo(row, data) tip:AddDoubleLine(L["Number of raids received loot from:"], moreInfoData[name].totals.raids.num, 1,1,1, 1,1,1) tip:AddDoubleLine(L["Total items received:"], moreInfoData[name].totals.total, 0,1,1, 0,1,1) - if addon.nnp then - tip:AddLine(" ") - tip:AddDoubleLine("Winners of:", lootTable[session].link) - if #sortedAwardHistory == 0 then - tip:AddLine(_G.NONE) - end - for _, wname in ipairs(sortedAwardHistory) do - for _, entry in ipairs(awardHistory[wname]) do - local ilvl = select(4, C_Item.GetItemInfo(entry.lootWon)) - local player = Player:Get(wname) - local class = player and player:GetClass() - local c = addon:GetClassColor(class) - tip:AddDoubleLine(player:GetClassColoredName(), entry.response .." |cffffffffilvl: "..ilvl, c.r, c.g,c.b,unpack(entry.color, 1,3)) - end + -- Winners of the item + local awardHistory = self:GetItemAwardHistory(lootTable[session].link) + -- The names needs sorting + local sortedAwardHistory = TempTable:Acquire() + local i = 1 + for cName in pairs(awardHistory) do + sortedAwardHistory[i] = cName + i = i + 1 + end + table.sort(sortedAwardHistory) + + tip:AddLine(" ") + tip:AddDoubleLine(format(L["lootHistory_moreInfo_winnersOfItem"], lootTable[session].link)) + if #sortedAwardHistory == 0 then + tip:AddLine(_G.NONE) + end + for _, wname in ipairs(sortedAwardHistory) do + for _, entry in ipairs(awardHistory[wname]) do + local ilvl = select(4, C_Item.GetItemInfo(entry.lootWon)) + local player = Player:Get(wname) + tip:AddDoubleLine(addon:GetClassIconAndColoredName(player), entry.response .." |cffffffffilvl: "..ilvl, 1,1,1,unpack(entry.color, 1,3)) end end + TempTable:Release(sortedAwardHistory) else tip:AddLine(L["No entries in the Loot History"]) end - TempTable:Release(sortedAwardHistory) tip:Show() tip:SetAnchorType("ANCHOR_RIGHT", 0, -tip:GetHeight()) end diff --git a/changelog.md b/changelog.md index 35626017..63976fd2 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,12 @@ +# 3.13.1 + +## Changes + +### Winners of item in Voting Frame + +The more info tooltip in the votingframe nows shows previous winners of the selected item. +Their response and the item level of the version of the item they received is also shown there. + # 3.13.0 ## Changes From a7b3cb580cd2281d4b4871e12c6b1e3e31225a0a Mon Sep 17 00:00:00 2001 From: evil_morfar <10189576+evil-morfar@users.noreply.github.com> Date: Sun, 11 Aug 2024 16:23:36 +0200 Subject: [PATCH 2/7] Enable VF when receiving mldb with "Observe". Also do a check for missing frame in UpdateSessionButtons --- .vscode/settings.json | 18 ++++++++++++++++++ Modules/votingFrame.lua | 1 + changelog.md | 4 ++++ core.lua | 6 ++++++ 4 files changed, 29 insertions(+) diff --git a/.vscode/settings.json b/.vscode/settings.json index f7bf0bfe..6bf5cf1d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -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": [ + "$USERPROFILE\\.vscode\\extensions\\ketho.wow-api-0.15.8\\Annotations" + ], + "Lua.diagnostics.globals": [ + "lfs" ] } \ No newline at end of file diff --git a/Modules/votingFrame.lua b/Modules/votingFrame.lua index c94dde39..a0a1944b 100644 --- a/Modules/votingFrame.lua +++ b/Modules/votingFrame.lua @@ -1333,6 +1333,7 @@ end function RCVotingFrame:UpdateSessionButton(i, texture, link, awarded) local btn = sessionButtons[i] if not btn then -- create the button + if not self.frame then self.frame = self:GetFrame() end btn = addon.UI:NewNamed("IconBordered", self.frame.sessionToggleFrame, "RCSessionButton"..i, texture) if i == 1 then btn:SetPoint("TOPRIGHT", self.frame.sessionToggleFrame) diff --git a/changelog.md b/changelog.md index 63976fd2..f128a3b2 100644 --- a/changelog.md +++ b/changelog.md @@ -7,6 +7,10 @@ The more info tooltip in the votingframe nows shows previous winners of the selected item. Their response and the item level of the version of the item they received is also shown there. +## Bugfixes + +- *Enabling "Observe" now more reliably prepares the voting frame for the next session.* + # 3.13.0 ## Changes diff --git a/core.lua b/core.lua index ccd68166..a9f66807 100644 --- a/core.lua +++ b/core.lua @@ -2735,6 +2735,12 @@ function RCLootCouncil:OnMLDBReceived(input) if not self.mldb.buttons.default then self.mldb.buttons.default = {} end setmetatable(self.mldb.buttons.default, {__index = self.defaults.profile.buttons.default}) + + if self.mldb.observe then + if not self:GetActiveModule("votingframe"):IsEnabled() then + self:CallModule("votingframe") + end + end end function RCLootCouncil:DoReroll(lt) From 4573ded98ac9cf3828a8738957c39f72670ada9c Mon Sep 17 00:00:00 2001 From: evil_morfar <10189576+evil-morfar@users.noreply.github.com> Date: Sun, 11 Aug 2024 16:32:16 +0200 Subject: [PATCH 3/7] Extra nil check for reported issue --- Modules/lootFrame.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Modules/lootFrame.lua b/Modules/lootFrame.lua index 83819a57..895abe68 100644 --- a/Modules/lootFrame.lua +++ b/Modules/lootFrame.lua @@ -492,6 +492,10 @@ do entry.timeoutBar:GetStatusBarTexture():SetBlendMode("ADD") entry.timeoutBar:SetMinMaxValues(0, addon.mldb.timeout or addon:Getdb().timeout or 30) entry.timeoutBar:SetScript("OnUpdate", function(this, elapsed) + -- Had error report of this being nil, no idea how/why, as this shouldn't even run in that case. + if not entry.item.timeLeft then + return + end if entry.item.timeLeft <= 0 then --Timeout! entry.timeoutBarText:SetText(L["Timeout"]) this:SetValue(0) From e97f383b7a90380472ef31cf4ae1d4ffe6082055 Mon Sep 17 00:00:00 2001 From: evil_morfar <10189576+evil-morfar@users.noreply.github.com> Date: Wed, 14 Aug 2024 15:57:32 +0200 Subject: [PATCH 4/7] Updated ace3 (r1349) --- .vscode/settings.json | 2 +- Libs/AceComm-3.0/ChatThrottleLib.lua | 41 ++- .../widgets/AceGUIwidget-EditBox.lua | 12 +- .../widgets/AceGUIwidget-MultiLineEditBox.lua | 12 +- Libs/AceTimer-3.0/AceTimer-3.0.lua | 6 +- Libs/Changelog-Ace3-r1338-alpha.txt | 309 ------------------ Libs/Changelog-Ace3-r1349.txt | 53 +++ __tests/wow_api.lua | 4 + 8 files changed, 117 insertions(+), 322 deletions(-) delete mode 100644 Libs/Changelog-Ace3-r1338-alpha.txt create mode 100644 Libs/Changelog-Ace3-r1349.txt diff --git a/.vscode/settings.json b/.vscode/settings.json index 6bf5cf1d..b69a6b17 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -16,7 +16,7 @@ "utf8": "disable" }, "Lua.workspace.library": [ - "$USERPROFILE\\.vscode\\extensions\\ketho.wow-api-0.15.8\\Annotations" + "~\\.vscode\\extensions\\ketho.wow-api-0.16.8\\Annotations" ], "Lua.diagnostics.globals": [ "lfs" diff --git a/Libs/AceComm-3.0/ChatThrottleLib.lua b/Libs/AceComm-3.0/ChatThrottleLib.lua index 9f96f311..688d3181 100644 --- a/Libs/AceComm-3.0/ChatThrottleLib.lua +++ b/Libs/AceComm-3.0/ChatThrottleLib.lua @@ -23,7 +23,7 @@ -- LICENSE: ChatThrottleLib is released into the Public Domain -- -local CTL_VERSION = 28 +local CTL_VERSION = 29 local _G = _G @@ -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 @@ -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 @@ -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! diff --git a/Libs/AceGUI-3.0/widgets/AceGUIwidget-EditBox.lua b/Libs/AceGUI-3.0/widgets/AceGUIwidget-EditBox.lua index bb1e4fdf..f2a238bc 100644 --- a/Libs/AceGUI-3.0/widgets/AceGUIwidget-EditBox.lua +++ b/Libs/AceGUI-3.0/widgets/AceGUIwidget-EditBox.lua @@ -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 @@ -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 @@ -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 diff --git a/Libs/AceGUI-3.0/widgets/AceGUIwidget-MultiLineEditBox.lua b/Libs/AceGUI-3.0/widgets/AceGUIwidget-MultiLineEditBox.lua index bacb2be8..f0095b5c 100644 --- a/Libs/AceGUI-3.0/widgets/AceGUIwidget-MultiLineEditBox.lua +++ b/Libs/AceGUI-3.0/widgets/AceGUIwidget-MultiLineEditBox.lua @@ -1,4 +1,4 @@ -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 @@ -6,7 +6,7 @@ if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end 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 @@ -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 diff --git a/Libs/AceTimer-3.0/AceTimer-3.0.lua b/Libs/AceTimer-3.0/AceTimer-3.0.lua index 8776da21..78fb4ede 100644 --- a/Libs/AceTimer-3.0/AceTimer-3.0.lua +++ b/Libs/AceTimer-3.0/AceTimer-3.0.lua @@ -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) @@ -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 @@ -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 diff --git a/Libs/Changelog-Ace3-r1338-alpha.txt b/Libs/Changelog-Ace3-r1338-alpha.txt deleted file mode 100644 index 73ec8d63..00000000 --- a/Libs/Changelog-Ace3-r1338-alpha.txt +++ /dev/null @@ -1,309 +0,0 @@ ------------------------------------------------------------------------- -r1338 | nevcairiel | 2024-05-06 12:57:05 +0000 (Mon, 06 May 2024) | 1 line -Changed paths: - M /trunk - M /trunk/AceComm-3.0/ChatThrottleLib.lua - -ChatThrottleLib: Remove unused upvalues ------------------------------------------------------------------------- -r1337 | nevcairiel | 2024-05-06 11:51:06 +0000 (Mon, 06 May 2024) | 30 lines -Changed paths: - M /trunk - M /trunk/AceComm-3.0/ChatThrottleLib.lua - -Improve handling of errored send calls - -With the changes to implement prefix throttle support the logic around -despooling was changed such that messages in a queue are peeked, sent, -and then popped based upon whether or not it was throttled. - -The rationale behind that approach was simply performance; currently -message pipes are an array of messages where a pop down-shifts every -element in the queue. If we had to re-queue a message that would result -in re-shifting everything back up unnecessarily. - -This change however makes things a bit worse in the case of send calls -that encounter an error in the C API itself - eg. due to invalid -parameters. - -In such a case, because we've not popped the message prior to sending it -we end up in a situation where the message sticks in the queue, and CTL -now infinitely tries to re-send it expecting a different result. - -To alleviate this concern, the PerformSend and MapToSendResult function -have been altered slightly to now xpcall the send function and check -whether or not it actually succeeded. - -- In the event where a message failed to send due to an error, the - global error handler is invoked and CTL will continue its own logic - with the assumption that the message generally failed to send. It will - be dequeued and not retried. - -- In the event where no error occured, the logic is ultimately the same - as before, just now centralized in the MapToSendResult function. ------------------------------------------------------------------------- -r1336 | nevcairiel | 2024-05-06 07:17:04 +0000 (Mon, 06 May 2024) | 11 lines -Changed paths: - M /trunk - M /trunk/AceComm-3.0/ChatThrottleLib.lua - -Move Link method off Ring metatable - -There's a bug in the upgrade logic where existing rings created by older -versions of the library never have their metatables upgraded. As such, a -load of a version older than v25 followed by v25 or newer will result in -a call to a nil 'Link' method on rings. - -Rather than think through the ramifications of just setmetatable-ing -rings again unilaterally on upgrade (though that is probably a perfectly -sane idea and should work), for now let's just make the new Link method -a local function instead as that's the safer option. ------------------------------------------------------------------------- -r1335 | nevcairiel | 2024-05-05 19:35:16 +0000 (Sun, 05 May 2024) | 3 lines -Changed paths: - M /trunk - M /trunk/AceConfig-3.0/AceConfig-3.0.lua - -AceConfig-3.0: Fix documented arguments of RegisterOptionsTable - -RegisterOptionsTable only takes 3 arguments, not 4 ------------------------------------------------------------------------- -r1334 | nevcairiel | 2024-05-05 19:29:01 +0000 (Sun, 05 May 2024) | 26 lines -Changed paths: - M /trunk - M /trunk/AceComm-3.0/ChatThrottleLib.lua - -Add support for logged addon messages - -This commit imbues CTL with the knowledge of logged addon messages -added in patch 8.0. A new surface API is added for enqueuing logged -messages for transmission, and the existing traffic bypass hooks are -extended to additionally monitor raw usage of the SendAddonMessageLogged -API. - -A few small notes: - -- Pre-8.0 compatibility checks for C_ChatInfo were removed to simplify - some of the changes. - -- The core "should I send or queue it" logic used by SendAddonMessage - has been moved out to a new function (SendAddonMessageInternal) - to cut down on duplication both it and SendAddonMessageLogged. - -- The monitoring hook for SendAddonMessageLogged calls a function that - just forwards on to the hook for SendAddonMessage; this is just - in case any circumstance arises in the future where the handling - of these hooks needs to differ. - -- Management of the SendAddonMessageLogged uses yet-another securehook - boolean on the CTL library instance. Feels like this should really - be changed to some "hook version" approach based on the minor version, - but that's a bit of a larger and riskier change. ------------------------------------------------------------------------- -r1333 | nevcairiel | 2024-05-05 16:24:39 +0000 (Sun, 05 May 2024) | 4 lines -Changed paths: - M /trunk - M /trunk/AceComm-3.0/AceComm-3.0.lua - -AceComm-3.0: Change the default queue name to be only the prefix - -This lines up with the ChatThrottleLib changes made to make per-perfix -throttling easier to manage. ------------------------------------------------------------------------- -r1332 | nevcairiel | 2024-05-05 16:23:29 +0000 (Sun, 05 May 2024) | 8 lines -Changed paths: - M /trunk - M /trunk/AceComm-3.0/AceComm-3.0.lua - -Add sendResult to AceComm callback forwarding - -Most people probably interface with AceComm rather than CTL directly, so -it makes sense to pass the send result from CTL fully through the chain. - -One downside is that because AceComm currently appends its own textLen -argument, we're forced to effectively sandwich it by appending -sendResult to the end of the list. ------------------------------------------------------------------------- -r1331 | nevcairiel | 2024-05-05 16:23:23 +0000 (Sun, 05 May 2024) | 23 lines -Changed paths: - M /trunk - M /trunk/AceComm-3.0/ChatThrottleLib.lua - -Adjust default queue name to just be the prefix - -As throttles are now per-prefix, any default queue strategy that -fragments messages sharing a common prefix amongst multiple pipes has an -effect where the despool logic will make very slow progress attempting -to send them. - -This is particularly problematic for whispers. If an addon were to queue -up a lot of data for unique whisper targets, we can only despool one -message per second for at most one of those targets, with all the -other pipes constantly being blocked. - -The worst case scenario is whisper data backs up faster than it can be -sent out on a prefix, and if the data itself is formed of multiple -messages then it may be the case that no user receives complete data in -a timely manner. - -Because of this, the default queue name is now just the prefix itself. -This should ensure that in large transfers across a prefix at least one -player is still getting data in a more reasonable timeframe, and makes -delivery behavior more consistent with raw use of the API. This also -reduces the amount of work CTL has to do internally when despooling, as -by default there'll be less unique pipes. ------------------------------------------------------------------------- -r1330 | nevcairiel | 2024-05-05 16:23:16 +0000 (Sun, 05 May 2024) | 83 lines -Changed paths: - M /trunk - M /trunk/.luacheckrc - M /trunk/AceComm-3.0/ChatThrottleLib.lua - -Add support for per-prefix transmission throttling - -In patch 4.4.0 and 10.2.7 Blizzard have tightened the restrictions on -addon comms to add a per-prefix throttle across all chat types, -effectively restricting them to one message per second with a small -accrued burst capacity. - -The SendAddonMessage APIs now return an enum result code which includes -information if this client-side throttle has been applied to a submitted -message. With it, we can now properly handle throttling in CTL and -avoid situations where addon messages would be dropped for exceeding it. - -This PR takes into consideration the discussion on Discord and takes a -slightly different approach to the other open one by instead -implementing the concept of a "blocked" pipe. - -A pipe enters the "blocked" state whenever a message at its head is -attempted to be sent off, and a throttle result code is returned from -the API. - -When transitioning to this state, the pipe is removed from the -transmission ring of its parent priority and is instead placed into a -separate (and new) blocked ring. This prevents the despool logic from -seeing blocked pipes and pointlessly attempting to re-send on them. - -Periodically - currently every 0.35s - the contents of the blocked -rings in each priority are reintegrated back into the transmission -rings, allowing us to attempt re-transmission of queued messages. - -This means there may be some added latency when a prefix entered a -blocked state if the API was about to perhaps unblock it, but this -also allows us to reallocate bandwidth that would be consumed by -priorities that are fully blocked to others that can more readily -use it. The value of 0.35s was chosen almost arbitrarily and could -be tuned later if found to be a bit high. - -It's important to also note that we specifically don't consider the -'ChannelThrottle' return code a retryable error condition. The reasoning -here is that this throttle isn't new, and the API can return this value -but still sometimes send off the message albeit subject to additional -server-side throttling checks - and also at the time of writing, a -server-side bug that causes it to more aggressively throttle than -it actually should. - -Aside from prefix throttling, there's a few other small changes. - -- Failure to send a message either due to an error or throttling no - longer consumes bandwidth that had been allocated to a priority. - -- Priorities that enter a blocked or empty state now release their - bandwidth back to the global pool for redistribution immediately, - instead of waiting until there's no data queued up whatsoever. This - is required to deal with edge cases involving priorities sending - many small messages on one prefix infinitely accumulating bandwidth. - -- Transmission logic has been centralized into a new PerformSend - function to minimize the number of call sites individually needing - to remember to toggle boolean variables with each Send call. - -- Queued transmissions no longer apply checks to see if the player - is in a group or raid. The API has dedicated return codes for this - condition and has been tested to not trigger erroneous system - message spam if attempting to send a message to either chat type - while not being in a group. This is not the case for guilds, however - the library never checked this case previously so one hasn't been - added. - -- User-supplied callbacks are now supplied an accurate 'didSend' - parameter that will be false if the API returns a non-throttle-related - error code. - -- User-supplied callbacks are additionally now supplied the new result - code as a third parameter. For Classic Era, we synthesize one from a - subset of the enum values based off the boolean result that the API - will still be providing there for now. - -- User-supplied callbacks no longer let errors blow things up in an - uncontrolled manner by being subject to securecall wrapping. This - is also consistently applied irrespective of whether or not the - send itself was immediate or queued. - -- Some compatibility with the pre-8.0 global SendAddonMessage API was - removed as it's no longer needed. ------------------------------------------------------------------------- -r1329 | funkehdude | 2024-04-30 17:18:58 +0000 (Tue, 30 Apr 2024) | 1 line -Changed paths: - M /trunk/Ace3_Vanilla.toc - -bump toc ------------------------------------------------------------------------- -r1328 | nevcairiel | 2024-03-20 22:36:27 +0000 (Wed, 20 Mar 2024) | 1 line -Changed paths: - M /trunk - M /trunk/AceDB-3.0/AceDB-3.0.lua - -AceDB-3.0: Sync type checks for New and ResetDB defaultProfile ------------------------------------------------------------------------- -r1327 | nevcairiel | 2024-03-20 07:23:40 +0000 (Wed, 20 Mar 2024) | 1 line -Changed paths: - M /trunk - M /trunk/Ace3.toc - -Update TOC for 10.2.6 ------------------------------------------------------------------------- -r1326 | nevcairiel | 2024-03-11 13:41:10 +0000 (Mon, 11 Mar 2024) | 1 line -Changed paths: - D /trunk/.docmeta - -Remove docmeta, the generation hasn't worked in years ------------------------------------------------------------------------- -r1325 | nevcairiel | 2024-03-11 13:38:36 +0000 (Mon, 11 Mar 2024) | 1 line -Changed paths: - M /trunk - A /trunk/Ace3_Cata.toc - -Add TOC for Cata Classic ------------------------------------------------------------------------- -r1324 | funkehdude | 2024-02-22 00:57:48 +0000 (Thu, 22 Feb 2024) | 1 line -Changed paths: - M /trunk/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua - -AceGUI-3.0: ColorPicker: No need to force enable mouse anymore, this was fixed in a mini patch after 10.2.5 ------------------------------------------------------------------------- -r1323 | nevcairiel | 2024-02-22 00:30:09 +0000 (Thu, 22 Feb 2024) | 1 line -Changed paths: - M /trunk - M /trunk/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua - -AceGUI-3.0: ColorPicker: Sanity check that alpha exists before calculating with it ------------------------------------------------------------------------- -r1322 | nevcairiel | 2024-02-22 00:25:11 +0000 (Thu, 22 Feb 2024) | 4 lines -Changed paths: - M /trunk - M /trunk/.luacheckrc - M /trunk/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua - -AceGUI-3.0: ColorPicker: Fix alpha handling on Classic Era - -Fixes WoWHead Ticket #655 -Closes GitHub #11 ------------------------------------------------------------------------- -r1321 | funkehdude | 2024-02-07 12:06:48 +0000 (Wed, 07 Feb 2024) | 1 line -Changed paths: - M /trunk/Ace3_Vanilla.toc - -bump toc ------------------------------------------------------------------------- - diff --git a/Libs/Changelog-Ace3-r1349.txt b/Libs/Changelog-Ace3-r1349.txt new file mode 100644 index 00000000..e9aeca11 --- /dev/null +++ b/Libs/Changelog-Ace3-r1349.txt @@ -0,0 +1,53 @@ +------------------------------------------------------------------------ +r1348 | nevcairiel | 2024-07-23 11:23:40 +0000 (Tue, 23 Jul 2024) | 1 line +Changed paths: + M /trunk/changelog.txt + +Update changelog +------------------------------------------------------------------------ +r1347 | nevcairiel | 2024-07-23 11:23:22 +0000 (Tue, 23 Jul 2024) | 1 line +Changed paths: + M /trunk/Ace3.toc + +Remove outdated TOC versions that are no longer maintained/tested +------------------------------------------------------------------------ +r1346 | nevcairiel | 2024-07-20 07:10:33 +0000 (Sat, 20 Jul 2024) | 1 line +Changed paths: + M /trunk + M /trunk/.luacheckrc + M /trunk/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua + M /trunk/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua + +AceGUI-3.0: Editboxes: Update spell drag-and-drop for WoW 11.0 +------------------------------------------------------------------------ +r1345 | funkehdude | 2024-07-09 19:31:35 +0000 (Tue, 09 Jul 2024) | 1 line +Changed paths: + M /trunk/Ace3.toc + +bump toc +------------------------------------------------------------------------ +r1344 | nevcairiel | 2024-07-03 10:50:13 +0000 (Wed, 03 Jul 2024) | 1 line +Changed paths: + M /trunk + M /trunk/Ace3.toc + +Add 11.0.2 TOC +------------------------------------------------------------------------ +r1343 | funkehdude | 2024-06-06 06:04:02 +0000 (Thu, 06 Jun 2024) | 1 line +Changed paths: + M /trunk/Ace3.toc + D /trunk/Ace3_Cata.toc + D /trunk/Ace3_TBC.toc + D /trunk/Ace3_Vanilla.toc + D /trunk/Ace3_Wrath.toc + +Update toc structure +------------------------------------------------------------------------ +r1342 | nevcairiel | 2024-05-26 11:49:35 +0000 (Sun, 26 May 2024) | 1 line +Changed paths: + M /trunk + M /trunk/AceTimer-3.0/AceTimer-3.0.lua + +AceTimer-3.0: fix callback parameter name in docs +------------------------------------------------------------------------ + diff --git a/__tests/wow_api.lua b/__tests/wow_api.lua index 549eda31..a987e44d 100644 --- a/__tests/wow_api.lua +++ b/__tests/wow_api.lua @@ -375,6 +375,10 @@ C_ChatInfo = { } C_ChatInfo.SendAddonMessageLogged = C_ChatInfo.SendAddonMessage +function BNSendGameData() + +end + if not wipe then function wipe(tbl) for k in pairs(tbl) do From fcd09cca53531e917987573186775c9ca0725538 Mon Sep 17 00:00:00 2001 From: evil_morfar <10189576+evil-morfar@users.noreply.github.com> Date: Wed, 14 Aug 2024 15:58:30 +0200 Subject: [PATCH 5/7] Toc 110002 --- RCLootCouncil.toc | 2 +- changelog.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/RCLootCouncil.toc b/RCLootCouncil.toc index 96eec3e4..d9b44a02 100644 --- a/RCLootCouncil.toc +++ b/RCLootCouncil.toc @@ -1,5 +1,5 @@ ## Author: Potdisc -## Interface: 110000, 100207 +## Interface: 110002 ## Notes: Interface for running a Loot Council v3.13.0 ## Title: RCLootCouncil ## Version: 3.13.0 diff --git a/changelog.md b/changelog.md index f128a3b2..199d81e8 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,8 @@ ## Changes +Updated for patch 11.0.2. + ### Winners of item in Voting Frame The more info tooltip in the votingframe nows shows previous winners of the selected item. From 691e96e2dfdc9006ab684cec1c230141d1f4dda5 Mon Sep 17 00:00:00 2001 From: evil_morfar <10189576+evil-morfar@users.noreply.github.com> Date: Wed, 14 Aug 2024 16:29:54 +0200 Subject: [PATCH 6/7] Added Sheets export --- Locale/enUS.lua | 3 ++- Modules/History/lootHistory.lua | 34 ++++++++++++++++++++------------- changelog.md | 6 ++++++ 3 files changed, 29 insertions(+), 14 deletions(-) diff --git a/Locale/enUS.lua b/Locale/enUS.lua index 9d3c69ff..bb8336fb 100644 --- a/Locale/enUS.lua +++ b/Locale/enUS.lua @@ -13,7 +13,6 @@ if not L then return end L["A new session has begun, type '/rc open' to open the voting frame."] = true L["A format to copy/paste to another player."] = true -L["A tab delimited output for Excel. Might work with other spreadsheets."] = true L["Accepted imports: 'Player Export' and 'CSV'"] = true L["add_candidate"] = "Add Candidate" L["Add Rolls"] = true @@ -520,6 +519,8 @@ Click and drag to move Ctrl+scroll to change scale]] L.autoGroupLoot_warning = "Note: Group Leader's settings will cause RCLootCouncil to automatically control group loot." +L.history_export_sheets_tip = "Tab delimited export for Google Sheets and English version of Excel that uses ';' as formula delimiter." +L.history_export_excel_international_tip = "Tab delimited export for international version of Excel that uses ',' as formula delimiter." L["opt_addButton_desc"] = "Add a new button group for the selected slot." L["opt_autoAddBoEs_name"] = "Auto Add BoEs" L["opt_autoAddBoEs_desc"] = "Automatically add all BoE (Bind on Equip) items to a session." diff --git a/Modules/History/lootHistory.lua b/Modules/History/lootHistory.lua index e1e722f2..398b8c06 100644 --- a/Modules/History/lootHistory.lua +++ b/Modules/History/lootHistory.lua @@ -41,17 +41,18 @@ LootHistory.wowheadBaseUrl = "https://www.wowhead.com/item=" local tinsert, tostring, getglobal, pairs, ipairs, tremove, strsplit = tinsert, tostring, getglobal, pairs, ipairs, tremove, strsplit function LootHistory:OnInitialize() - self.exportSelection = "tsv" + self.exportSelection = "player" -- Pointer to export functions. Expected to return a string containing the export self.exports = { - csv = {func = self.ExportCSV, name = "CSV", tip = L["Standard .csv output."]}, - tsv = {func = self.ExportTSV, name = "TSV (Excel)", tip = L["A tab delimited output for Excel. Might work with other spreadsheets."]}, - bbcode = {func = self.ExportBBCode, name = "BBCode", tip = L["Simple BBCode output."]}, - bbcodeSmf = {func = self.ExportBBCodeSMF, name = "BBCode SMF", tip = L["BBCode export, tailored for SMF."],}, - eqxml = {func = self.ExportEQXML, name = "EQdkp-Plus XML", tip = L["EQdkp-Plus XML output, tailored for Enjin import."]}, + csv = {func = self.ExportCSV, name = "CSV", tip = L["Standard .csv output."]}, + tsv = {func = self.ExportTSV, name = "TSV (International Excel)", tip = L.history_export_excel_international_tip}, + sheets = {func = self.ExportGoogleSheets, name = "TSV (Google Sheets & English Excel)", tip = L.history_export_sheets_tip}, + bbcode = {func = self.ExportBBCode, name = "BBCode", tip = L["Simple BBCode output."]}, + bbcodeSmf = {func = self.ExportBBCodeSMF, name = "BBCode SMF", tip = L["BBCode export, tailored for SMF."],}, + eqxml = {func = self.ExportEQXML, name = "EQdkp-Plus XML", tip = L["EQdkp-Plus XML output, tailored for Enjin import."]}, player = {func = self.PlayerExport, name = "Player Export", tip = L["A format to copy/paste to another player."]}, - discord = {func = self.ExportDiscord, name = "Discord", tip = L["Discord friendly output."]}, - json = {func = self.ExportJSON, name = "JSON", tip = L["Standard JSON output."]}, + discord = {func = self.ExportDiscord, name = "Discord", tip = L["Discord friendly output."]}, + json = {func = self.ExportJSON, name = "JSON", tip = L["Standard JSON output."]}, --html = self.ExportHTML } self.scrollCols = { @@ -1558,9 +1559,16 @@ do return table.concat(ret) end + --- TSV for Google Sheets and English Excel versions. + function LootHistory:ExportGoogleSheets() + return self:ExportTSV(";") + end + --- TSV (Tab Seperated Values) for Excel - -- Made specificly with excel in mind, but might work with other spreadsheets - function LootHistory:ExportTSV() + --- Made specificly with excel in mind, but might work with other spreadsheets + ---@param formulaDelimiter ","|";" Delimiter to use in hyperlink formula. Defaults to ",". + function LootHistory:ExportTSV(formulaDelimiter) + formulaDelimiter = formulaDelimiter or "," -- Add headers wipe(export) wipe(ret) @@ -1574,7 +1582,7 @@ do tinsert(export, tostring(player)) tinsert(export, tostring(self:GetLocalizedDate(d.date))) tinsert(export, tostring(d.time)) - tinsert(export, "=HYPERLINK(\""..self:GetWowheadLinkFromItemLink(d.lootWon).."\",\""..tostring(d.lootWon).."\")") + tinsert(export, table.concat {"=HYPERLINK(\"", self:GetWowheadLinkFromItemLink(d.lootWon), "\"", formulaDelimiter, "\"", tostring(d.lootWon), "\")"} or "") tinsert(export, ItemUtils:GetItemIDFromLink(d.lootWon)) tinsert(export, ItemUtils:GetItemStringFromLink(d.lootWon)) tinsert(export, tostring(d.response)) @@ -1582,8 +1590,8 @@ do tinsert(export, tostring(d.class)) tinsert(export, tostring(d.instance)) tinsert(export, tostring(d.boss)) - tinsert(export, d.itemReplaced1 and "=HYPERLINK(\""..self:GetWowheadLinkFromItemLink(tostring(d.itemReplaced1)).."\",\""..tostring(d.itemReplaced1).."\")" or "") - tinsert(export, d.itemReplaced2 and "=HYPERLINK(\""..self:GetWowheadLinkFromItemLink(tostring(d.itemReplaced2)).."\",\""..tostring(d.itemReplaced2).."\")" or "") + tinsert(export, d.itemReplaced1 and table.concat {"=HYPERLINK(\"", self:GetWowheadLinkFromItemLink(tostring(d.itemReplaced1)), "\"", formulaDelimiter, "\"", tostring(d.itemReplaced1), "\")"} or "") + tinsert(export, d.itemReplaced2 and table.concat {"=HYPERLINK(\"", self:GetWowheadLinkFromItemLink(tostring(d.itemReplaced2)), "\"", formulaDelimiter, "\"", tostring(d.itemReplaced2), "\")"} or "") tinsert(export, tostring(d.responseID)) tinsert(export, tostring(d.isAwardReason or false)) tinsert(export, rollType) diff --git a/changelog.md b/changelog.md index 199d81e8..7a2d9b12 100644 --- a/changelog.md +++ b/changelog.md @@ -4,6 +4,12 @@ Updated for patch 11.0.2. +### History Export + +Added a new export option for Google Sheets and English versions of Excel that uses ";" as formula delimiter. + +Changed default export to Player Export. + ### Winners of item in Voting Frame The more info tooltip in the votingframe nows shows previous winners of the selected item. From d6cb1bfdf9dd9a6534779c3d41e9d5aa5c519e0f Mon Sep 17 00:00:00 2001 From: evil_morfar <10189576+evil-morfar@users.noreply.github.com> Date: Wed, 14 Aug 2024 16:34:58 +0200 Subject: [PATCH 7/7] Made default export selection a db option --- Core/Defaults.lua | 1 + Modules/History/lootHistory.lua | 2 +- RCLootCouncil.toc | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Core/Defaults.lua b/Core/Defaults.lua index a085846c..d921fe36 100644 --- a/Core/Defaults.lua +++ b/Core/Defaults.lua @@ -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 diff --git a/Modules/History/lootHistory.lua b/Modules/History/lootHistory.lua index 398b8c06..d348d58c 100644 --- a/Modules/History/lootHistory.lua +++ b/Modules/History/lootHistory.lua @@ -41,7 +41,7 @@ LootHistory.wowheadBaseUrl = "https://www.wowhead.com/item=" local tinsert, tostring, getglobal, pairs, ipairs, tremove, strsplit = tinsert, tostring, getglobal, pairs, ipairs, tremove, strsplit function LootHistory:OnInitialize() - self.exportSelection = "player" + self.exportSelection = addon.db.profile.defaultHistoryExport or "player" -- Pointer to export functions. Expected to return a string containing the export self.exports = { csv = {func = self.ExportCSV, name = "CSV", tip = L["Standard .csv output."]}, diff --git a/RCLootCouncil.toc b/RCLootCouncil.toc index d9b44a02..12a72586 100644 --- a/RCLootCouncil.toc +++ b/RCLootCouncil.toc @@ -1,8 +1,8 @@ ## Author: Potdisc ## Interface: 110002 -## Notes: Interface for running a Loot Council v3.13.0 +## Notes: Interface for running a Loot Council v3.13.1 ## Title: RCLootCouncil -## Version: 3.13.0 +## Version: 3.13.1 ## SavedVariables: RCLootCouncilDB, RCLootCouncilLootDB ## OptionalDeps: LibStub, CallbackHandler-1.0, Ace3, lib-st, LibWindow-1.1, LibDialog-1.0 ## X-Curse-Project-ID: 39928