GetSpellCastTime
function · spell · primitive
- Address
0x6e3340· 317 bytes, up to0x6e347c- Signature
int32_t __fastcall (uint32_t spellId, uint32_t pet, uint32_t allowNegative)- Meaning
- Computes a spell's cast time from its cast-time row, op 10 and the caster's cast-speed float
- Confidence
- verified, proof one
- Finding
- spell/records#cast-time
- Test
spell::spell_cast_time_difftest
Finding: Cast time in spell: records
0x6e3340(spellId, pet, allowNegative) returns 0 without a record or cast-time row. Else
t = max((L − base)·perLevel + base, minimum) from the SpellCastTimes record named by +0x48,
then the integer applier with op 10. Unless the record's +0x18 has a bit of 0x30, the caster
unit exists and t > 0: with m the unit's float at +0x22c, if |m − 1| ≥ 2^-22, or m is
NaN, t = rint((float)(m·t)). Finally, unless allowNegative, t ≤ 0 gives 0.
The derivation is in the doc.
Callers 3
- CGTooltip::BuildSpell ui
- CheckCasterStateForSpell objectlayer
- StartSpellScreenTint spell
Callees 4
- ClntObjMgrObjectPtr objectlayer
- ClntObjMgrGetActivePlayer objectlayer
- GetSpellLevel spell
- ApplySpellModifierInt spell
Calls and jumps by a bare address, from tables/calls.tsv.