Neuron

Neuron

98.2k Downloads

On GCD cooldown Boneshield stacks aren't showing

TruthNZ opened this issue ยท 15 comments

commented

Release: 1.0.4b. Death Knight: Blood

Marrowrend normally shows the current Boneshield stacks, like charges on other abilities. However for since 1.04b they disappear when the GCD cooldown is occurring, returning as soon as abilities are ready to use again. But given I try to keep as much as possible happening, that leaves it not showing quite a lot of the time.

commented

Are you using Masque or no? This may be another frame level bug where the text layer is getting overlapped

commented

Super weird. I get what you mean now though.

I'll dig into that part of the code tomorrow probably (I'm spent for tonight) and see if something looks fishy. I don't have a DK so I'll be coding somewhat blindly. Are there any other classes with similar abilities you can think of? It makes it way easier to code if I can replicate the issue

commented

Can you test the latest commits I put into MASTER? I think I may have caught the issue, but I can't test it myself unfortunately

commented

I can't replicate this with my druid and Swiftmend. Swiftmend shows the stacks in the bottom right corner even during a GCD with both Masque and without Masque. Is there a way you can screencast or screenshot this for me so I can see what you mean?

commented

Not using Masque.

https://youtu.be/lWsN9MEA6Fg
This was actually running the current master branch (commit 213f99f). I initially thought it was just during the GCD cooldown, but looks like it's just cutting in and out. I couldn't quickly find a pattern as to when and why sorry.

commented

Nope still same in commit 1dbe442 :(

commented

Damn. This may be asking a lot, but can you test version 1.0.4 and then 1.0.4a then 1.0.4b and confirm is exactly which release this started occurring? If I can pinpoint which release, I may be able to find the exact commit that started the issue

commented

1.0.3d worked perfectly (at least for that).
1.0.4 Doesn't show any stacks or charges for me at all.
1.0.4a shows charges, but has the disappearing stacks (as per that video).

Hope that helps!

commented

And the current version does fix it either?

commented

Ok so going back to your video, your number 4 and number 6 abilities don't have this issue. It's something different about this particular ability that is messing up. This is odd to me, and it might be because this isn't a traditional "charge" ability. It's more like a stack size

commented

I figured out the pattern. This is the differences between two types of abilities ones with charges, (determined by GetSpellCharges(spell)) and spells with counts (determined by GetSpellCount(spell)). We would update spell charges each time the event SPELL_UPDATE_CHARGES fired, but we wouldn't update the count. And the logic for our SPELL_UPDATE_CHARGES handler was overly simple, we would just display the charges (if any) or we would clear the number. The pattern above, is that the number on your boneshield would disappear any time you triggered your #4 or #6 ability or gained a charge back, thus triggering the SPELL_UPDATE_CHARGES event, and clearing your spell count number. I watched it for like 20 min on loop till I finally noticed it lol

The funny thing about why this never manifested before was due to a TON of inefficiency in the code. Technically speaking the spell count was always being set to nil in the same exact way, but we were checking so fast and so often (like every 30 miliseconds) that it would get put back before you ever noticed. However, with my performance optimizations we slowed down how often we check for counts and charges to a bare minimum to save CPU resources, hence why now you're actually noticing the button disappearing.

Anyway, I just made our SPELL_UPDATE_CHARGE handler check for both charges and spell counts now. Super easy and super direct fix :-)

	local charges, maxCharges, chargeStart, chargeDuration = GetSpellCharges(spell)

	local count = GetSpellCount(spell)

	if (maxCharges and maxCharges > 1) then
		self.count:SetText(charges)
	elseif count and count > 0 then
		self.count:SetText(count)
	else
		self.count:SetText("")
	end

I'm going to put out a new version now and then head to bed. Please let me know if for some reason this wasn't the solution, but I'm pretty confident.

commented

Alright I made another change, can you try that out for me?

commented

I'll check it when I get home tonight (~2 hours, I'm in NZ).
And assuming it's not fixed I'll also test the different versions to see when it started occurring.

commented

Awesome! Thanks so much, we'll figure this out eventually ;-)

commented

Working perfectly.

Thank you!