Removed "None" text in spells tooltip

Also fixed issue where non-spell bindings wouldn't show on dead players
This commit is contained in:
OldManAlpha 2025-09-08 18:15:43 -07:00
parent 5e4a63d651
commit 224f329d08

View File

@ -297,8 +297,10 @@ function ApplySpellsTooltip(attachTo, unit, owner)
powerText = colorize(powerText, powerColor)
end
local modifier = util.GetKeyModifierTypeByID(1 + (options.AbbreviatedKeys and 2 or 0) + (options.ColoredKeys and 1 or 0))
SpellsTooltip:AddDoubleLine(modifier, showPowerBar and " " or powerText, 1, 1, 1)
local modifier = GetKeyModifier()
local displayModifier = modifier ~= "None" and
util.GetKeyModifierTypeByID(1 + (options.AbbreviatedKeys and 2 or 0) + (options.ColoredKeys and 1 or 0)) or " "
SpellsTooltip:AddDoubleLine(displayModifier, showPowerBar and " " or powerText, 1, 1, 1)
local friendly = not UnitCanAttack("player", unit)
@ -315,7 +317,7 @@ function ApplySpellsTooltip(attachTo, unit, owner)
end
--StartTiming("BindingDisplays")
local entries = UpdateBindingDisplays(friendly and "Friendly" or "Hostile", GetKeyModifier())
local entries = UpdateBindingDisplays(friendly and "Friendly" or "Hostile", modifier)
--EndTiming("BindingDisplays")
for _, button in ipairs(PTOptions.Buttons) do
local focused = not CurrentlyHeldButton or button == CurrentlyHeldButton