[Changed Characters Because Blizz wouldn’t let me post until someone else did]
I think my problem is with the spell with which I’m testing, Haunt. There is something odd going on because GetSpellCooldown() works with other spells (e.g., Deathbolt, Vile Taint, etc.), but not with Haunt.
Here’s the log trace from my Addon:
Haunt: Cast Time 1.112, Start time: 0.000, duration 0.000, enabled 0
4.170,SPELL_DAMAGE,Haunt, 33639
4.180,SPELL_AURA_APPLIED,Haunt
Haunt: Cast Time 1.112, Start time: 0.000, duration 0.000, enabled 0
Haunt: Cast Time 1.112, Start time: 0.000, duration 0.000, enabled 0
19.189,SPELL_AURA_REMOVED,Haunt
Haunt: Cast Time 1.112, Start time: 0.000, duration 0.000, enabled 0
Here’s what the trace tells us:
- GetSpellInfo() was called before Haunt was cast
- Haunt was cast 4.2 secs later and the CD started.
- GetSpellInfo() was cast twice while the CD was ticking down
- Haunt’s CD expired about 15 seconds later (19.2 secs).
- GetSpellInfo() was cast one more time.
Thus, GetSpellInfo() was cast 4 times (once before, twice during, and once after, Haunt) and the same values were returned each time.
I’ll keep looking at this, but I clearly do not yet understand the semantics going on here.
Cheers,
P.S. I’ll need to go back to Weak Auras and see how they calculate the CD for Haunt. Odd that the tooltip says the Haunt CD is 15 secs but the Wowhead description says N/A for the CD.