GetIdFromTalent(talent)
Determines the identifier of a talent.
int GetIdFromTalent( talent tTalent );
Parameters
tTalent
The talent to get the ID of.
Description
Returns the identifier of tTalent from SPELL_*, FEAT_* or SKILL_*.
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)
Version
1.61
See Also
functions: | GetCreatureTalentBest | GetCreatureTalentRandom | GetTypeFromTalent | TalentAdvancedProtectSelf | TalentBuffSelf |
categories: | Talents/Skills/Feats Functions |
constants: | SPELL_* Constants |
author: Tom Cassiotis, editor: Lilac Soul