EffectSpellImmunity(int)
Returns an effect of spell immunity.
effect EffectSpellImmunity( int nImmunityToSpell = SPELL_ALL_SPELLS );
Parameters
nImmunityToSpell
SPELL_* (Default: SPELL_ALL_SPELLS)
Description
Returns an effect of spell immunity to SPELL_* type spells.
Returns an effect of type EFFECT_TYPE_INVALIDEFFECT if nImmunityToSpell is invalid.
Remarks
Returns on the effect, it does not apply the effect.
Known Bugs
Previously noted bug has been fixed in a patch some time ago.
Version
1.30
Example
// Example 1 - Place an immunity effect on oTarget for 60
// seconds. No visual effects implemented.
void main()
{
effect eImmunityEffect;
object oTarget = GetLastUsedBy();
eImmunityEffect = EffectSpellImmunity(SPELL_CONFUSION);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eImmunityEffect,oTarget,60.0f);
}
See Also
| functions: | GetIsImmune |
| categories: | Effects Functions | Spells Functions |
| constants: | SPELL_* Constants |
author: Brett Lathrope, editor: Lilac Soul, additional contributor(s): Lilac Soul
Send comments on this topic.