Example #1
0
        static void Drawing_OnDraw(EventArgs args)
        {
            if (Settings.ShowKillable)
            {
                foreach (var unit in ObjectManager.Get <AIHeroClient>().Where(h => h.IsValid && h.IsHPBarRendered && h.IsEnemy))
                {
                    var barPos = unit.HPBarPosition;
                    var damage = DamageToUnit(unit);
                    var percentHealthAfterDamage = Math.Max(0, unit.Health - damage) / unit.MaxHealth;
                    var yPos          = barPos.Y + yOffset;
                    var xPosDamage    = barPos.X + xOffset + Width * percentHealthAfterDamage;
                    var xPosCurrentHp = barPos.X + xOffset + Width * unit.Health / unit.MaxHealth;

                    if (damage > unit.Health)
                    {
                        TextKillable.Position  = new Vector2((int)barPos.X - 15, (int)barPos.Y + yOffset + 20);
                        TextKillable.TextValue = "连招可击杀!";
                        TextKillable.Color     = System.Drawing.Color.LimeGreen;
                    }
                    else
                    {
                        TextKillable.Position  = new Vector2((int)barPos.X, (int)barPos.Y + yOffset + 20);
                        TextKillable.TextValue = "不可击杀!";
                        TextKillable.Color     = System.Drawing.Color.Red;
                    }

                    TextKillable.Draw();
                }
            }
        }
        static void Drawing_OnDraw(EventArgs args)
        {
            if (Settings.ShowKillable)
            {
                foreach (var unit in ObjectManager.Get <AIHeroClient>().Where(h => h.IsValid && h.IsHPBarRendered && h.IsEnemy))
                {
                    var barPos = unit.HPBarPosition;
                    var damage = DamageToUnit(unit);

                    if (damage > unit.Health)
                    {
                        TextKillable.Position  = new Vector2((int)barPos.X - 15, (int)barPos.Y + YOffset + 20);
                        TextKillable.TextValue = "Killable with Combo!";
                        TextKillable.Color     = System.Drawing.Color.LimeGreen;
                    }
                    else
                    {
                        TextKillable.Position  = new Vector2((int)barPos.X, (int)barPos.Y + YOffset + 20);
                        TextKillable.TextValue = "Not Killable!";
                        TextKillable.Color     = System.Drawing.Color.Red;
                    }

                    TextKillable.Draw();
                }
            }
        }