Ejemplo n.º 1
0
 /// <summary>
 /// Raises the <see cref="E:Ping" /> event.
 /// </summary>
 /// <param name="args">The <see cref="GamePingEventArgs"/> instance containing the event data.</param>
 private void OnPing(TacticalMapPingEventArgs args)
 {
     if (!args.Source.IsMe && ShouldRun() && (args.Source is AIHeroClient))
     {
         var pingType = args.PingType;
         var srcHero  = args.Source as AIHeroClient;
         if (pingType == PingCategory.Normal)
         {
             var textObject = new Render.Text(
                 srcHero.ChampionName,
                 new Vector2(
                     Drawing.WorldToScreen(args.Position.To3D()).X,
                     Drawing.WorldToScreen(args.Position.To3D()).Y + 15), 17, SharpDX.Color.White)
             {
                 PositionUpdate = () => new Vector2(
                     Drawing.WorldToScreen(args.Position.To3D()).X,
                     Drawing.WorldToScreen(args.Position.To3D()).Y + 30),
                 Centered = true
             };
             textObject.Add(0);
             LeagueSharp.Common.Utility.DelayAction.Add(1000, () =>
             {
                 textObject.Remove();
             });
         }
     }
 }
Ejemplo n.º 2
0
        private static void TacticalMap_OnPing(TacticalMapPingEventArgs args)
        {
            var hero = args.Source as AIHeroClient;

            if (hero == null)
            {
                return;
            }

            if (menu.CheckBoxValue(hero.Name()))
            {
                args.Process = false;
                return;
            }

            PingInfo.DetectedPings.Add(new PingInfo(args, Core.GameTickCount));
        }
Ejemplo n.º 3
0
        private static void TacticalMap_OnPing(TacticalMapPingEventArgs args)
        {
            var sender = ObjectManager.GetUnitByNetworkId <AIHeroClient>((uint)args.Source.NetworkId);

            if (sender == null)
            {
                return;
            }

            if (menu.CheckBoxValue(sender.Name()))
            {
                args.Process = false;
                return;
            }

            PingInfo.DetectedPings.Add(new PingInfo(args, Core.GameTickCount));
        }
Ejemplo n.º 4
0
 private void OnGamePing(TacticalMapPingEventArgs args)
 {
     try
     {
         var hero = args.Source as AIHeroClient;
         if (hero != null && hero.IsValid && args.PingType != PingCategory.OnMyWay)
         {
             _pingItems.Add(
                 new PingItem(
                     hero.ChampionName, Game.Time + (args.PingType == PingCategory.Danger ? 1f : 1.8f),
                     args.Position, args.Target));
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
 }
Ejemplo n.º 5
0
        private void OnPing(TacticalMapPingEventArgs args)
        {
            if (!Menu.Item("Thresh.Combo.W.Ganked").GetValue <bool>() || Target == null || !CheckGuardians())
            {
                return;
            }

            var jungler = args.Source as AIHeroClient;

            if (jungler == null ||
                jungler.Spellbook.GetSpell(SpellSlot.Summoner1).Name.Contains("Smite") ||
                jungler.Spellbook.GetSpell(SpellSlot.Summoner2).Name.Contains("Smite"))
            {
                return;
            }

            spell.Spell.Cast(jungler.Distance(ObjectManager.Player) <= spell.Spell.Range
                ? jungler.Position
                : args.Position.To3D());
        }
Ejemplo n.º 6
0
        static void Game_OnPing(TacticalMapPingEventArgs args)
        {
            if (!getCheckBoxItem(wMenu, "autoW5"))
            {
                return;
            }
            var jungler = args.Source as AIHeroClient;

            if (jungler != null && jungler.LSDistance(Player.Position) <= W.Range + 500)
            {
                if (jungler.Spellbook.GetSpell(SpellSlot.Summoner1).Name.ToLower().Contains("smite") ||
                    jungler.Spellbook.GetSpell(SpellSlot.Summoner2).Name.ToLower().Contains("smite"))
                {
                    if (args.PingType == PingCategory.OnMyWay)
                    {
                        int random = new Random().Next(350, 750); // so it wont happen too fast
                        LeagueSharp.Common.Utility.DelayAction.Add(random, () => CastW(args.Position.To3D()));
                    }
                }
            }
        }
Ejemplo n.º 7
0
        public static void OnPing(TacticalMapPingEventArgs args)
        {
            if (!MenuConfig.WJungler || !Spells.W.IsReady())
            {
                return;
            }

            var allyJungler = args.Source as AIHeroClient;

            if (allyJungler == null ||
                allyJungler.Distance(Player.ServerPosition) <= Spells.W.Range + 550 ||
                !allyJungler.Spellbook.GetSpell(SpellSlot.Summoner1).Name.ToLower().Contains("smite") ||
                !allyJungler.Spellbook.GetSpell(SpellSlot.Summoner2).Name.ToLower().Contains("smite") ||
                args.PingType != PingCategory.Fallback ||
                args.PingType != PingCategory.Danger)
            {
                return;
            }

            LeagueSharp.Common.Utility.DelayAction.Add(330, () => Spells.W.Cast(args.Position.To3D()));
        }
Ejemplo n.º 8
0
        void Game_OnPing(TacticalMapPingEventArgs args)
        {
            //if jungler pings OnMyWay
            //give him lantern for easy gank
            if (!Config.Item("autoW5", true).GetValue <bool>())
            {
                return;
            }
            var jungler = args.Source as AIHeroClient;

            if (jungler != null && jungler.Distance(Player.Position) <= W.Range + 500)
            {
                if (jungler.Spellbook.GetSpell(SpellSlot.Summoner1).Name.ToLower().Contains("smite") ||
                    jungler.Spellbook.GetSpell(SpellSlot.Summoner2).Name.ToLower().Contains("smite"))
                {
                    if (args.PingType == PingCategory.OnMyWay)
                    {
                        int random = new Random().Next(350, 750); // so it wont happen too fast
                        LeagueSharp.Common.Utility.DelayAction.Add(random, () => CastW(args.Position.To3D()));
                    }
                }
            }
        }
Ejemplo n.º 9
0
        private void Game_OnPing(TacticalMapPingEventArgs args)
        {
            try
            {
                    GameObject srcObject = args.Source;
                    AIHeroClient src = srcObject as AIHeroClient;
                    if (src == null)
                    {
                        return;
                    }

                    if (_menu[src.Name] != null && getCheckBoxItem(_menu, src.Name))
                    {
                        args.Process = false;
                        return;
                    }

                    GameObject target = args.Target;

                    if (args.PingType == PingCategory.OnMyWay || !src.IsValid) return;
                    Color c = Color.White;
                    switch (args.PingType)
                    {
                        case PingCategory.Fallback:
                        case PingCategory.EnemyMissing:
                            c = Color.LightYellow;
                            break;
                        case PingCategory.AssistMe:
                            c = Color.LightBlue;
                            break;
                        case PingCategory.Danger:
                            c = new Color(255, 204, 203);
                            break;
                    }

                    int selectedIndex = getBoxItem(_menu, "print");
                    String name;
                    switch (selectedIndex)
                    {
                        case 0:
                            name = src.ChampionName;
                            break;
                        case 1:
                            name = src.Name;
                            break;
                        default:
                            name = src.Name + " (" + src.ChampionName + ")";
                            break;
                    }
                    _pings.Add(new Ping(name, Game.Time + 2f, args.Position.X, args.Position.Y, target, c));
                }

            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Ejemplo n.º 10
0
        static void Game_OnPing(TacticalMapPingEventArgs args)
        {
            if (!getCheckBoxItem(wMenu, "autoW5")) return;
            var jungler = args.Source as AIHeroClient;
            if (jungler != null && jungler.LSDistance(Player.Position) <= W.Range + 500)
            {
                if (jungler.Spellbook.GetSpell(SpellSlot.Summoner1).Name.ToLower().Contains("smite") ||
                    jungler.Spellbook.GetSpell(SpellSlot.Summoner2).Name.ToLower().Contains("smite"))
                {
                    if (args.PingType == PingCategory.OnMyWay)
                    {
                        int random = new Random().Next(350, 750); // so it wont happen too fast
                        LeagueSharp.Common.Utility.DelayAction.Add(random, () => CastW(args.Position.To3D()));
                    }

                }
            }
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Raises the <see cref="E:Ping" /> event.
        /// </summary>
        /// <param name="args">The <see cref="GamePingEventArgs"/> instance containing the event data.</param>
        private void OnPing(TacticalMapPingEventArgs args)
        {
            if (!args.Source.IsMe && ShouldRun() && (args.Source is AIHeroClient))
            {
                var pingType = args.PingType;
                var srcHero = args.Source as AIHeroClient;
                if (pingType == PingCategory.Normal)
                {

                    var textObject = new Render.Text(
                        srcHero.ChampionName,
                        new Vector2(
                            Drawing.WorldToScreen(args.Position.To3D()).X,
                            Drawing.WorldToScreen(args.Position.To3D()).Y + 15), 17, SharpDX.Color.White)
                    {
                        PositionUpdate = () => new Vector2(
                            Drawing.WorldToScreen(args.Position.To3D()).X,
                            Drawing.WorldToScreen(args.Position.To3D()).Y + 30),
                        Centered = true
                    };
                    textObject.Add(0);
                    LeagueSharp.Common.Utility.DelayAction.Add(1000, () =>
                    {
                        textObject.Remove();
                    });
                }
            }
        }
Ejemplo n.º 12
0
        private void Game_OnPing(TacticalMapPingEventArgs args)
        {
            try
            {
                GameObject   srcObject = args.Source;
                AIHeroClient src       = srcObject as AIHeroClient;
                if (src == null)
                {
                    return;
                }

                if (_menu[src.Name] != null && getCheckBoxItem(_menu, src.Name))
                {
                    args.Process = false;
                    return;
                }

                GameObject target = args.Target;

                if (args.PingType == PingCategory.OnMyWay || !src.IsValid)
                {
                    return;
                }
                Color c = Color.White;
                switch (args.PingType)
                {
                case PingCategory.Fallback:
                case PingCategory.EnemyMissing:
                    c = Color.LightYellow;
                    break;

                case PingCategory.AssistMe:
                    c = Color.LightBlue;
                    break;

                case PingCategory.Danger:
                    c = new Color(255, 204, 203);
                    break;
                }

                int    selectedIndex = getBoxItem(_menu, "print");
                String name;
                switch (selectedIndex)
                {
                case 0:
                    name = src.ChampionName;
                    break;

                case 1:
                    name = src.Name;
                    break;

                default:
                    name = src.Name + " (" + src.ChampionName + ")";
                    break;
                }
                _pings.Add(new Ping(name, Game.Time + 2f, args.Position.X, args.Position.Y, target, c));
            }

            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Ejemplo n.º 13
0
 public PingInfo(TacticalMapPingEventArgs info, float starttick)
 {
     this.Info      = info;
     this.StartTick = starttick;
 }