Commit 55b848ed authored by Simpy's avatar Simpy 🐹
Browse files

Merge branch 'beta' into ptr

parents 7d05486b eb961fb7
......@@ -989,8 +989,9 @@ function E:UpdateLayout(skipCallback)
end
function E:UpdateActionBars(skipCallback)
ActionBars:Extra_SetAlpha()
ActionBars:Extra_SetScale()
ActionBars:ExtraButtons_UpdateAlpha()
ActionBars:ExtraButtons_UpdateScale()
ActionBars:ExtraButtons_GlobalFade()
ActionBars:ToggleCooldownOptions()
ActionBars:UpdateButtonSettings()
ActionBars:UpdateMicroPositionDimensions()
......@@ -1375,303 +1376,25 @@ function E:InitializeModules()
end
end
local function buffwatchConvert(spell)
if spell.sizeOverride then spell.sizeOverride = nil end
if spell.size then spell.size = nil end
if not spell.sizeOffset then
spell.sizeOffset = 0
end
if spell.styleOverride then
spell.style = spell.styleOverride
spell.styleOverride = nil
elseif not spell.style then
spell.style = 'coloredIcon'
end
end
local ttModSwap
do -- tooltip convert
local swap = {ALL = 'HIDE',NONE = 'SHOW'}
ttModSwap = function(val) return swap[val] end
end
function E:DBConversions()
--Fix issue where UIScale was incorrectly stored as string
E.global.general.UIScale = tonumber(E.global.general.UIScale)
--Not sure how this one happens, but prevent it in any case
if E.global.general.UIScale <= 0 then
E.global.general.UIScale = G.general.UIScale
end
--Combat & Resting Icon options update
if E.db.unitframe.units.player.combatIcon ~= nil then
E.db.unitframe.units.player.CombatIcon.enable = E.db.unitframe.units.player.combatIcon
E.db.unitframe.units.player.combatIcon = nil
end
if E.db.unitframe.units.player.restIcon ~= nil then
E.db.unitframe.units.player.RestIcon.enable = E.db.unitframe.units.player.restIcon
E.db.unitframe.units.player.restIcon = nil
end
-- [Fader] Combat Fade options for Player
if E.db.unitframe.units.player.combatfade ~= nil then
local enabled = E.db.unitframe.units.player.combatfade
E.db.unitframe.units.player.fader.enable = enabled
if enabled then -- use the old min alpha too
E.db.unitframe.units.player.fader.minAlpha = 0
end
E.db.unitframe.units.player.combatfade = nil
end
-- [Fader] Range check options for Units
do
local outsideAlpha
if E.db.unitframe.OORAlpha ~= nil then
outsideAlpha = E.db.unitframe.OORAlpha
E.db.unitframe.OORAlpha = nil
end
for _, unit in ipairs({'target','targettarget','targettargettarget','focus','focustarget','pet','pettarget','boss','arena','party','raid','raid40','raidpet','tank','assist'}) do
if E.db.unitframe.units[unit].rangeCheck ~= nil then
local enabled = E.db.unitframe.units[unit].rangeCheck
E.db.unitframe.units[unit].fader.enable = enabled
E.db.unitframe.units[unit].fader.range = enabled
if outsideAlpha then
E.db.unitframe.units[unit].fader.minAlpha = outsideAlpha
end
E.db.unitframe.units[unit].rangeCheck = nil
end
end
end
--Convert old 'Buffs and Debuffs' font size option to individual options
if E.db.auras.fontSize then
local fontSize = E.db.auras.fontSize
E.db.auras.buffs.countFontSize = fontSize
E.db.auras.buffs.durationFontSize = fontSize
E.db.auras.debuffs.countFontSize = fontSize
E.db.auras.debuffs.durationFontSize = fontSize
E.db.auras.fontSize = nil
end
--Remove stale font settings from Cooldown system for top auras
if E.db.auras.cooldown.fonts then
E.db.auras.cooldown.fonts = nil
end
--Convert Nameplate Aura Duration to new Cooldown system
if E.db.nameplates.durationFont then
E.db.nameplates.cooldown.fonts.font = E.db.nameplates.durationFont
E.db.nameplates.cooldown.fonts.fontSize = E.db.nameplates.durationFontSize
E.db.nameplates.cooldown.fonts.fontOutline = E.db.nameplates.durationFontOutline
E.db.nameplates.durationFont = nil
E.db.nameplates.durationFontSize = nil
E.db.nameplates.durationFontOutline = nil
end
if E.db.nameplates.lowHealthThreshold > 0.8 then
E.db.nameplates.lowHealthThreshold = 0.8
end
if E.db.nameplates.units.TARGET.nonTargetTransparency ~= nil then
E.global.nameplate.filters.ElvUI_NonTarget.actions.alpha = E.db.nameplates.units.TARGET.nonTargetTransparency * 100
E.db.nameplates.units.TARGET.nonTargetTransparency = nil
end
--Removed additional table in nameplate filters cause it was basically useless
for _, unit in ipairs({'PLAYER','FRIENDLY_PLAYER','ENEMY_PLAYER','FRIENDLY_NPC','ENEMY_NPC'}) do
if E.db.nameplates.units[unit].buffs and E.db.nameplates.units[unit].buffs.filters ~= nil then
E.db.nameplates.units[unit].buffs.minDuration = E.db.nameplates.units[unit].buffs.filters.minDuration or P.nameplates.units[unit].buffs.minDuration
E.db.nameplates.units[unit].buffs.maxDuration = E.db.nameplates.units[unit].buffs.filters.maxDuration or P.nameplates.units[unit].buffs.maxDuration
E.db.nameplates.units[unit].buffs.priority = E.db.nameplates.units[unit].buffs.filters.priority or P.nameplates.units[unit].buffs.priority
E.db.nameplates.units[unit].buffs.filters = nil
end
if E.db.nameplates.units[unit].debuffs and E.db.nameplates.units[unit].debuffs.filters ~= nil then
E.db.nameplates.units[unit].debuffs.minDuration = E.db.nameplates.units[unit].debuffs.filters.minDuration or P.nameplates.units[unit].debuffs.minDuration
E.db.nameplates.units[unit].debuffs.maxDuration = E.db.nameplates.units[unit].debuffs.filters.maxDuration or P.nameplates.units[unit].debuffs.maxDuration
E.db.nameplates.units[unit].debuffs.priority = E.db.nameplates.units[unit].debuffs.filters.priority or P.nameplates.units[unit].debuffs.priority
E.db.nameplates.units[unit].debuffs.filters = nil
end
end
--Moved target scale to a style filter
if E.db.nameplates.units.TARGET.scale ~= nil then
E.global.nameplate.filters.ElvUI_Target.actions.scale = E.db.nameplates.units.TARGET.scale
E.db.nameplates.units.TARGET.scale = nil
if E.private.skins.cleanBossButton ~= nil then
E.db.actionbar.extraActionButton.clean = E.private.skins.cleanBossButton
E.private.skins.cleanBossButton = nil
end
--Convert cropIcon to tristate
local cropIcon = E.db.general.cropIcon
if type(cropIcon) == 'boolean' then
E.db.general.cropIcon = (cropIcon and 2) or 0
if E.global.unitframe.DebuffHighlightColors then
E:CopyTable(E.global.unitframe.AuraHighlightColors, E.global.unitframe.DebuffHighlightColors)
E.global.unitframe.DebuffHighlightColors = nil
end
--Vendor Greys option is now in bags table
if E.db.general.vendorGrays ~= nil then
E.db.bags.vendorGrays.enable = E.db.general.vendorGrays
E.db.general.vendorGraysDetails = nil
E.db.general.vendorGrays = nil
if E.db.unitframe.filters.buffwatch then
E.db.unitframe.filters.aurawatch = E:CopyTable({}, E.db.unitframe.filters.buffwatch)
E.db.unitframe.filters.buffwatch = nil
end
--Heal Prediction is now a table instead of a bool
for _, unit in ipairs({'player','target','focus','pet','arena','party','raid','raid40','raidpet'}) do
if type(E.db.unitframe.units[unit].healPrediction) ~= 'table' then
local enabled = E.db.unitframe.units[unit].healPrediction
E.db.unitframe.units[unit].healPrediction = {}
E.db.unitframe.units[unit].healPrediction.enable = enabled
else
local healPrediction = E.db.unitframe.units[unit].healPrediction
if healPrediction.reversedAbsorbs ~= nil then -- convert the newer setting if it existed
healPrediction.reversedAbsorbs = nil
healPrediction.absorbStyle = 'REVERSED'
-- clear extras
healPrediction.showAbsorbAmount = nil
healPrediction.showOverAbsorbs = nil
elseif healPrediction.showAbsorbAmount ~= nil then -- convert the old setting into the new wrapped setting
healPrediction.showAbsorbAmount = nil
healPrediction.absorbStyle = 'WRAPPED'
-- clear extras
healPrediction.showOverAbsorbs = nil
elseif healPrediction.showOverAbsorbs ~= nil then -- convert the over absorb toggle into the new setting
healPrediction.absorbStyle = 'NORMAL'
healPrediction.showOverAbsorbs = nil
end
end
end
--Health Backdrop Multiplier
if E.db.unitframe.colors.healthmultiplier ~= nil then
if E.db.unitframe.colors.healthmultiplier > 0.75 then
E.db.unitframe.colors.healthMultiplier = 0.75
else
E.db.unitframe.colors.healthMultiplier = E.db.unitframe.colors.healthmultiplier
end
E.db.unitframe.colors.healthmultiplier = nil
end
--Tooltip FactionColors Setting
for i = 1, 8 do
local oldTable = E.db.tooltip.factionColors[''..i]
if oldTable then
local newTable = E:CopyTable({}, P.tooltip.factionColors[i]) -- import full table
E.db.tooltip.factionColors[i] = E:CopyTable(newTable, oldTable)
E.db.tooltip.factionColors[''..i] = nil
end
end
--v11 Nameplates Reset
if not E.db.v11NamePlateReset and E.private.nameplates.enable then
local styleFilters = E:CopyTable({}, E.db.nameplates.filters)
E.db.nameplates = E:CopyTable({}, P.nameplates)
E.db.nameplates.filters = E:CopyTable({}, styleFilters)
NamePlates:CVarReset()
E.db.v11NamePlateReset = true
end
-- Wipe some old variables off profiles
if E.global.uiScaleInformed then E.global.uiScaleInformed = nil end
if E.global.nameplatesResetInformed then E.global.nameplatesResetInformed = nil end
if E.global.userInformedNewChanges1 then E.global.userInformedNewChanges1 = nil end
-- cvar nameplate visibility stuff
if E.db.nameplates.visibility.nameplateShowAll ~= nil then
E.db.nameplates.visibility.showAll = E.db.nameplates.visibility.nameplateShowAll
E.db.nameplates.visibility.nameplateShowAll = nil
end
if E.db.nameplates.units.FRIENDLY_NPC.showAlways ~= nil then
E.db.nameplates.visibility.friendly.npcs = E.db.nameplates.units.FRIENDLY_NPC.showAlways
E.db.nameplates.units.FRIENDLY_NPC.showAlways = nil
end
if E.db.nameplates.units.FRIENDLY_PLAYER.minions ~= nil then
E.db.nameplates.visibility.friendly.minions = E.db.nameplates.units.FRIENDLY_PLAYER.minions
E.db.nameplates.units.FRIENDLY_PLAYER.minions = nil
end
if E.db.nameplates.units.ENEMY_NPC.minors ~= nil then
E.db.nameplates.visibility.enemy.minus = E.db.nameplates.units.ENEMY_NPC.minors
E.db.nameplates.units.ENEMY_NPC.minors = nil
end
if E.db.nameplates.units.ENEMY_PLAYER.minions ~= nil or E.db.nameplates.units.ENEMY_NPC.minions ~= nil then
E.db.nameplates.visibility.enemy.minions = E.db.nameplates.units.ENEMY_PLAYER.minions or E.db.nameplates.units.ENEMY_NPC.minions
E.db.nameplates.units.ENEMY_PLAYER.minions = nil
E.db.nameplates.units.ENEMY_NPC.minions = nil
end
-- removed override stuff from aurawatch
for _, spells in pairs(E.global.unitframe.buffwatch) do
for _, spell in pairs(spells) do
buffwatchConvert(spell)
end
end
for _, spell in pairs(E.db.unitframe.filters.buffwatch) do
buffwatchConvert(spell)
end
-- fix aurabars colors
local auraBarColors = E.global.unitframe.AuraBarColors
for spell, info in pairs(auraBarColors) do
if type(spell) == 'string' then
local spellID = select(7, GetSpellInfo(spell))
if spellID and not auraBarColors[spellID] then
auraBarColors[spellID] = info
auraBarColors[spell] = nil
spell = spellID
end
end
if type(info) == 'boolean' then
auraBarColors[spell] = { color = { r = 1, g = 1, b = 1 }, enable = info }
elseif type(info) == 'table' then
if info.r or info.g or info.b then
auraBarColors[spell] = { color = { r = info.r or 1, g = info.g or 1, b = info.b or 1 }, enable = true }
elseif info.color then -- azil created a void hole, delete it -x-
if info.color.color then info.color.color = nil end
if info.color.enable then info.color.enable = nil end
if info.color.a then info.color.a = nil end -- alpha isnt supported by this
end
end
end
if E.db.unitframe.colors.debuffHighlight.blendMode == 'MOD' then
E.db.unitframe.colors.debuffHighlight.blendMode = P.unitframe.colors.debuffHighlight.blendMode
end
do -- tooltip modifier code was dumb, change it but keep the past setting
local swap = ttModSwap(E.db.tooltip.modifierID)
if swap then E.db.tooltip.modifierID = swap end
swap = ttModSwap(E.db.tooltip.visibility.bags)
if swap then E.db.tooltip.visibility.bags = swap end
swap = ttModSwap(E.db.tooltip.visibility.unitFrames)
if swap then E.db.tooltip.visibility.unitFrames = swap end
swap = ttModSwap(E.db.tooltip.visibility.actionbars)
if swap then E.db.tooltip.visibility.actionbars = swap end
swap = ttModSwap(E.db.tooltip.visibility.combatOverride)
if swap then E.db.tooltip.visibility.combatOverride = swap end
-- remove the old combat variable and just use the mod since it supports show/hide states
local hideInCombat = E.db.tooltip.visibility.combat
if hideInCombat ~= nil then
E.db.tooltip.visibility.combat = nil
local override = E.db.tooltip.visibility.combatOverride
if hideInCombat and (override ~= 'SHIFT' and override ~= 'CTRL' and override ~= 'ALT') then -- wouldve been NONE but now it would be HIDE
E.db.tooltip.visibility.combatOverride = 'HIDE'
end
end
if E.global.unitframe.buffwatch then
E:CopyTable(E.global.unitframe.aurawatch, E.global.unitframe.buffwatch)
E.global.unitframe.buffwatch = nil
end
end
......
......@@ -118,7 +118,8 @@ colors.power[17] = colors.power.FURY
colors.power[18] = colors.power.PAIN
-- alternate power, sourced from FrameXML/CompactUnitFrame.lua
colors.power[10] = {0.7, 0.7, 0.6}
colors.power.ALTERNATE = {0.7, 0.7, 0.6}
colors.power[10] = colors.power.ALTERNATE
for i = 0, 3 do
colors.threat[i] = {GetThreatStatusColor(i)}
......
......@@ -18,34 +18,18 @@ A default texture will be applied if the widget is a StatusBar and doesn't have
## Options
.frequentUpdates - Indicates whether to use UNIT_POWER_FREQUENT instead UNIT_POWER_UPDATE to update the
bar (boolean)
.displayPairs - Use to override display pairs. (table)
.smoothGradient - 9 color values to be used with the .colorSmooth option (table)
.considerSelectionInCombatHostile - Indicates whether selection should be considered hostile while the unit is in
combat with the player (boolean)
.frequentUpdates - Indicates whether to use UNIT_POWER_FREQUENT instead UNIT_POWER_UPDATE to update the bar (boolean)
.displayPairs - Use to override display pairs. (table)
.smoothGradient - 9 color values to be used with the .colorSmooth option (table)
The following options are listed by priority. The first check that returns true decides the color of the bar.
.colorDisconnected - Use `self.colors.disconnected` to color the bar if the unit is offline (boolean)
.colorTapping - Use `self.colors.tapping` to color the bar if the unit isn't tapped by the player (boolean)
.colorThreat - Use `self.colors.threat[threat]` to color the bar based on the unit's threat status. `threat` is
defined by the first return of [UnitThreatSituation](https://wow.gamepedia.com/API_UnitThreatSituation) (boolean)
.colorPower - Use `self.colors.power[token]` to color the bar based on the player's additional power type
(boolean)
.colorClass - Use `self.colors.class[class]` to color the bar based on unit class. `class` is defined by the
second return of [UnitClass](http://wowprogramming.com/docs/api/UnitClass.html) (boolean)
.colorClassNPC - Use `self.colors.class[class]` to color the bar if the unit is a NPC (boolean)
.colorClassPet - Use `self.colors.class[class]` to color the bar if the unit is player controlled, but not a player
(boolean)
.colorSelection - Use `self.colors.selection[selection]` to color the bar based on the unit's selection color.
`selection` is defined by the return value of Private.UnitSelectionType, a wrapper function
for [UnitSelectionType](https://wow.gamepedia.com/API_UnitSelectionType) (boolean)
.colorReaction - Use `self.colors.reaction[reaction]` to color the bar based on the player's reaction towards the
unit. `reaction` is defined by the return value of
[UnitReaction](http://wowprogramming.com/docs/api/UnitReaction.html) (boolean)
.colorSmooth - Use `self.colors.smooth` to color the bar with a smooth gradient based on the player's current
additional power percentage (boolean)
.colorPower - Use `self.colors.power[token]` to color the bar based on the player's additional power type
(boolean)
.colorClass - Use `self.colors.class[class]` to color the bar based on unit class. `class` is defined by the
second return of [UnitClass](http://wowprogramming.com/docs/api/UnitClass.html) (boolean)
.colorSmooth - Use `self.colors.smooth` to color the bar with a smooth gradient based on the player's current
additional power percentage (boolean)
## Sub-Widget Options
......@@ -98,28 +82,15 @@ local ADDITIONAL_POWER_BAR_NAME = ADDITIONAL_POWER_BAR_NAME or 'MANA'
local ADDITIONAL_POWER_BAR_INDEX = ADDITIONAL_POWER_BAR_INDEX or 0
local ALT_MANA_BAR_PAIR_DISPLAY_INFO = ALT_MANA_BAR_PAIR_DISPLAY_INFO
local function UpdateColor(self, event, unit, powertype)
if(not (unit and UnitIsUnit(unit, 'player') and powertype == ADDITIONAL_POWER_BAR_NAME)) then return end
local function UpdateColor(self, event, unit, powerType)
if(not (unit and UnitIsUnit(unit, 'player') and powerType == ADDITIONAL_POWER_BAR_NAME)) then return end
local element = self.AdditionalPower
local r, g, b, t
if(element.colorDisconnected and not UnitIsConnected(unit)) then
t = self.colors.disconnected
elseif(element.colorTapping and not UnitPlayerControlled(unit) and UnitIsTapDenied(unit)) then
t = self.colors.tapped
elseif(element.colorThreat and not UnitPlayerControlled(unit) and UnitThreatSituation('player', unit)) then
t = self.colors.threat[UnitThreatSituation('player', unit)]
elseif(element.colorPower) then
if(element.colorPower) then
t = self.colors.power[ADDITIONAL_POWER_BAR_INDEX]
elseif(element.colorClass and UnitIsPlayer(unit)) or
(element.colorClassNPC and not UnitIsPlayer(unit)) or
(element.colorClassPet and UnitPlayerControlled(unit) and not UnitIsPlayer(unit)) then
local _, class = UnitClass(unit)
t = self.colors.class[class]
elseif(element.colorSelection and UnitSelectionType(unit, element.considerSelectionInCombatHostile)) then
t = self.colors.selection[UnitSelectionType(unit, element.considerSelectionInCombatHostile)]
elseif(element.colorReaction and UnitReaction(unit, 'player')) then
t = self.colors.reaction[UnitReaction(unit, 'player')]
elseif(element.colorClass) then
t = self.colors.class[playerClass]
elseif(element.colorSmooth) then
r, g, b = self:ColorGradient(element.cur or 1, element.max or 1, unpack(element.smoothGradient or self.colors.smooth))
end
......@@ -138,27 +109,23 @@ local function UpdateColor(self, event, unit, powertype)
end
end
if(element.PostUpdateColor) then
element:PostUpdateColor(unit, r, g, b)
end
end
local function ColorPath(self, ...)
--[[ Override: AdditionalPower.UpdateColor(self, event, unit, ...)
Used to completely override the internal function for updating the widgets' colors.
--[[ Callback: AdditionalPower:PostUpdateColor(r, g, b)
Called after the element color has been updated.
* self - the parent object
* event - the event triggering the update (string)
* unit - the unit accompanying the event (string)
* ... - the arguments accompanying the event
* self - the AdditionalPower element
* r - the red component of the used color (number)[0-1]
* g - the green component of the used color (number)[0-1]
* b - the blue component of the used color (number)[0-1]
--]]
(self.AdditionalPower.UpdateColor or UpdateColor) (self, ...)
if(element.PostUpdateColor) then
element:PostUpdateColor(r, g, b)
end
end
local function Update(self, event, unit, powertype)
if(not (unit and UnitIsUnit(unit, 'player') and powertype == ADDITIONAL_POWER_BAR_NAME)) then return end
local function Update(self, event, unit, powerType)
if(not (unit and UnitIsUnit(unit, 'player') and powerType == ADDITIONAL_POWER_BAR_NAME)) then return end
local element = self.AdditionalPower
--[[ Callback: AdditionalPower:PreUpdate(unit)
Called before the element has been updated.
......@@ -169,30 +136,23 @@ local function Update(self, event, unit, powertype)
element:PreUpdate(unit)
end
local cur = UnitPower('player', ADDITIONAL_POWER_BAR_INDEX)
local max = UnitPowerMax('player', ADDITIONAL_POWER_BAR_INDEX)
local cur, max = UnitPower('player', ADDITIONAL_POWER_BAR_INDEX), UnitPowerMax('player', ADDITIONAL_POWER_BAR_INDEX)
element:SetMinMaxValues(0, max)
if not UnitIsConnected(unit) then
element:SetValue(max)
else
element:SetValue(cur)
end
element:SetValue(cur)
element.cur = cur
element.max = max
--[[ Callback: AdditionalPower:PostUpdate(unit, cur, max)
--[[ Callback: AdditionalPower:PostUpdate(cur, max)
Called after the element has been updated.
* self - the AdditionalPower element
* unit - the unit for which the update has been triggered (string)
* cur - the current value of the player's additional power (number)
* max - the maximum value of the player's additional power (number)
--]]
if(element.PostUpdate) then
return element:PostUpdate(unit, cur, max, event) -- ElvUI adds event
return element:PostUpdate(cur, max, event) -- ElvUI adds event
end
end
......@@ -207,28 +167,20 @@ local function Path(self, ...)
--]]
(self.AdditionalPower.Override or Update) (self, ...);
ColorPath(self, ...)
--[[ Override: AdditionalPower.UpdateColor(self, event, unit, ...)
Used to completely override the internal function for updating the widgets' colors.
* self - the parent object
* event - the event triggering the update (string)
* unit - the unit accompanying the event (string)
* ... - the arguments accompanying the event
--]]
(self.AdditionalPower.UpdateColor or UpdateColor) (self, ...)
end
local function ElementEnable(self)
local element = self.AdditionalPower
if(element.colorDisconnected) then
self:RegisterEvent('UNIT_CONNECTION', ColorPath)
end
if(element.colorSelection) then
self:RegisterEvent('UNIT_FLAGS', ColorPath)
end
if(element.colorTapping) then
self:RegisterEvent('UNIT_FACTION', ColorPath)
end
if(element.colorThreat) then
self:RegisterEvent('UNIT_THREAT_LIST_UPDATE', ColorPath)
end
if(element.frequentUpdates) then
self:RegisterEvent('UNIT_POWER_FREQUENT', Path)
else
......@@ -239,37 +191,21 @@ local function ElementEnable(self)
element:Show()
-- ElvUI block
if element.PostUpdateVisibility then
element:PostUpdateVisibility(true, not element.isEnabled)
end
element.isEnabled = true
-- end block
element.__isEnabled = true
Path(self, 'ElementEnable', 'player', ADDITIONAL_POWER_BAR_NAME)
end
local function ElementDisable(self)
local element = self.AdditionalPower
self:UnregisterEvent('UNIT_MAXPOWER', Path)
self:UnregisterEvent('UNIT_POWER_FREQUENT', Path)
self:UnregisterEvent('UNIT_POWER_UPDATE', Path)
self:UnregisterEvent('UNIT_CONNECTION', ColorPath)
self:UnregisterEvent('UNIT_FACTION', ColorPath)
self:UnregisterEvent('UNIT_FLAGS', ColorPath)
self:UnregisterEvent('UNIT_THREAT_LIST_UPDATE', ColorPath)
self.AdditionalPower:Hide()
-- ElvUI block
local element = self.AdditionalPower
if element.PostUpdateVisibility then
element:PostUpdateVisibility(false, element.isEnabled)
end
element.isEnabled = false
-- end block
element:Hide()