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.84 KB | None | 0 0
  1.         private static IEnumerable<BattleCharacter> EnemyUnit
  2.         {
  3.             get
  4.             {
  5.                 return
  6.                     GameObjectManager.GetObjectsOfType<BattleCharacter>()
  7.                         .Where(u => !u.IsDead && u.CanAttack && u.IsTargetable && GameObjectManager.Attackers.Contains(u));
  8.             }
  9.         }
  10.  
  11.         public static bool PlayerTargeted
  12.         {
  13.             get
  14.             {
  15.                 return EnemyUnit.All(u => u.CurrentTargetId == Core.Me.ObjectId);
  16.             }
  17.         }
  18.  
  19.         public static int AoETargets(float range)
  20.         {
  21.             var target = Core.Player.CurrentTarget;
  22.             if (target == null)
  23.                 return 0;
  24.             var tarLoc = target.Location;
  25.             return EnemyUnit.Count(u => u.Location.Distance3D(tarLoc) <= range);
  26.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement