benilla-re systems structs docs

GetSpellLevel

function · spell · primitive

Address
0x6e3130 · 121 bytes, up to 0x6e31a8
Signature
uint32_t __fastcall (uint32_t spellId, uint32_t pet)
Meaning
Returns the player's or pet's vtable slot 42 for a spell divided by 5, or 0 with no unit
Confidence
verified, proof one
Finding
spell/records#caster-level

Finding: Caster level in spell: records

0x6e3130(spellId, pet) returns the level a formula scales by: with pet zero, the active player's unit; otherwise the unit whose guid sits in the player's unit fields at +0x00, or at +0x08 when that is zero. It calls the unit's vtable slot 42 with the id and divides the result by 5, unsigned and truncating; no unit gives 0. A creature's slot, 0x60cd80, returns its level at unit field +0x70 times 5, lowered to the record's +0x6c times 5 when that is positive, and 0 for a negative result or no record. The player's slot, 0x5ea690, returns a skill value instead, with the same cap.

The derivation is in the doc.

Callers 6

Callees 2

Calls and jumps by a bare address, from tables/calls.tsv.