Skip to content

Commit 808e8a6

Browse files
committed
we just return full unit name for now until i can look at this
1 parent cdf2ebf commit 808e8a6

3 files changed

Lines changed: 10 additions & 0 deletions

File tree

Core/Config/TagsDatabase.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,9 @@ end
423423
local 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

Core/Globals.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,10 @@ function UUF:CleanTruncateUTF8String(text)
367367
return text
368368
end
369369

370+
function UUF:IsSecretValue(value)
371+
return type(value) == "number" and type(issecretvalue) == "function" and issecretvalue(value)
372+
end
373+
370374
function UUF:GetSecondaryPowerType()
371375
local class = select(2, UnitClass("player"))
372376
local spec = C_SpecializationInfo.GetSpecialization()

Elements/CastBar.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ local _, UUF = ...
22

33
local 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

0 commit comments

Comments
 (0)