From 8490f49c4cd208ef4fb2103c1ac42a3d2d6c6b6a Mon Sep 17 00:00:00 2001 From: Road-block Date: Sun, 18 Dec 2016 18:47:33 +0200 Subject: [PATCH] thirdparty: fix dpsmate loading order issue --- modules/thirdparty.lua | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/modules/thirdparty.lua b/modules/thirdparty.lua index 9f651649..350aab20 100644 --- a/modules/thirdparty.lua +++ b/modules/thirdparty.lua @@ -3,8 +3,7 @@ pfUI:RegisterModule("thirdparty", function () -- DPSMate Integration -- Move DPSMate to right chat and let the chat-hide button toggle it - if DPSMate and pfUI_config.thirdparty.dpsmate.enable == "1" then - + local function pfSetupDPSMate() -- set DPSMate appearance to match pfUI DPSMateSettings["windows"][1]["titlebarheight"] = 18 DPSMateSettings["windows"][1]["titlebarfontsize"] = 12 @@ -59,7 +58,21 @@ pfUI:RegisterModule("thirdparty", function () end end) end + end + if pfUI_config.thirdparty.dpsmate.enable == "1" then + if DPSMate_DPSMate then + pfSetupDPSMate() + else + local pfHookDPSMate = CreateFrame("Frame", nil) + pfHookDPSMate:RegisterEvent("VARIABLES_LOADED") + pfHookDPSMate:SetScript("OnEvent",function() + if DPSMate_DPSMate then + pfHookDPSMate:UnregisterEvent("VARIABLES_LOADED") + pfSetupDPSMate() + end + end) + end end -- WIM Integration