Example #1
0
 public static void Update()
 {
     foreach (Unit _Bomb in ObjectManager.GetEntitiesFast <Unit>().Where <Unit>((Func <Unit, bool>)(x =>
     {
         if (x.Team == Config._Hero.Team)
         {
             return(x.ClassId == ClassId.CDOTA_NPC_TechiesMines);
         }
         return(false);
     })).ToArray <Unit>())
     {
         if (_Bomb.Name.Contains("stasis"))
         {
             BombManager.AddBomb(_Bomb, BombType.Stasis);
         }
         else if (_Bomb.Name.Contains("land"))
         {
             BombManager.AddBomb(_Bomb, BombType.Land);
         }
         else
         {
             BombManager.AddBomb(_Bomb, BombType.Remote);
         }
     }
 }
Example #2
0
        public static void OnAddEntity(EntityEventArgs args)
        {
            Entity entity = args.Entity;

            if (entity.Team != Config._Hero.Team || entity.ClassId != ClassId.CDOTA_NPC_TechiesMines)
            {
                return;
            }
            if (entity.Name.IndexOf("stasis") > 0)
            {
                BombManager.AddBomb((Unit)entity, BombType.Stasis);
            }
            else if (entity.Name.IndexOf("land") > 0)
            {
                BombManager.AddBomb((Unit)entity, BombType.Land);
            }
            else
            {
                BombManager.AddBomb((Unit)entity, BombType.Remote);
            }
        }