diff --git a/modules/actionbar.lua b/modules/actionbar.lua index ee6e8dcb..cb0dffc1 100644 --- a/modules/actionbar.lua +++ b/modules/actionbar.lua @@ -3,13 +3,19 @@ pfUI:RegisterModule("actionbar", function () function ActionButton_ShowGrid(button) return end function ActionButton_HideGrid(button) return end - Hook_ShowBonusActionBar = ShowBonusActionBar + if not Hook_ShowBonusActionBar then + Hook_ShowBonusActionBar = ShowBonusActionBar + end + function ShowBonusActionBar() for i=1, 12 do getglobal("ActionButton" .. i):SetAlpha(0) end Hook_ShowBonusActionBar() end - Hook_HideBonusActionBar = HideBonusActionBar + if not Hook_HideBonusActionBar then + Hook_HideBonusActionBar = HideBonusActionBar + end + function HideBonusActionBar() for i=1, 12 do getglobal("ActionButton" .. i):SetAlpha(1) end Hook_HideBonusActionBar() diff --git a/modules/autoshift.lua b/modules/autoshift.lua index f5baba5c..7ece93f4 100644 --- a/modules/autoshift.lua +++ b/modules/autoshift.lua @@ -3,9 +3,18 @@ pfUI:RegisterModule("autoshift", function () pfUI.autoshift:RegisterEvent("UI_ERROR_MESSAGE") pfUI.autoshift.lastError = "" - pfUI.autoshift.hookCastSpell = CastSpell - pfUI.autoshift.hookCastSpellByName = CastSpellByName - pfUI.autoshift.hookUseAction = UseAction + + if not pfUI.autoshift.hookCastSpell then + pfUI.autoshift.hookCastSpell = CastSpell + end + + if not pfUI.autoshift.hookCastSpellByName then + pfUI.autoshift.hookCastSpellByName = CastSpellByName + end + + if not pfUI.autoshift.hookUseAction then + pfUI.autoshift.hookUseAction = UseAction + end function CastSpell(spellId, spellbookTabNum) if pfUI.autoshift.lastError == pfLocaleShift[pfUI.cache["locale"]]['wantBattleStance'] then diff --git a/modules/chat.lua b/modules/chat.lua index d72ea392..21f2829e 100644 --- a/modules/chat.lua +++ b/modules/chat.lua @@ -176,7 +176,11 @@ pfUI:RegisterModule("chat", function () end end) - Hook_ChatFrame_OnUpdate = ChatFrame_OnUpdate + + if not Hook_ChatFrame_OnUpdate then + Hook_ChatFrame_OnUpdate = ChatFrame_OnUpdate + end + function ChatFrame_OnUpdate (arg1) for i=1, NUM_CHAT_WINDOWS do getglobal("ChatFrame" .. i .. "UpButton"):Hide() @@ -329,7 +333,9 @@ pfUI:RegisterModule("chat", function () CHAT_YELL_GET = '[Y]' .. default for i=1,NUM_CHAT_WINDOWS do - local HookAddMessage = getglobal("ChatFrame"..i).AddMessage + if not getglobal("ChatFrame"..i).HookAddMessage then + getglobal("ChatFrame"..i).HookAddMessage = getglobal("ChatFrame"..i).AddMessage + end getglobal("ChatFrame"..i).AddMessage = function (frame, text, ...) if text then local Name = string.gsub(text, ".*|Hplayer:(.-)|h.*", "%1") @@ -366,7 +372,7 @@ pfUI:RegisterModule("chat", function () text = "|cff" .. pfUI_config.chat.text.timecolor .. left .. date(pfUI_config.chat.text.timeformat) .. right .. "|r " .. text end - HookAddMessage(frame, text, unpack(arg)) + getglobal("ChatFrame"..i).HookAddMessage(frame, text, unpack(arg)) end end end diff --git a/modules/thirdparty.lua b/modules/thirdparty.lua index f5b9d047..2a9b4298 100644 --- a/modules/thirdparty.lua +++ b/modules/thirdparty.lua @@ -26,7 +26,9 @@ pfUI:RegisterModule("thirdparty", function () DPSMate_DPSMate:Hide() - pfUIhookDPSMate_Show = DPSMate_DPSMate.Show + if not pfUIhookDPSMate_Show then + pfUIhookDPSMate_Show = DPSMate_DPSMate.Show + end function DPSMate_DPSMate.Show () pfUIhookDPSMate_Show(DPSMate_DPSMate) DPSMate_DPSMate:ClearAllPoints()