コード例 #1
0
ファイル: Drawings.cs プロジェクト: fgpmaia123/LeagueSharp-25
        private static void DamageIndicator(EventArgs args)
        {
            if (Config.Item("Draw_Disabled").GetValue <bool>())
            {
                return;
            }

            int mode = Config.Item("dmgdrawer", true).GetValue <StringList>().SelectedIndex;

            if (mode == 0)
            {
                foreach (var enemy in ObjectManager.Get <Obj_AI_Hero>().Where(enemy => enemy.Team != player.Team))
                {
                    if (enemy.IsVisible && !enemy.IsDead)
                    {
                        var combodamage = (PewPewQuinn.CalcDamage(enemy));

                        var PercentHPleftAfterCombo = (enemy.Health - combodamage) / enemy.MaxHealth;
                        var PercentHPleft           = enemy.Health / enemy.MaxHealth;
                        if (PercentHPleftAfterCombo < 0)
                        {
                            PercentHPleftAfterCombo = 0;
                        }

                        var hpBarPos = enemy.HPBarPosition;
                        hpBarPos.X += 45;
                        hpBarPos.Y += 18;
                        double comboXPos     = hpBarPos.X - 36 + (107 * PercentHPleftAfterCombo);
                        double currentHpxPos = hpBarPos.X - 36 + (107 * PercentHPleft);
                        var    diff          = currentHpxPos - comboXPos;
                        for (var i = 0; i < diff; i++)
                        {
                            Drawing.DrawLine(
                                (float)comboXPos + i, hpBarPos.Y + 2, (float)comboXPos + i,
                                hpBarPos.Y + 10, 1, Config.Item("dmgcolor").GetValue <Circle>().Color);
                            Utility.HpBarDamageIndicator.Enabled = false;
                        }
                    }
                }
            }
            if (mode == 1)
            {
                Utility.HpBarDamageIndicator.DamageToUnit = PewPewQuinn.CalcDamage;
                Utility.HpBarDamageIndicator.Color        = Config.Item("dmgcolor").GetValue <Circle>().Color;
                Utility.HpBarDamageIndicator.Enabled      = true;
            }
        }
コード例 #2
0
ファイル: Drawings.cs プロジェクト: fgpmaia123/LeagueSharp-25
        private static void HuDisplay(EventArgs args)
        {
            if (Config.Item("Draw_Disabled").GetValue <bool>())
            {
                return;
            }

            var target = TargetSelector.GetTarget(1000, TargetSelector.DamageType.Physical);
            var epos   = Drawing.WorldToScreen(target.Position);

            if (PewPewQuinn.DiveDmgCalc(target) > target.Health && Config.Item("UseRDE").GetValue <bool>() &&
                E.IsReady() && R.IsReady() && player.CountEnemiesInRange(800) <= Config.Item("enear").GetValue <Slider>().Value &&
                target.CountEnemiesInRange(1000) <= Config.Item("enear").GetValue <Slider>().Value)
            {
                Drawing.DrawText(epos.X, epos.Y, Color.Yellow, "R-E-IGNITE-R-AA Possible");
            }



            if (Config.Item("HUD").GetValue <bool>())
            {
                if (Config.Item("AutoHarass").GetValue <KeyBind>().Active)
                {
                    Drawing.DrawText(Drawing.Width * 0.90f, Drawing.Height * 0.68f, System.Drawing.Color.Yellow,
                                     "Auto Harass : On");
                }
                else
                {
                    Drawing.DrawText(Drawing.Width * 0.90f, Drawing.Height * 0.68f, System.Drawing.Color.Tomato,
                                     "Auto Harass : Off");
                }


                if (Config.Item("HUD").GetValue <bool>())
                {
                    Drawing.DrawText(Drawing.Width * 0.90f, Drawing.Height * 0.72f, System.Drawing.Color.Yellow, "Minions Killed: " + player.MinionsKilled);
                }

                if (Config.Item("HUD").GetValue <bool>())
                {
                    Drawing.DrawText(Drawing.Width * 0.90f, Drawing.Height * 0.70f, System.Drawing.Color.Yellow, "Total Kills: " + player.ChampionsKilled);
                }

                if (Config.Item("HUD").GetValue <bool>())
                {
                    Drawing.DrawText(Drawing.Width * 0.90f, Drawing.Height * 0.74f, System.Drawing.Color.Yellow, "Total Gold: " + player.GoldTotal);
                }


                if (Config.Item("emgapcloser").GetValue <bool>())
                {
                    Drawing.DrawText(Drawing.Width * 0.90f, Drawing.Height * 0.66f, System.Drawing.Color.Yellow,
                                     "Minion Gapcloser: On");
                }
                else
                {
                    Drawing.DrawText(Drawing.Width * 0.90f, Drawing.Height * 0.66f, System.Drawing.Color.Tomato,
                                     "Minion Gapcloser : Off");
                }
            }
        }