Method Unit:HandleStatModifier [-] [+]

Applies or removes a modifier from one of the Unit's stats.

The stat is selected using the stat index and the modifier type determines how the value is applied.

Synopsis

success = Unit:HandleStatModifier( stat, type, value )

success = Unit:HandleStatModifier( stat, type, value, apply )

Arguments

number stat

The stat index to modify.

Valid numbers: integers from -2,147,483,647 to 2,147,483,647.

number type

The type of modifier to apply.

Valid numbers: integers from -127 to 127.

number value

The value of the modifier.

Valid numbers: all decimal numbers.

boolean apply (false)

Whether to apply the modifier; false removes it.

Returns

boolean success

Whether the stat modification was successful.

Generated on
©2016 - Eluna Lua Engine