From 455dfc63e3a985b7567d5c4b9b6ac69e01b8fa92 Mon Sep 17 00:00:00 2001 From: Ou Junhui Date: Sun, 4 Jul 2021 11:03:36 +0800 Subject: [PATCH] fix raiddebuff --- oUF_Simple/core/functions.lua | 9 +++++---- oUF_Simple/modules/oUF_RaidDebuffs.lua | 12 ++++++------ oUF_SimpleConfig/raid.lua | 1 - 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/oUF_Simple/core/functions.lua b/oUF_Simple/core/functions.lua index 1010006..14b536e 100644 --- a/oUF_Simple/core/functions.lua +++ b/oUF_Simple/core/functions.lua @@ -437,22 +437,23 @@ local function CreateRaidDebuffs(self) if not self.cfg.debuffwatch or not self.cfg.debuffwatch.enabled then return end local cfg = self.cfg.debuffwatch local frame = CreateFrame("Frame", nil, self) + local size = self.Health:GetHeight() - 4 SetPoint(frame,self.Health,cfg.point) - frame:SetSize(cfg.size,cfg.size) + frame:SetSize(size,size) frame:SetFrameLevel(self.Health:GetFrameLevel() + 10) frame.Backdrop = CreateBackdrop(frame) -- create backdrop frame.icon = frame:CreateTexture(nil, "ARTWORK") frame.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) frame.count = frame:CreateFontString(nil, "OVERLAY") - frame.count:SetFont(L.C.fonts.expressway, cfg.size/2, "OUTLINE") + frame.count:SetFont(L.C.fonts.expressway, size/2, "OUTLINE") frame.count:SetShadowColor(0,0,0,0.6) frame.count:SetShadowOffset(1,-1) frame.count:ClearAllPoints() - frame.count:SetPoint("BOTTOMRIGHT", cfg.size/10, -cfg.size/10) + frame.count:SetPoint("BOTTOMRIGHT", size/10, -size/10) frame.onlyMatchSpellID = true frame.showDispellableDebuff = true frame.time = frame:CreateFontString(nil, "OVERLAY") - frame.time:SetFont(L.C.fonts.expressway, cfg.size/1.65, "OUTLINE") + frame.time:SetFont(L.C.fonts.expressway, size/1.65, "OUTLINE") frame.time:SetPoint("CENTER",frame,1,0) return frame end diff --git a/oUF_Simple/modules/oUF_RaidDebuffs.lua b/oUF_Simple/modules/oUF_RaidDebuffs.lua index ff9fca9..60b9f5f 100644 --- a/oUF_Simple/modules/oUF_RaidDebuffs.lua +++ b/oUF_Simple/modules/oUF_RaidDebuffs.lua @@ -178,7 +178,7 @@ end local function UpdateDebuff(self, name, icon, count, debuffType, duration, endTime, spellId, stackThreshold) local f = self.RaidDebuffs - + if name and (count >= stackThreshold) then f.icon:SetTexture(icon) f.icon:Show() @@ -216,9 +216,9 @@ local function UpdateDebuff(self, name, icon, count, debuffType, duration, endTi end local c = DispellColor[debuffType] or DispellColor.none - + if f.Backdrop then - f.Backdrop:SetBorderColor(c[1], c[2], c[3]) + f.Backdrop:SetBackdropBorderColor(c[1], c[2], c[3]) else f:SetBackdropBorderColor(c[1], c[2], c[3]) end @@ -305,9 +305,9 @@ local function Enable(self) self:RegisterEvent("PLAYER_TALENT_UPDATE", CheckSpec, true) self:RegisterEvent("CHARACTER_POINTS_CHANGED", CheckSpec, true) end - + self:RegisterEvent('UNIT_AURA', Update) - + self.RaidDebuffs.BlackList = self.RaidDebuffs.BlackList or { [105171] = true, -- Deep Corruption [108220] = true, -- Deep Corruption @@ -325,7 +325,7 @@ local function Disable(self) self:UnregisterEvent("PLAYER_TALENT_UPDATE", CheckSpec, true) self:UnregisterEvent("CHARACTER_POINTS_CHANGED", CheckSpec, true) end - + self:UnregisterEvent('UNIT_AURA', Update) self.RaidDebuffs:Hide() diff --git a/oUF_SimpleConfig/raid.lua b/oUF_SimpleConfig/raid.lua index 93dd4e1..0153d49 100644 --- a/oUF_SimpleConfig/raid.lua +++ b/oUF_SimpleConfig/raid.lua @@ -59,7 +59,6 @@ L.C.raid = { filterOnly = true, matchByName = false, point = {"CENTER","CENTER",0,0}, - size = 22, }, setup = { template = nil, -- 1.7.9.5