WoWInterface (
-   General Authoring Discussion (
-   -   Classic: UnitHealth() has large delay - how to avoid? (

Basil2 09-04-19 04:59 PM

Classic: UnitHealth() has large delay - how to avoid?
It looks like that player's HP returned by UnitHealth() are updated with delay about 500 ms.

So when I handle UNIT_SPELLCAST_STOP event after succefull heal, UnitHealth() still returns old hp value for half second after cast!

My WoW ping is 40ms, and I have no such problem with actual WoW.

Any ways to avoid this problem?

zork 09-05-19 02:38 AM

Maybe the unit does not have frequent health updates registered?
UNIT_HEALTH triggering not so often has always been the case.

If you have access to the unitframe adding UNIT_HEALTH_FREQUENT might help.

Basil2 09-05-19 10:41 AM

Actually the unit is the player, so I expected that player's health updates are extremely frequent.

I tried UNIT_HEALTH_FREQUENT but it doesn't help :( I just receive it with delay over 200ms, even for a player.

I also tried to calculate health manually right after cast, but UNIT_HEAL_PREDICTION doesn't exist :(

All times are GMT -6. The time now is 03:09 PM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI