Ovale Spell Priority

Ovale Spell Priority

6M Downloads

Spells are shown as ready even though they are on cooldown

johnnylam88 opened this issue ยท 5 comments

commented

Spells can be shown as ready even though they are on cooldown. The simplest example that reliably demonstrates the problem on a blood death knight is:

Define(antimagic_shell 48707)
    SpellInfo(antimagic_shell cd=60)

AddIcon
{
    if RunicPower() < 50 Spell(antimagic_shell)
}
  1. Cast Anti-Magic Shell to place it on cooldown.
  2. See the script show that AMS is on cooldown.
  3. Cast Heart Strike on the target dummy until runic power > 50.
  4. See the script show an empty box.
  5. Cast Death Strike until runic power < 50.
  6. See the script show that AMS is ready, even though it is actually still on cooldown.
commented

This is a continuation if issue #723.

commented

Trace of above script at step 6:

+++ Icon 1
Reset state with current time = 293604.524000
    nextCast = 293604.563000 (waiting for GCD)
[6] >>> Computing 'runicpower()' at time=293604.524000
[6]    condition 'runicpower' returns 293604.524, inf, 18, 293604.524, 0.0010000000474975
[6] <<< 'runicpower()' returns (293604.524, inf) with value = value 18 + (t - 293604.524) * 0.0010000000474975
[8] >>> Computing 'compare' at time=293604.524000
[6] >>> Returning for 'runicpower()' cached value value 18 + (t - 293604.524) * 0.0010000000474975 at (293604.524, inf)
[8]    18+(t-293604.524)*0.0010000000474975 < 50+(t-0)*0
[8]    intersection at t = 325604.52248008
[8]    compare '<' returns (293604.524, 325604.52248008)
[8] <<< 'compare' returns (293604.524, 325604.52248008) with value = none
[10] >>> Computing 'spell(antimagic_shell)' at time=293604.524000
[10]    evaluating action: spell()
[9] >>> Computing 'antimagic_shell' at time=293604.524000
[9]    value is 48707
[9] <<< 'antimagic_shell' returns (0, inf) with value = value 48707 + (t - 0) * 0
Found spell info about 48707 (isKnown = true)
Spell has cost of %d for %s
Spell has cost of %d for %s
Spell ID '48707' passed power requirements.
OvaleSpells:IsUsableSpell(48707, 293604.524000, Creature-0-3133-2222-230-175456-000054E00B) returned true, false
Didn't find an existing cd in next, look for one in current
Call GetSpellCooldown which returned 293596.278000, 60.000000, 1
GlobalCooldown is 293603, 1
It returned 293596.178000, 60.000000
Cooldown of spell 48707 is 293596.078000 + 60.000000
GetSpellCooldown returned 293596.078000, 60.000000
Cooldown of spell 48707 is 293596.078000 + 60.000000
[10]    Action spell (actionCharges=0)
[10]    Action spell is on cooldown (start=293596.078000, duration=60.000000).
[10]    start=293656.078000 atTime=293604.524000
[10]    Action spell can start at 293656.078000.
[10] <<< 'spell(antimagic_shell)' returns (293656.078, inf) with value = action spell 48707
[11] >>> Computing 'if' at time=293604.524000
[8] >>> Returning for 'compare' cached value none at (293604.524, 325604.52248008)
[10] >>> Returning for 'spell(antimagic_shell)' cached value action spell 48707 at (293656.078, inf)
[11]    'if' returns (293656.078, 325604.52248008) (intersection of (293604.524, 325604.52248008) and (293656.078, inf))
[11] <<< 'if' returns (293656.078, 325604.52248008) with value = action spell 48707
[5] >>> Computing 'group' at time=293604.524000
[5]    group checking child [11-[if]]
[11] >>> Returning for 'if' cached value action spell 48707 at (293656.078, 325604.52248008)
[5]    group checking child [11-[if]] result: (293656.078, 325604.52248008)
[5]    group first best is [11-[if]]: (293656.078, 325604.52248008)
[5]    group best action remains action spell 48707 at (293656.078, 325604.52248008)
[5] <<< 'group' returns (293656.078, 325604.52248008) with value = action spell 48707
GetAction: start=293656.078, id=48707
commented

This was tested with Ovale 9.0.23. I will test with 9.0.24 once the servers are back online after today's maintenance.

commented

I have tested this with Ovale 9.0.24 and the problem definitely still exists.

commented

I have a fix for this that I will push shortly. It has to do with the cooldown frame not being shown. In the bug report, the icon was shown, then a condition wasn't met, which hid the texture and the cooldown, but the the condition was met again and needed to show the same texture, the cooldown was not being shown again.