benilla-re systems structs docs

GetSpellModifiers

function · spell · primitive

Address
0x6e6b30 · 188 bytes, up to 0x6e6beb
Signature
uint8_t __fastcall (const void *spell, uint32_t op, int32_t *flat, int32_t *pct)
Meaning
Sums the flat and percent modifier cells of a spell's family-mask bits for an op
Confidence
verified, proof one
Finding
spell/records#modifier-sums
Test
spell::spell_range_for_caster_difftest

Finding: Modifier sums in spell: records

0x6e6b30(spell, op, &flat, &pct) returns 0 with flat = 0 and pct = 100 when the record's +0x280 is 0 or differs from 0xcecaac, or its +0x24 has bit 29 set. Otherwise it sums, for each bit i of the 64-bit mask at +0x284 (low dword first), cell i·29 + op of the flat table into flat and of the percent table into pct, in 32-bit wrapping adds. Both sums zero returns 0 with pct left 0. Else pct = pct + 100, set to 0 when negative, and it returns 1. op is not checked.

The derivation is in the doc.

Callers 3

Callees 0

None by a direct call or jump.

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