ApplySpellModifierFloat
function · spell · primitive
- Address
0x6e6bf0· 50 bytes, up to0x6e6c21- Signature
void __fastcall (const void *spell, float *value, uint32_t op)- Meaning
- Applies a spell's summed modifiers for an op to a float on the x87
- Confidence
- verified, proof one
- Finding
- spell/records#modifier-appliers
- Test
spell::spell_mod_float_difftest,spell::spell_range_for_caster_difftest
Finding: Modifier appliers in spell: records
Three appliers take (spell, &value, op) and change the value only when 0x6e6b30 returns 1.
The integer one sets value = (value + flat)·pct / 100, 32-bit wrapping, the division signed and
truncating. The float one sets value = (float)(((double)flat + value)·pct·0.01f): each step at
53-bit precision in that order, 0.01f being 0x3c23d70a, one rounding to single at the store.
The software one sets value = ((value ⊕ F(flat)) ⊗ F(pct)) ⊗ 0.01f in the arithmetic of
Software floats, where F is its int-to-float.
The derivation is in the doc.
Callers 3
- ExpandSpellToken ui
- Spell_C::GetMinMaxRange spell
- GetSpellTargetAreaRadius spell
Callees 1
- GetSpellModifiers spell
Calls and jumps by a bare address, from tables/calls.tsv.