SpellHistory::GetCooldown
function · spell · primitive
- Address
0x6e13e0· 585 bytes, up to0x6e1628- Signature
uint32_t __thiscall (SpellHistory *this, int32_t spell, int32_t item, uint32_t *duration, uint32_t *start, uint32_t *enable)- Meaning
- Writes the latest-ending spell, category or global cooldown of a spell and returns whether it ends after now
- Confidence
- verified, proof one
- Finding
- spell/cooldowns#reading-a-cooldown
Finding: Reading a cooldown in spell: cooldowns
0x6e13e0(list, spell, item, &duration, &start, &enable) sets enable to 1, then returns 0 for
a spell id outside Spell.dbc and for a spell whose +0xf4 is 0x4e or 0x2f. Otherwise it walks
every record with best = now and three legs per record. A leg passes when its end minus best
is not negative (signed 32-bit); it then writes duration and start and sets best to its end,
and the two held legs set enable to held == 0 while enable is still nonzero. It returns
best != now.
| leg | applies when | end | duration, start written |
|---|---|---|---|
| spell | same spell and item, and time or held nonzero | time + (held ? now + 1 : start) | held ? 1 : time; held ? now : start |
| category | category nonzero and the spell's, or its SpellCategory flags & 2 | catTime + (held ? now : catStart) | catTime; held ? now : catStart |
| global | GCD category equals the spell's +0x274, GCD time nonzero | +0x10 start + gcdTime | gcdTime; +0x10 start |
The derivation is in the doc.
Callers 2
- GetSpellCooldown spell
- GetItemCooldown spell
Callees 2
Calls and jumps by a bare address, from tables/calls.tsv.