performance update

This commit is contained in:
shagu
2016-09-29 22:29:53 +02:00
parent 9d18cdcd36
commit c9d723a968
4 changed files with 32 additions and 9 deletions
+8 -2
View File
@@ -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()
+12 -3
View File
@@ -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
+9 -3
View File
@@ -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
+3 -1
View File
@@ -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()