10.2 always send the realm name even if the unit is from the player's realm, this patch fixes the issues caused by the change

This commit is contained in:
Tercio Jose
2023-10-28 16:03:01 -03:00
parent b304b3bbe4
commit f870036f06
8 changed files with 125 additions and 234 deletions
+19
View File
@@ -101,6 +101,10 @@ do
CONTAINER_ENEMYDEBUFFTARGET_CLASS = 11
}
local UnitName = UnitName
local GetRealmName = GetRealmName
local initialSpecListOverride = {
[1455] = 251, --dk
[1456] = 577, --demon hunter
@@ -170,6 +174,21 @@ do
end
end
function Details:GetFullName(unitId)
local playerName, realmName = UnitName(unitId)
if (not realmName) then
realmName = GetRealmName()
end
return playerName .. "-" .. realmName
end
local _, _, _, toc = GetBuildInfo() --check game version to know which version of GetFullName to use
if (toc < 100200) then
Details.GetFullName = Details.GetCLName
end
function Details:Class(actor)
return self.classe or actor and actor.classe
end