Beispiel #1
0
        private static PingCategory pingtype(GankInfo Gank)
        {
            switch (Gank.Sender.IsAlly ? menu.ComboBoxValue("Allypingtype") : menu.ComboBoxValue("Enemypingtype"))
            {
            case 0:
                return(PingCategory.Danger);

            case 1:
                return(PingCategory.Fallback);

            case 2:
                return(PingCategory.OnMyWay);

            case 3:
                return(PingCategory.AssistMe);

            case 4:
                return(PingCategory.EnemyMissing);

            case 5:
                return(PingCategory.Normal);

            default:
                return(PingCategory.Normal);
            }
        }
Beispiel #2
0
        private static void Game_OnTick(EventArgs args)
        {
            if (!menu.CheckBoxValue("enable"))
            {
                return;
            }

            if (Core.GameTickCount - lastupdate > Utility.Load.FPSProtection)
            {
                foreach (var hero in EntityManager.Heroes.AllHeroes.Where(h => !h.IsMe && h.FoW() && h.IsInRange(Player.Instance, DetectionRange)))
                {
                    var gank = new GankInfo(hero, Core.GameTickCount);
                    if (!DetectedGanks.Any(g => g.Sender.IdEquals(hero)) && !DetectedGanks.Contains(gank))
                    {
                        if (!AlreadyDetected.Any(g => g.Sender.IdEquals(hero)) && !AlreadyDetected.Contains(gank))
                        {
                            DetectedGanks.Add(gank);
                            AlreadyDetected.Add(gank);
                        }
                    }
                }

                DetectedGanks.RemoveAll(g => g == null || g.Sender.IsMe || g.Sender.IsDead || Core.GameTickCount - g.StartTick > ExpireTime);
                AlreadyDetected.RemoveAll(h => h == null || h.Sender.IsMe || h.Sender.IsDead || h.Sender.Distance(Player.Instance) > DetectionRange + h.Sender.BoundingRadius && Core.GameTickCount - h.StartTick > DetectionDelay);
                lastupdate = Core.GameTickCount;
            }
        }
Beispiel #3
0
        private static void SendPing(GankInfo gank)
        {
            if (gank.Sender.IsMe || PingDelay > Core.GameTickCount - gank.LastPinged || !menu.CheckBoxValue("ping"))
            {
                return;
            }

            var local = menu.ComboBoxValue("pingmode") == 0;

            if (local)
            {
                TacticalMap.ShowPing(pingtype(gank), gank.Sender, true);
            }
            else
            {
                TacticalMap.SendPing(pingtype(gank), gank.Sender);
            }
            gank.LastPinged = Core.GameTickCount;
        }
Beispiel #4
0
 private static Color LineColor(GankInfo gank)
 {
     return(gank.Sender.IsAlly ? Color.Chartreuse : Color.Red);
 }
Beispiel #5
0
 private static float LineLength(GankInfo Gank)
 {
     return(Gank.Sender.ServerPosition.Distance(Player.Instance) > SenderNameDistance ? SenderNameDistance : Gank.Sender.ServerPosition.Distance(Player.Instance));
 }