mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 14:50:13 -05:00
Inverted alpha settings for custom counters watching spell charges
For charges, being full is the default state, so we need to treat full the same as health or mana being full. (ticket #231) Also fixed the "target" variable never getting set on custom counters or custom counter bars because they were overriding the PLAYER_TARGET_CHANGED event that the base class was registering. Also also fixed numeric display mode for custom counters not using the correct gradient scaling when the number hit 0. It was using the same scaling as graphical mode where 0 displays nothing and needs to be accounted for separately.
This commit is contained in:
@ -130,7 +130,6 @@ function IceStackCounter_Enable(frame)
|
||||
frame:RegisterEvent("UNIT_PET", "UpdateCustomCount")
|
||||
frame:RegisterEvent("PLAYER_PET_CHANGED", "UpdateCustomCount")
|
||||
frame:RegisterEvent("PLAYER_FOCUS_CHANGED", "UpdateCustomCount")
|
||||
frame:RegisterEvent("PLAYER_TARGET_CHANGED", "UpdateCustomCount")
|
||||
frame:RegisterEvent("PLAYER_DEAD", "UpdateCustomCount")
|
||||
frame:RegisterEvent("SPELL_UPDATE_CHARGES", "UpdateCustomCount")
|
||||
|
||||
@ -171,5 +170,9 @@ function IceStackCounter_GetCount(frame)
|
||||
end
|
||||
|
||||
function IceStackCounter_UseTargetAlpha(frame)
|
||||
return frame.lastPoints ~= nil and frame.lastPoints > 0
|
||||
if frame.moduleSettings.auraType == "charges" then
|
||||
return IceStackCounter_GetCount(frame) ~= IceStackCounter_GetMaxCount(frame) or frame.target or frame.combat
|
||||
else
|
||||
return frame.lastPoints ~= nil and frame.lastPoints > 0
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user