[BUG] Wow classic DK unholy runes are not calculated correctly
Alqua1 opened this issue ยท 2 comments
Before You Begin
- I confirm that I have downloaded the latest version of the addon.
- I am not playing on a private server.
- I checked for an existing, open ticket for this issue and was not able to find one.
- I edited the title of this bug report (above) so that it describes the issue I am reporting.
Describe the Issue
Hi Hekili,
I noticed that unholy runes are not calculated correctly. I used death and decay to trigger all the runes, but unholy ones didn't change. So, I made a small logic in the addon (which has no impact, just to see the values):
blood_runes.time_to_max | frost_runes.time_to_max | unholy_runes.time_to_max | blood_runes.current | frost_runes.current | unholy_runes.current
That is not only affecting "time to max", it's also affecting ".current". Since it's not checking the correct rune, the current unholy runes are always shown as 2. This will affect the performance of other specs / presence which are using unholy of course.
How to Reproduce
Use any unholy spender and check the following:
unholy_runes.time_to_max | unholy_runes.current
You'll see that current runes are 2 and it shows 0 (which means ready)
Player Information (Link)
Floorqua @ Mankrik
Error Messages (Link)
There is no bug sack or bug grabber. Because the problem is not throwing a bug, the problem is querying a non existing rune.
Additional Information
I think the error is while registering or resetting the unholy runes. I check this function:
spec:RegisterResource( Enum.PowerType.RuneUnholy
And here you wrote that:
Line 320: for i = 5, 6 do
Line 321: local start, duration, ready = GetRuneCooldown( i + 2 )
Line 326: t.expiry[ i - 4 ] = ready and 0 or start + duration
So, actually, you're checking the rune number 7 and 8, but those don't belong to unholy runes (maybe not exist).
I don't know the reason why you started the loop with 5,6 and adding by 2 in line 321. Maybe there's a reason behind it, idk.
If I change Line 321 as i - 2, it works correctly.
Line 320: for i = 5, 6 do ==> No change
Line 321: local start, duration, ready = GetRuneCooldown( i - 2 ) ==> Before it was i + 2, now it's i - 2
Line 326: t.expiry[ i - 4 ] = ready and 0 or start + duration ==> No change
OR we can start i from 1,2:
Line 320: for i = 1, 2 do ==> Before it was 5,6 now it's 1,2
Line 321: local start, duration, ready = GetRuneCooldown( i + 2 ) ==> No change
Line 326: t.expiry[ i ] = ready and 0 or start + duration ==> Before it was i - 4 now it's only i
Contact Information
I'm Alqua in your discord (Taylan#2203)
Yeah, good catch. I spent so much time looking at runes the other night that I went cross-eyed. Having the rune order wonky in the default UI was a really fun and exciting twist that I could've done without.