Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spells are shown as ready even though they are on cooldown #739

Closed
johnnylam88 opened this issue Dec 15, 2020 · 5 comments
Closed

Spells are shown as ready even though they are on cooldown #739

johnnylam88 opened this issue Dec 15, 2020 · 5 comments

Comments

@johnnylam88
Copy link
Contributor

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.
@johnnylam88
Copy link
Contributor Author

This is a continuation if issue #723.

@johnnylam88
Copy link
Contributor Author

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

@johnnylam88
Copy link
Contributor Author

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.

@johnnylam88
Copy link
Contributor Author

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

@johnnylam88
Copy link
Contributor Author

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.

johnnylam88 added a commit to johnnylam88/Ovale that referenced this issue Dec 15, 2020
Always show the cooldown frame if the icon is displaying an action
that has a cooldown.  The frame's Show() method was not being
triggered when the icon was showing a texture again.

This fixes issue Sidoine#739.
Sidoine pushed a commit that referenced this issue Dec 16, 2020
Always show the cooldown frame if the icon is displaying an action
that has a cooldown.  The frame's Show() method was not being
triggered when the icon was showing a texture again.

This fixes issue #739.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant