Skip to content

Commit

Permalink
Fixed an issue where UnitFullName doesn't return the realm name for u…
Browse files Browse the repository at this point in the history
…nits in the same realm as the player, but return the realm if querying the player itself
  • Loading branch information
Tercioo committed Nov 11, 2023
1 parent 7a5529d commit daaa3a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions boot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
local addonName, Details222 = ...
local version, build, date, tocversion = GetBuildInfo()

Details.build_counter = 12031
Details.alpha_build_counter = 12031 --if this is higher than the regular counter, use it instead
Details.build_counter = 12032
Details.alpha_build_counter = 12032 --if this is higher than the regular counter, use it instead
Details.dont_open_news = true
Details.game_version = version
Details.userversion = version .. " " .. Details.build_counter
Expand Down
5 changes: 4 additions & 1 deletion functions/classes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,10 @@ do
--UnitFullName is guarantee to return the realm name of the unit queried
local playerName, realmName = UnitFullName(unitId)
if (playerName) then
realmName = realmName:gsub("%s", "")
if (not realmName) then
realmName = GetRealmName()
end
realmName = realmName:gsub("[%s-]", "")

playerName = playerName .. "-" .. realmName

Expand Down

0 comments on commit daaa3a7

Please sign in to comment.