From: Aleksi Blinnikka Date: Sat, 6 Jan 2018 19:06:37 +0000 (+0200) Subject: Start player frame modification X-Git-Url: https://www.aleksib.fi/git/wowui.git/commitdiff_plain/a7e766ac6a22d25458433393b900e5f9a4def266?ds=sidebyside Start player frame modification --- diff --git a/OmaRF/Indicators.lua b/OmaRF/Indicators.lua index ebece6c..c59c975 100644 --- a/OmaRF/Indicators.lua +++ b/OmaRF/Indicators.lua @@ -22,6 +22,8 @@ local UnitIsPlayer = UnitIsPlayer; local UnitIsConnected = UnitIsConnected; local UnitIsDeadOrGhost = UnitIsDeadOrGhost; local CompactRaidFrameContainer_ApplyToFrames = CompactRaidFrameContainer_ApplyToFrames; +local format = string.format; +local unpack = unpack; -- list of important auras TODO try to use spellIDs local centerAuras = { @@ -105,9 +107,9 @@ local function updateIndicators(frame) local text; local remaining = expires - current; if remaining > 60 then - text = string.format("%dm", ceil(remaining/60)); + text = format("%dm", ceil(remaining/60)); else - text = string.format("%d", floor(remaining+0.5)); + text = format("%d", floor(remaining+0.5)); end if count > 1 and config.stack then if text then diff --git a/OmaRF/LayoutFramesHook.lua b/OmaRF/LayoutFramesHook.lua index 751b55c..a4d729a 100644 --- a/OmaRF/LayoutFramesHook.lua +++ b/OmaRF/LayoutFramesHook.lua @@ -3,6 +3,7 @@ local normalBackColor = OmaRF.normalBackColor; local UnitGroupRolesAssigned = UnitGroupRolesAssigned; local CompactUnitFrame_UpdateHealthColor = CompactUnitFrame_UpdateHealthColor; local CompactRaidFrameContainer_ApplyToFrames = CompactRaidFrameContainer_ApplyToFrames; +local unpack = unpack; -- TODO remove 1px border hooksecurefunc("CompactRaidFrameContainer_LayoutFrames", function(frame) diff --git a/OmaRF/OmaRF.toc b/OmaRF/OmaRF.toc index 7954a7a..901dbdd 100644 --- a/OmaRF/OmaRF.toc +++ b/OmaRF/OmaRF.toc @@ -14,3 +14,4 @@ UpdateNameHook.lua UpdateStatusTextHook.lua UpdateDispellableDebuffsHook.lua LayoutFramesHook.lua +PlayerFrameHooks.lua diff --git a/OmaRF/PlayerFrameHooks.lua b/OmaRF/PlayerFrameHooks.lua new file mode 100644 index 0000000..9131543 --- /dev/null +++ b/OmaRF/PlayerFrameHooks.lua @@ -0,0 +1,5 @@ +hooksecurefunc("UnitFramePortrait_Update", function(self) + if self.unit == "player" then + SetPortraitToTexture(self.portrait, "Interface\\ICONS\\6BF_Blackrock_Nova"); + end +end); diff --git a/OmaRF/UpdateDispellableDebuffsHook.lua b/OmaRF/UpdateDispellableDebuffsHook.lua index 6e26ef4..3cc79fa 100644 --- a/OmaRF/UpdateDispellableDebuffsHook.lua +++ b/OmaRF/UpdateDispellableDebuffsHook.lua @@ -4,6 +4,7 @@ local normalBackColor = OmaRF.normalBackColor; local dispelBackColor = OmaRF.dispelBackColor; local UnitDebuff = UnitDebuff; local CompactUnitFrame_UpdateHealthColor = CompactUnitFrame_UpdateHealthColor; +local unpack = unpack; hooksecurefunc("CompactUnitFrame_UpdateDispellableDebuffs", function(frame) -- allowClassColorsForNPCs only in regular raid frames,