Replace QueueFunction and RunOOC with RunNextFrame

RunOOC never waited for combat to end; it ran its function on the next
frame. QueueFunction ran one function every 0.2 seconds. Each caller now
defers with ClassicAPI's RunNextFrame.

The loot roll announcement sends its name lists and the roll directly.
The 0.2 second spacing did not help with the server's chat flood limit
(10 messages less than a second apart), and an announcement is at most
four messages.
This commit is contained in:
Brues
2026-10-31 01:57:10 -05:00
parent df13e30e08
commit a8d805626d
6 changed files with 9 additions and 59 deletions
+4 -4
View File
@@ -49,7 +49,7 @@ pfUI:RegisterModule("loot", function ()
names = (k==1) and (i..":"..pfUI.loot.index_to_name[candidates[i]]) or (names..", "..i..":"..pfUI.loot.index_to_name[candidates[i]])
-- fit the maximum names in a single 255 char message (15)
if i == to or k == 15 then
QueueFunction(SendChatMessageWide,names)
SendChatMessageWide(names)
names = ""
end
k = k<15 and k+1 or 1
@@ -58,7 +58,7 @@ pfUI:RegisterModule("loot", function ()
end
pfUI.loot:RegisterEvent("CHAT_MSG_SYSTEM")
pfUI.loot.randomRolling = true
QueueFunction(RandomRoll,"1",tostring(to))
RandomRoll("1",tostring(to))
end
end
@@ -450,7 +450,7 @@ pfUI:RegisterModule("loot", function ()
LootSlot(this:GetID())
-- workaround for bugged disenchant / container loot on some servers
if numItems == 1 then
QueueFunction(CloseOnClick)
RunNextFrame(CloseOnClick)
end
end)
@@ -604,7 +604,7 @@ pfUI:RegisterModule("loot", function ()
if C.loot.autopickup == "1" and GetNumPartyMembers() == 0 and GetNumRaidMembers() == 0 then
if event == "LOOT_BIND_CONFIRM" then
local slot = arg1
QueueFunction(function()
RunNextFrame(function()
LootSlot(slot)
StaticPopup_Hide("LOOT_BIND")
end)