I can get BaseAddress from UnitID by 0x0060C1F0 and then get GUID with offset but, if i do this, i must register other similar functions with own checks to push value, f.e.
Code:
_UnitName = UnitName
function UnitName(unitIDorGUID)
if string.match(unitIDorGUID, "0x") then
return ObjectName(unitIDorGUID) -- registered C function, gets UnitName through ObjectManager like Obj -> Name
else
return _UnitName(unitIDorGUID)
end
end
but in this way i need to recode all lua functions, it is a bad way as i think, and i need to detour Script_GetGUIDFromToken, but i dont know how to do it properly