Example #1
0
 private void OnDrawingDraw(EventArgs args)
 {
     try
     {
         if (!Utils.ShouldDraw())
         {
             return;
         }
         if (W.Level > 0 && _wStacks != null && _wStacks.GetValue <bool>())
         {
             foreach (var enemy in
                      GameObjects.EnemyHeroes.Where(
                          e => e.IsHPBarRendered && e.Position.IsOnScreen() && e.IsValidTarget()))
             {
                 var stacks = GetWStacks(enemy) - 1;
                 if (stacks > -1)
                 {
                     var x = enemy.HPBarPosition.X + 45;
                     var y = enemy.HPBarPosition.Y - 25;
                     for (var i = 0; 3 > i; i++)
                     {
                         Drawing.DrawLine(
                             x + i * 20, y, x + i * 20 + 10, y, 10, i > stacks ? Color.DarkGray : Color.Orange);
                     }
                 }
             }
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
 }
Example #2
0
 private void OnDrawingDraw(EventArgs args)
 {
     try
     {
         if (!Utils.ShouldDraw(true))
         {
             return;
         }
         if (E.Level > 0 && _eStacks != null && _eStacks.GetValue <bool>())
         {
             var buff   = GetEBuff();
             var stacks = buff != null ? buff.Count - 1 : -1;
             if (stacks > -1)
             {
                 var x = Player.HPBarPosition.X + 40;
                 var y = Player.HPBarPosition.Y - 25;
                 for (var i = 0; 4 > i; i++)
                 {
                     Drawing.DrawLine(
                         x + i * 20, y, x + i * 20 + 10, y, 10, i > stacks ? Color.DarkGray : Color.Orange);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
 }
Example #3
0
        private void OnDrawingDraw(EventArgs args)
        {
            if (!Utils.ShouldDraw() || _ePercent == null)
            {
                return;
            }
            var ePercentCircle = _ePercent.GetValue <Circle>();

            if (ePercentCircle.Active && E.IsReady())
            {
                var sharpColor = new SharpDX.Color(
                    ePercentCircle.Color.R, ePercentCircle.Color.G, ePercentCircle.Color.B);
                var maxRange = E.Range * 1.5f;
                var targets  = GameObjects.EnemyHeroes.Cast <Obj_AI_Base>().Concat(GameObjects.Jungle);

                foreach (var enemy in
                         targets.Where(
                             e =>
                             e.IsValidTarget(maxRange) && e.Position.IsOnScreen() &&
                             (e is Obj_AI_Hero || Utils.IsBigJungle(e))))
                {
                    var damage = Rend.GetDamage(enemy);
                    if (damage > 0)
                    {
                        var percent = (int)(damage / enemy.Health * 100);
                        if (percent > 0)
                        {
                            var screen   = Drawing.WorldToScreen(enemy.Position);
                            var position = enemy.Team == GameObjectTeam.Neutral
                                ? new Vector2(screen.X, screen.Y + 30)
                                : new Vector2(enemy.HPBarPosition.X + 73, enemy.HPBarPosition.Y - 28);
                            _font.DrawTextCentered(percent + " %", position, sharpColor);
                        }
                    }
                }
            }
        }