File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 423423local function ShortenUnitName (unit , maxChars )
424424 if not unit or not UnitExists (unit ) then return " " end
425425 local unitName = UnitName (unit ) or " "
426+ if UUF :IsSecretValue (unitName ) then
427+ return unitName
428+ end
426429 if maxChars and maxChars > 0 then
427430 unitName = string.format (" %." .. maxChars .. " s" , unitName )
428431 end
Original file line number Diff line number Diff line change @@ -367,6 +367,10 @@ function UUF:CleanTruncateUTF8String(text)
367367 return text
368368end
369369
370+ function UUF :IsSecretValue (value )
371+ return type (value ) == " number" and type (issecretvalue ) == " function" and issecretvalue (value )
372+ end
373+
370374function UUF :GetSecondaryPowerType ()
371375 local class = select (2 , UnitClass (" player" ))
372376 local spec = C_SpecializationInfo .GetSpecialization ()
Original file line number Diff line number Diff line change @@ -2,6 +2,9 @@ local _, UUF = ...
22
33local function ShortenCastName (text , maxChars )
44 if not text then return " " end
5+ if UUF :IsSecretValue (text ) then
6+ return text
7+ end
58 if maxChars and maxChars > 0 then
69 text = string.format (" %." .. maxChars .. " s" , text )
710 end
You can’t perform that action at this time.
0 commit comments