Skip to content

SpellDataNamedValueFloatDriver

14.7

Inheritance 3 ancestors

Class Documentation

Edit documentation

A float driver that returns a named data value of a spell at a spell level. Spell names the spell, ValueName names one of its data values, and the level picks the entry of that value.

The level is worked out on every evaluation:

  • With SpellLevel set, the driver evaluates it for the same source and drops the fraction.
  • Without it, the source must be a unit that has the spell in its spellbook, and the level is the rank the unit has in it.

The driver returns 0 when the spell is not in the game's spell table, when the spell has no value with that name, when no level can be worked out, and when the level is below 0 or above 6.

A game mode can override the data values of a spell. The driver reads the override of the current mode first.

Examples:
  • Shipped skin overlays read values such as GoldToNextForm and SpentGritThreshold from a skin's manager spell and divide a counter by them to fill a meter.

Properties

SpellLevel

Pointer<ILogicFloatDriver> = null
Edit documentation

A driver that supplies the level. When not set, the rank of Spell on the source unit is used. With a SpellLevel driver, the source does not have to be a unit.

ValueName

String = ""
Edit documentation

The name of the data value to read. Letter case does not matter.