Merge branch 's9'

This commit is contained in:
andrew6180
2023-12-06 06:31:35 -07:00
4 changed files with 7 additions and 27 deletions
@@ -1089,7 +1089,7 @@ function UpdateCount(self)
end
else
local charges, maxCharges = self:GetCharges()
if charges and maxCharges and maxCharges > 1 then
if charges and maxCharges and maxCharges > 0 then
self.count:SetText(charges)
else
self.count:SetText("")
@@ -1101,7 +1101,7 @@ function UpdateCooldown(self)
local start, duration, enable = self:GetCooldown()
local charges, maxCharges, chargeStart, chargeDuration = self:GetCharges()
local hasCharges = false
if charges and maxCharges and maxCharges > 1 and charges < maxCharges then
if charges and maxCharges and maxCharges > 0 and charges < maxCharges then
hasCharges = charges > 0
start, duration, enable = chargeStart, chargeDuration, 1
end
-19
View File
@@ -232,16 +232,6 @@ function NP:ScalePlate(nameplate, scale, targetPlate)
if not nameplate then return end
nameplate:SetScale(scale * E.mult)
if nameplate ~= NP.currentTarget then
if scale > 1 then
nameplate:SetFrameLevel(30)
elseif scale < 1 then
nameplate:SetFrameLevel(10)
else
nameplate:SetFrameLevel(20)
end
end
if targetPlate then
NP.targetPlate = nameplate
end
@@ -417,16 +407,11 @@ function NP:SetupTarget(nameplate, removed)
local cp = NP.db.units.TARGET.classpower or {}
if removed and nameplate then
nameplate:SetFrameLevel(20)
if NP.currentTarget == nameplate then
NP.currentTarget = nil
end
elseif nameplate then
if NP.currentTarget and NP.currentTarget ~= nameplate then
NP.currentTarget:SetFrameLevel(20)
end
NP.currentTarget = nameplate
nameplate:SetFrameLevel(100)
end
if removed or not nameplate or not cp.enable then
@@ -645,10 +630,6 @@ function NP:NamePlateCallBack(nameplate, event, unit)
NP:StyleFilterEventWatch(nameplate) -- fire up the watcher
NP:StyleFilterSetVariables(nameplate) -- sets: isTarget, isTargetingMe, isFocused
if (NP.db.fadeIn and not NP.SkipFading) and nameplate.frameType ~= 'PLAYER' then
NP:PlateFade(nameplate, 0.5, 0, 1)
end
elseif event == 'NAME_PLATE_UNIT_REMOVED' then
if nameplate.isTarget then
NP:ScalePlate(nameplate, 1, true)
+5 -4
View File
@@ -554,10 +554,11 @@ function mod:StyleFilterSetChanges(frame, actions, HealthColor, PowerColor, Bord
c.Scale = true
mod:ScalePlate(frame, actions.scale)
end
if Alpha then
c.Alpha = true
mod:PlateFade(frame, mod.db.fadeIn and 0.5 or 0, frame:GetAlpha(), actions.alpha * 0.01)
end
-- if Alpha then
-- c.Alpha = true
-- mod:PlateFade(frame, mod.db.fadeIn and 0.5 or 0, frame:GetAlpha(), actions.alpha * 0.01)
-- end
if Portrait then
c.Portrait = true
mod:Update_Portrait(frame)
-2
View File
@@ -405,7 +405,6 @@ NamePlates.generalGroup.args.spacer1 = ACH:Spacer(6, 'full')
NamePlates.generalGroup.args.lowHealthThreshold = ACH:Range(L["Low Health Threshold"], L["Make the unitframe glow when it is below this percent of health."], 11, { min = 0, softMax = .5, max = .8, step = .01, isPercent = true })
NamePlates.generalGroup.args.loadDistance = ACH:Range(L["Load Distance"], L["Only load nameplates for units within this range."], 12, { min = 5, max = 61, step = 1 }, nil, nil, nil, nil)
NamePlates.generalGroup.args.highlight = ACH:Toggle(L["Hover Highlight"], nil, 13, nil, nil, 125)
NamePlates.generalGroup.args.fadeIn = ACH:Toggle(L["Alpha Fading"], nil, 14, nil, nil, 125)
NamePlates.generalGroup.args.spacer2 = ACH:Spacer(15, 'full')
NamePlates.generalGroup.args.plateVisibility = ACH:Group(L["Visibility"], nil, 50)
@@ -558,7 +557,6 @@ NamePlates.enemyPlayerGroup = GetUnitSettings('ENEMY_PLAYER', L["ENEMY_PLAYER"])
NamePlates.enemyNPCGroup = GetUnitSettings('ENEMY_NPC', L["ENEMY_NPC"])
NamePlates.targetGroup = ACH:Group(L["Target"], nil, 101, nil, function(info) return E.db.nameplates.units.TARGET[info[#info]] end, function(info, value) E.db.nameplates.units.TARGET[info[#info]] = value NP:SetCVars() NP:ConfigureAll() end, function() return not E.NamePlates.Initialized end)
NamePlates.targetGroup.args.nonTargetAlphaShortcut = ACH:Execute(L["Non-Target Alpha"], nil, 1, function() C:StyleFilterSetConfig('ElvUI_NonTarget'); ACD:SelectGroup('ElvUI', 'nameplates', 'stylefilters', 'actions') end)
NamePlates.targetGroup.args.targetScaleShortcut = ACH:Execute(L["Scale"], nil, 2, function() C:StyleFilterSetConfig('ElvUI_Target'); ACD:SelectGroup('ElvUI', 'nameplates', 'stylefilters', 'actions') end)
NamePlates.targetGroup.args.spacer1 = ACH:Spacer(3, 'full')
NamePlates.targetGroup.args.glowStyle = ACH:Select(L["Target/Low Health Indicator"], nil, 4, { none = L["None"], style1 = L["Border Glow"], style2 = L["Background Glow"], style3 = L["Top Arrow"], style4 = L["Side Arrows"], style5 = L["Border Glow"]..' + '..L["Top Arrow"], style6 = L["Background Glow"]..' + '..L["Top Arrow"], style7 = L["Border Glow"]..' + '..L["Side Arrows"], style8 = L["Background Glow"]..' + '..L["Side Arrows"] }, nil, 225)