realUnit
freebaser opened this issue ยท 9 comments
argument.
oUF.Tags['freebgrid:name'] = function(u, r)
local name = UnitName(r or u) or "unknown"
return name
end
Tied to UNIT_NAME_UPDATE when I switch to a vehicle, r is still nil.
I'm still not able to reproduce it.
I'm seeing the following when switching to a vehicle here:
1119.05| unit: target realUnit: nil
1119.05| unit: vehicle realUnit: player
1119.06| unit: player realUnit: pet
1119.06| unit: player realUnit: pet
Thats odd... I'm not sure what is different but I still get nothing from that argument. Also, how would I define realUnit as a global?
You don't define realUnit. It should only exist as an argument to the function. That being said, oUF creates a fake global environment for the tags, which contain some special globals. I was unsure if you thought realUnit existed among those.
I found my issue, realUnit is only updated for player/pet frames. I want to use it for all units. Is that possible?
It should be update for all units, there might however be issues with range on party members.
Seems my issue was using a tag inside the PostUpdate health. Passing unit through the function will not work with realunit. You can close this if you like.