- summary: One per-spell modifier, mostly from equipment: which spell, which property, how, and the equipment and context amounts.
- area: Game.Common
One per-spell modifier, mostly from equipment: which spell, which property, how, and the equipment and context amounts.
Kind struct · Area Game.Common
One modifier on one of a character's spells (a range bonus from an item, an AP-cost
reduction...). It arrives in CharacterCharacteristics.spell_modifiers (the full set)
and in ApplySpellModifierEvent (one change); RemoveSpellModifierEvent removes one.
HOW TO STORE IT
1. Key it by the character, SpellModifier.spell_id and SpellModifier.modifier_type
(SpellModifierType: which property of the spell it changes).
2. Under that key keep one entry per SpellModifier.action_type
(SpellModifierActionType); a new modifier with the same action REPLACES the entry.
3. The entry's amount is SpellModifier.equipment + SpellModifier.context. Keep
both parts if you show them: the client prints them as "equipment" and "context".
HOW TO USE IT
Compute the spell's value as SpellModifierActionType explains: an ACTION_SET entry
replaces the spell level's value, otherwise add BOOST and subtract REMOVE_BOOST
(reversed for AP_COST and CAST_INTERVAL). Any other declared member is never read by
the client: ignore it.
Not sent on its own — a record carried by CharacterCharacteristics.spell_modifiers and ApplySpellModifierEvent, never sent on its own. inferred
Used by
Fields
| # | Field | Type | Meaning | You set it |
|---|---|---|---|---|
| 1 | spell_id | int32 | The spell the modifier applies to. The client keys the modifier by it and looks the spell up with SpellData.GetById. | never |
| 3 | context | int32 | The contextual part of the amount (not from equipment). The client adds it to equipment for the total and prints it as "context". | never |
| 4 | action_type | SpellModifierActionType | How the amounts combine with the spell's value: add, subtract or replace. A SpellModifierActionType. One entry per action is kept for each spell and modifier type. | never |
| 5 | equipment | int32 | The part of the amount that comes from equipment. The client adds it to context for the total and prints it as "equipment". | never |
| 6 | modifier_type | SpellModifierType | Which property of the spell is modified (range, AP cost, line of sight...). A SpellModifierType. | never |