ApplySpellModifierInt
function · spell · primitive
- Address
0x6e6af0· 62 bytes, up to0x6e6b2d- Signature
void __fastcall (const void *spell, int32_t *value, uint32_t op)- Meaning
- Applies a spell's summed modifiers for an op to an integer, flat first, then percent over 100
- Confidence
- verified, proof one
- Finding
- spell/records#modifier-appliers
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 12
- ExpandSpellToken ui
- Script::GetResSicknessDuration ui
- CGTooltip::BuildSpell ui
- CGPlayer_C::GetSpellCastTime objectlayer
- AdjustCategoryRecovery spell
- SetSpellCooldownRemaining spell
- StartGlobalCooldown spell
- GetSpellPowerCost spell
- GetSpellCastTime spell
- HandleSpellGo spell
- SpellCooldownHandler spell
- GetSpellDuration spell
Callees 1
- GetSpellModifiers spell
Calls and jumps by a bare address, from tables/calls.tsv.