API not updating inside Events
hey guys
i was made a simple mod to see my mana regeneration but its not updating the value properly Lua Code:
the value isn't updating properly. its like one step behind. when i trigger it by applying an aura i get the old value when the aura is on and when the aura is off i get the value as if it was on how could i fix this ?? im trying this on classic tyvm |
Does this sound like what is happening to your numbers ?
https://us.forums.blizzard.com/en/wo...-values/253725 |
I don't have a way to test currently, but it sounds like you're not using the correct event. Stat changes usually trigger off their own event(s). UNIT_AURA merely signals that the list of buffs has changed, not necessarily that the server has applied any effects of said buffs yet.
Quote:
|
Quote:
Quote:
i have checked out all the stat related events, there are a few such as melee/ranged attack power, defense and such but no specific event for mana regen. how would i update mana regen then? like i said it does update with unit_aura but it starts lagging behind, being like 1 step back every time the value changes. |
PaperDollFrame seems to just register all the stat events including UNIT_AURA and flag an update through OnUpdate.
https://www.townlong-yak.com/framexm...lFrame.lua#383 https://www.townlong-yak.com/framexm...lFrame.lua#397 I'm only seeing UNIT_RESISTANCE fire from toggling Mage Armor on Classic. I don't know of any similar spells on Retail that I can test this with to see if it's just disabled on Classic or if Blizzard is piggybacking off other stats updating. Note: Mage armor does have a resistance component, so watching only that isn't ideal either. |
Quote:
|
Quote:
Then you can use UNIT_AURA and UNIT_STATS, should work just fine :) |
All times are GMT -6. The time now is 10:15 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI