Guest User

Untitled

a guest
Nov 17th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. public static bool HasLivingGotStunImmunity(GameLiving living)
  2. {
  3. lock (living.EffectList)
  4. {
  5. foreach (IGameEffect effect in living.EffectList)
  6. {
  7. 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))
  8. {
  9. if (effect is GameSpellAndImmunityEffect && ((GameSpellAndImmunityEffect)effect).ImmunityState)
  10. {
  11. return true;
  12. }
  13. }
  14. }
  15. }
  16. return false;
  17. }
Add Comment
Please, Sign In to add comment