Hemario / Ovale_TankScripts

Custom tank scripts for Ovale (wow)
2 stars 3 forks source link

Icon always displays text=max #6

Closed tehmufifnman closed 4 years ago

tehmufifnman commented 5 years ago

Thanks so much for making these for tanks!

I honestly think this might be a weird bug in Ovale itself.

In the paladin script there is this line:

if (SpellCharges(shield_of_the_righteous count=0) >= SpellMaxCharges(shield_of_the_righteous)-0.2) Spell(shield_of_the_righteous text=max)

No matter how many charges of Shield of the Righteous I have, the icon always has the text "max" on it.

Screenshots: At 3 Charges At 0 Charges

I was trying to narrow the issue down in conditions.lua of Ovale since it appears you're using SpellCharges() correctly in the tank script. I found something weird just by trying to debug.

If I change these code inside SpellCharges() in conditions.lua

        if namedParams.count == 0 and charges < maxCharges then
            return TestValue(atTime, INFINITY, charges + 1, start + duration, 1 / duration, comparator, limit)
        end

to this (basically just storing the return of TestValue in a local variable before immediately returning it.

        if namedParams.count == 0 and charges < maxCharges then
            local test = TestValue(atTime, INFINITY, charges + 1, start + duration, 1 / duration, comparator, limit)
            return test
        end

It works as expected. I even waited for it to get to ALMOST 3 stacks, and spell icon appears with "max" on it as expected.

At 1 Charge

tehmufifnman commented 5 years ago

Additionally this was out of combat.

tehmufifnman commented 5 years ago

Also seems to happen with Ironskin Brew on the monk profile.

Hemario commented 5 years ago

This is a side effect from how Ovale works. Ovale will calculate the next spell to use, based on the script, even if it is a long time in the future. A future action has it's alpha set to 50% and you will see a cooldown swipe indicator on the icon as well.

What you are seeing is, the next available action to use is sotr when it's about to have max stacks, none of the other actions specified in the script are actually happening. I'm guessing because you aren't taking any damage at that time.

Your fix to conditions.lua has no effect here. The way to reproduce the issue is to go to a damage target dummy, get in range and use sotr. You will see the behavior happening regardless of the changes to conditions.lua you made.