Advertisement
Guest User

Untitled

a guest
Apr 20th, 2015
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.75 KB | None | 0 0
  1. public static bool ValidAttackUnit(this WoWUnit p)
  2.         {
  3.             if (p == null || !p.IsValid)
  4.                 return false;
  5.  
  6.             if (!p.Attackable)
  7.                 return false;
  8.  
  9.             if (p.IsFriendly)
  10.                 return false;
  11.  
  12.             if (p.IsDead)
  13.                 return false;
  14.  
  15.             if (p.IsTotem)
  16.                 return false;
  17.  
  18.             if (p.IsNonCombatPet)
  19.                 return false;
  20.  
  21.             if (!p.CanSelect)
  22.                 return false;
  23.  
  24.             if (p.IsCritter)
  25.                 return false;
  26.  
  27.             if (p.IsPlayer && !p.IsHostile)
  28.                 return false;
  29.  
  30.             if (p.IsPet && !p.IsHostile)
  31.                 return false;
  32.  
  33.             return true;
  34.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement