GetIsEffectValid(effect)
Determines whether an effect is valid.
int GetIsEffectValid( effect eEffect );
Parameters
eEffect
The effect to check for validity.
Description
Returns TRUE if eEffect is a valid effect, otherwise FALSE.
Remarks
Typically used on functions that return effects, like GetFirstEffect or GetNextEffect.
This should return TRUE if you just pass a new effect into it, such as passing GetIsEffectValid(EffectStun()) will return true.
Version
1.22
Example
// Remove the Paralysis effect
// - Jasperre. This was an incorrect loop, you cannot have eFind == EffectTypeX().
effect eFind = GetFirstEffect(oTarget);
while (GetIsEffectValid(eFind))
{
if (GetEffectType(eFind) == EFFECT_TYPE_PARALYZE)
{
RemoveEffect(oTarget, eFind);
}
eFind = GetNextEffect(oTarget);
}
See Also
| functions: | RemoveEffect |
| categories: | Effects Functions |
author: Tom Cassiotis, editor: Jasperre, additional contributor(s): Jasperre