Thread Tools Display Modes
09-21-24, 01:21 AM   #1
doofus
A Chromatic Dragonspawn
Join Date: Feb 2018
Posts: 163
C_Spell.GetSpellCooldown("Execute")

The above call misbehaves on my Fury Warrior. Always 0 on all fields, and enabled always TRUE. Am I doing something wrong?

Last edited by doofus : 09-21-24 at 01:25 AM.
  Reply With Quote
09-21-24, 04:51 AM   #2
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,253
The return value is a table. https://warcraft.wiki.gg/wiki/API_C_...tSpellCooldown
Code:
local spellCooldownInfo = C_Spell.GetSpellCooldown("Execute")
This gives you:
  • spellCooldown.startTime
  • spellCoooldown.duration
  • spellCooldown.isEnabled
  • spellCooldown.modRate
I think the variable names are exact, so you can't use spellCooldown.enabled, although I could be wrong. When I use the /dump command, the capitalization and spelling use the syntaxes above.
  Reply With Quote
09-21-24, 05:05 AM   #3
doofus
A Chromatic Dragonspawn
Join Date: Feb 2018
Posts: 163
Just fixed it.

It does not like the English word "Execute" but rather I used the spell ID 280735 and it now gives the right results.

I think I have seen this before, same spell name but multiple versions, flavours, classes even.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » C_Spell.GetSpellCooldown("Execute")


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off