mirror of
https://github.com/brues-code/pfUI.git
synced 2026-11-04 01:47:01 +00:00
One-shot event handlers: use EventUtil.RegisterOnceFrameEventAndCallback instead of self-unregistering frames
This commit is contained in:
@@ -142,11 +142,7 @@ pfUI:RegisterModule("thirdparty", function()
|
||||
HookAddon("MrPlow", function()
|
||||
if C.thirdparty.mrplow.enable == "0" then return end
|
||||
|
||||
local sort = CreateFrame("Frame", nil)
|
||||
sort:RegisterEvent("PLAYER_ENTERING_WORLD")
|
||||
sort:SetScript("OnEvent", function()
|
||||
this:UnregisterAllEvents()
|
||||
|
||||
EventUtil.RegisterOnceFrameEventAndCallback("PLAYER_ENTERING_WORLD", function()
|
||||
local MrPlowL = AceLibrary and AceLibrary("AceLocale-2.2"):new("MrPlow")
|
||||
if not (MrPlowL and MrPlowL["Bank"]) then return end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user