All of the (if not, atleast a lot of the) PLAYER_* events are something we like to call "unitless events", basically the first argument is not the unit affected, in this case, the first argument would be "player".
The way oUF handles these events is you have to register them in a special way, like so:
Code:
oUF.Tags.SharedEvents['PLAYER_UNGHOST'] = true
oUF.Tags.SharedEvents['PLAYER_DEAD'] = true
oUF.Tags.SharedEvents['PLAYER_ALIVE'] = true
oUF.Tags.Events['enhdead'] = 'UNIT_CONNECTION PLAYER_UNGHOST PLAYER_DEAD PLAYER_ALIVE'
oUF.Tags.Methods['enhdead'] = function(u)
if(UnitIsDead(u)) then
return 'Dead'
elseif(UnitIsGhost(u)) then
return 'Ghost'
elseif(not UnitIsConnected(u)) then
return 'Off'
end
end