IPGetDamageBonusConstantFromNumber(int)

Converts a number into a damage bonus itemproperty constant.

void IPGetDamageBonusConstantFromNumber(
    int nNumber
);

Parameters

nNumber

Number to convert to damage bonus constant.


Description

returns the appropriate ITEM_PROPERTY_DAMAGE_BONUS_= constant for nNumber

Do not pass in any number <1 ! Will return -1 on error



Remarks

Returns a DAMAGE_BONUS_* constant. Returns DAMAGE_BONUS_20 if nNumber is above 20, and -1 if nNumber is 0 or less.


Known Bugs

Uses RemoveItemProperty, which has an accumulator
bug that may give an erroneous Stacking error message or affect subsequent functions in the same script.- 1/16/04, NWN Toolset version vts026, game version 1.61.8042 English


Requirements

#include "x2_inc_itemprop"

Version

1.61

See Also

functions: RemoveItemProperty
categories: Item Creation Functions | Item Properties Functions
constants: ITEM_PROPERTY_* Constants


 author: Lilac Soul, editor: Peter Busby