Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static bool HasLivingGotStunImmunity(GameLiving living)
- {
- lock (living.EffectList)
- {
- foreach (IGameEffect effect in living.EffectList)
- {
- if (effect is GameSpellEffect && ((effect as GameSpellEffect).SpellHandler is StunSpellHandler || (effect as GameSpellEffect).SpellHandler is UnresistableStunSpellHandler || (effect as GameSpellEffect).SpellHandler is UnrresistableNonImunityStun || (effect as GameSpellEffect).SpellHandler is SaboteurStunTrapHandler))
- {
- if (effect is GameSpellAndImmunityEffect && ((GameSpellAndImmunityEffect)effect).ImmunityState)
- {
- return true;
- }
- }
- }
- }
- return false;
- }
Add Comment
Please, Sign In to add comment