benilla-re systems structs docs

GetSpellEffectPoints

function · spell · primitive

Address
0x6e3800 · 693 bytes, up to 0x6e3ab4
Signature
void __fastcall (const void *spell, uint32_t effect, float *min, float *max, uint32_t level, uint32_t pet, uint32_t unmodified)
Meaning
Computes an effect's minimum and maximum amount in software floats, with modifiers and 1/128 rounding
Confidence
verified, proof one
Finding
spell/records#effect-amount-formula
Test
spell::spell_effect_amount_difftest

Finding: Effect amount formula in spell: records

GetEffectPoints(spell, i, &min, &max, level, pet, unmodified) zeroes both and returns for a null record. n = level, or the caster level for the record's id when 0; n −= base when base > 0; n < 0 gives 0. With the effect's integers perLevel +0x118, basePoints +0x130, dice +0x10c, sides +0x100 and float real +0x124, each at +4i: min = F(perLevel·n + basePoints + dice) ⊕ (real ⊗ F(n)) and max = F(sides·(perLevel·n + dice) + basePoints) ⊕ (real ⊗ F(n)), the integers 32-bit wrapping, the rest software floats.

The derivation is in the doc.

Callers 2

Callees 9

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