Skip to content

Commit

Permalink
Make guid formatter a bit more resilent
Browse files Browse the repository at this point in the history
  • Loading branch information
InfusOnWoW committed Jan 16, 2024
1 parent 52e24c6 commit 1be6f9a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions WeakAuras/Types.lua
Original file line number Diff line number Diff line change
Expand Up @@ -685,15 +685,15 @@ Private.format_types = {
if abbreviateFunc then
return function(guid)
local ok, _, class, _, _, _, name, realm = pcall(GetPlayerInfoByGUID, guid)
if ok then
if ok and name then
local name = abbreviateFunc(nameFunc(name, realm))
return colorFunc(class, name)
end
end
else
return function(guid)
local ok, _, class, _, _, _, name, realm = pcall(GetPlayerInfoByGUID, guid)
if ok then
if ok and name then
return colorFunc(class, nameFunc(name, realm))
end
end
Expand All @@ -702,14 +702,14 @@ Private.format_types = {
if abbreviateFunc then
return function(guid)
local ok, _, class, _, _, _, name, realm = pcall(GetPlayerInfoByGUID, guid)
if ok then
if ok and name then
return abbreviateFunc(nameFunc(name, realm))
end
end
else
return function(guid)
local ok, _, class, _, _, _, name, realm = pcall(GetPlayerInfoByGUID, guid)
if ok then
if ok and name then
return nameFunc(name, realm)
end
end
Expand Down

0 comments on commit 1be6f9a

Please sign in to comment.