Example #1
0
        void Obj_AI_Base_OnTeleport(Obj_AI_Base sender, Teleport.TeleportEventArgs args)
        {
            var unit = sender as AIHeroClient;

            if (unit == null || !unit.IsValid || unit.IsAlly || unit.IsMe)
            {
                return;
            }

            var recall    = new RecallInf(unit.NetworkId, args.Status, args.Type, args.Duration, args.Start);
            var enemyInfo = EnemyInfo.Find(x => x.Player.NetworkId == unit.NetworkId).RecallInfo.UpdateRecall(recall);

            if (recall.Type == TeleportType.Recall)
            {
                switch (recall.Status)
                {
                case TeleportStatus.Abort:
                    if (Menu.Item("notifRecAborted").GetValue <bool>())
                    {
                        ShowNotification(enemyInfo.Player.ChampionName + ": Recall ABORTED", System.Drawing.Color.Orange, 4000);
                    }

                    break;

                case TeleportStatus.Finish:
                    if (Menu.Item("notifRecFinished").GetValue <bool>())
                    {
                        ShowNotification(enemyInfo.Player.ChampionName + ": Recall FINISHED", NotificationColor, 4000);
                    }
                    break;
                }
            }
        }
Example #2
0
 public RecallInfo(EnemyInfo enemyInfo)
 {
     EnemyInfo = enemyInfo;
     Recall    = new RecallInf(
         EnemyInfo.Player.NetworkId,
         TeleportStatus.Unknown,
         TeleportType.Unknown,
         0);
     IncomingDamage = new Dictionary <int, float>();
 }
Example #3
0
        public EnemyInfo UpdateRecall(RecallInf newRecall)
        {
            IncomingDamage.Clear();
            LockedTarget    = false;
            EstimatedShootT = 0;

            if (newRecall.Type == TeleportType.Recall && newRecall.Status == TeleportStatus.Abort)
            {
                AbortedRecall = Recall;
                AbortedT      = Utils.TickCount;
            }
            else
            {
                AbortedT = 0;
            }

            Recall = newRecall;
            return(EnemyInfo);
        }