Events for Ghost, Dead, Offline
Hey, I have the following tag:
Code:
oUF.Tags.Events["enhdead"] = "UNIT_CONNECTION".." PLAYER_UNGHOST".." PLAYER_DEAD".." PLAYER_ALIVE" |
Change
Code:
oUF.Tags.Events["enhdead"] = "UNIT_CONNECTION".." PLAYER_UNGHOST".." PLAYER_DEAD".." PLAYER_ALIVE" Code:
oUF.Tags.Events["enhdead"] = "UNIT_HEALTH" |
Thanks for trying to help, but I'll just quote myself:
Quote:
|
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 |
Quote:
Code:
if(fontstring:IsVisible() and (unitlessEvents[event] or fontstring.parent.unit == unit)) then Quote:
Your layout is presumably already responding to UNIT_HEALTH and UNIT_AURA to update things like health bars and buff icons, so having it additionally update your Dead/Offline/Ghost text on those events is really not adding any significant overhead. |
Quote:
|
Aww crud, I kinda forgot that PLAYER* probably doesn't fire for raid units... Still, UNIT_HEALTH does feel like the wrong event, it fires quite a bit and this is not really neede for dead etc. I'm not sure UNIT_HEALTH is used anywhere else, health uses UNIT_HEALTH_FREQUENT nowadays, doesn't it? On the other hand, it fires for becoming ghost as well, so no need for UNIT_AURA :)
Thanks for all your help! |
You don't need to watch for UNIT_AURA to get the ghost status. UNIT_HEALTH suffices because dead and ghosted players have different health (yes, this is strange).
UNIT_HEALTH_FREQUENT (UHF) is just the same as UNIT_HEALTH (UH) but fires a lot more frequently. I personally find the lags of UH hardly noticeable and as I don't play a healer I'm not that interested in health status, thus I use UH for my raid frames. The only place currently where you have to use UHF is boss frames, because there seems to be a bug there which causes only the targeted boss' health to update if you use UH. |
All times are GMT -6. The time now is 09:12 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI