Fixed an issue where UnitFullName doesn't return the realm name for units in the same realm as the player, but return the realm if querying the player itself
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user