Destro Lock Soul Shard tracking in 7.2.5
So I just NOW realized the changes to destro locks kinda broke my ouf module for soul shard display for Roth UI, is doesn't show partially filled shards, they are only ever empty or full. This is annoying.
Now that i am aware of the problem, I look back to see how zork handled burning embers, and it was relatively straightforward, however, it relied on an api call for "MAX_POWER_PER_EMBER" but an equivalent for shards doesn't seem to exist, and i can't find any actual documentation of changes to the api in patch 7.2.5 If someone would be able to assist with either helping me check for partially filled shards, or point me to something that shows the diffs between 7.2 and 7.2.5 api's that'd be great. |
To get number of fragments per shard, a.k.a. modifier, you need to use this:
Lua Code:
Here's a quote of my post from another thread regarding UnitPower and its return. Quote:
Everything else is simple maths. |
Thank you very much!
|
I've been trying to implement this and I've had great success making the addon determine when there is an extra "half shard" ontop of the shards held (IE a shard is being made but not completed yet)
However, I'm hitting a wall when it comes to implementing it into a usable form. What I WANT it to do, when a shard is full, the shard icon will be purple, if it is being created, it will be green. However the closest I can get is full shards are purple, and when a shard is being created, it turns all the empty slots green, instead of just the next shard slot. Here's my code; Lua Code:
The important part is Lua Code:
I don't know how to make the second if function ( if(i > cur) then ) select the NEXT shard icon only. The local "orb2" was an attempt at having it select the next shard when it fills the previous, however when I change the second if condition's "orb.fill" with "orb2.fill" it gives me an error saying it's a nil value. It's been awhile since i've done coding and I just can't figure this one out. Probably doesn't help I haven't slept in 26hrs >< |
You're clearly using oUF, why don't you use default element? It supports all types of class powers :p
Also, not being able to see how full is one's shard is kinda bad. |
As lightspark suggested, use the ClassPower element and add this PostUpdate callback:
Lua Code:
|
All times are GMT -6. The time now is 09:23 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI