GetIdFromTalent
Contents |
[edit] GetIdFromTalent(talent)
Determines the identifier of a talent.
int GetIdFromTalent( talent tTalent );
[edit] Parameters
tTalent
The talent to get the ID of.
[edit] Description
Returns the identifier of tTalent from SPELL_*, FEAT_* or SKILL_*.
[edit] Remarks
When writing generic AI for creatures there are functions, like GetCreatureTalentBest, that return talents that can be used in a situation but a lot of functions require the identifiers to be used. This converts from 'talent' to those identifiers.
You probably want to use this function in conjunction with GetTypeFromTalent, because a lot of the SPELL_*, FEAT_*, and SKILL_* constants correspond to the same value. Thus, this would be TRUE even for FEAT_ALERTNESS and SKILL_ANIMAL_EMPATHY, because they're all just the integer value 0:
if (GetIdFromTalent(tTalent)==SPELL_ACID_FOG)
[edit] Version
1.61
[edit] See Also
functions: | |
constants: |
author: Tom Cassiotis, editor: Lilac Soul