Highlighting lifebloom with pandemic
Update: https://www.wowinterface.com/downloa...bloomGlow.html
For anyone looking for an addon version of the code posted below. --------------------------------------------------------------------------------------------------------------------- This person has a script that highlights lifebloom on normal raid frames when it's in pandemic range. Wondering how complex this would be to reproduce. This is especially useful for lifebloom as you can "bloom" it when it is in this range. |
It seems I've gotten this to work how I want to it work using some hacky timer code.
I'm a bit stumped still on how to get the "dispellable" white border around the icon though. Quote:
|
I play (badly) a resto druid. What is this about?
|
Quote:
Since it is based on a hidden timer, there's no way to know if you can re-cast it to get the bloom effect or not. It's all guessing. On live, it can be anywhere from 4.5 seconds to 5.85 seconds from my testing. So, I wanted to have some code that highlights lifebloom on raid frames when it is in this essential window so you don't have to guess anymore. Still not 100% there yet, unfortunately--although I know it is possible from that screenshot I showed. |
Thanks for that. What does it have to do with pandemic range? Or was that just some use for it?
|
Pandemic was a spell for warlocks back in MoP (I think MoP) that allowed you to refresh dots up to 50% without losing any of the damage (aka the dot would just rollover into the new one you casted)
Now that ability is baked in to everything in the game at 30% all hots/dots "rollover," and pandemic is just what people have called it. |
Did you make progress on this topic? For the glow effect people usually use this code:
Lua Code:
|
That code only works on target and focus frames. CompactUnitFrames don't have a Stealable:Show() argument (returns nil) attached to their buff icons because technically you aren't able to steal/purge anything off a friendly target.
|
So, for anyone potentially following the thread..
I have finished this finally, and have working code for BfA. (A couple things were removed from UnitBuff, namely spell rank, so this code won't specifically work on live but it's easily fixable if you so choose) The only, and major problem is that this doesn't update often enough when I need it to. If anyone has any suggestions on how I can update it more frequently, I'm open to suggestion. It updates every time an aura gets updated (applied or removed), but for this to be truly perfect it would probably need to update at least every half second with lifebloom up, regardless of anything else. As a result, sometimes even though LB can be manually "bloomed" at 5.5 seconds, the highlight won't appear until after that. The amount of time after that varies depending on how often auras are being updated for the unit. Lua Code:
|
If you wanted (needed?) it to update every frame, wouldn't it be easier to just hook TargetFrame_OnUpdate and CompactUnitFrame_OnUpdate?
Just be careful that your code not be too demanding so that having it run every frame doesn't risk causing performance issues, and it should be okay. It's not usually recommended to hook OnUpdate, and maybe there's a better solution, but if you absolutely need it to run every frame then OnUpdate is your solution (that's what OnUpdate does, after all.) You could throttle it within the hook function if you needed to, to make it run only every other frame, which may help if performance ever became an issue. |
Quote:
|
Quote:
I was hooking buffFrame to OnUpdate, and it worked well, but it was just too much considering it only really needs to be a fraction of that for 30% of the time a single buff is active. Although I'm unconvinced--maybe in practice there's enough UNIT_AURA events firing that it won't be a real issue, but if not I'll go back to OnUpdate if needed. Quote:
Lua Code:
|
So, here is the code for running on a throttled OnUpdate (just change the update interval to whatever you want).
Note: I only really care about raid frames being highly accurate, and I left the target frame how it was. Fair warning, it's quite a bit more taxing on your CPU. It's a lot more reliable though, and probably what I will be using. This code is for legion, but just remove the underscore next to buffName on line 21 and it will work for BfA. Lua Code:
|
Lua Code:
frame.displayedUnit gets accessed quite often, so maybe a local variable is warranted. I would suggest fixing indentation of lines 27-40, otherwise Lua Code:
Also, I would have tried to track the player I cast Lifebloom. |
It turns out the OnUpdate code was unnecessary. Lifebloom doesn't update often enough when you just have your own buffs, but CompactUnitFrame_UtilSetBuff fires very often under normal use case, resulting in desired accuracy.
https://www.wowinterface.com/downloa...bloomGlow.html For anyone following the thread or people coming from google, here is the addon if you don't want to worry about what to do with code or whatever. Cheers :banana: |
All times are GMT -6. The time now is 09:32 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI