IPGetIPConstCastSpellFromSpellID(int)

Returns a spell's corresponding itemproperty constant.

int IPGetIPConstCastSpellFromSpellID(
    int nSpellID
);

Parameters

nSpellID

SPELL_*


Description

Return the IP_CONST_CASTSPELL_* ID matching to the SPELL_* constant given in nSPELL_ID
This uses Get2DAstring, so it is slow. Avoid using in loops!

Returns -1 if there is no matching property for a spell



Known Bugs

This function returns 0, not -1, if there's no matching IP_CONST_CASTSPELL_* ID for the nSpellID parameter. This is unfortunate since 0 is the same value as IP_CONST_ONHIT_CASTSPELL_ACID_FOG.


Requirements

#include "x2_inc_itemprop"

Version

1.61

See Also

categories: Item Creation Functions | Item Properties Functions | Spells Functions
constants: IP_CONST_CASTSPELL_* Constants | SPELL_* Constants


 author: Lilac Soul