Пример #1
0
        private void OnDraw(EventArgs args)
        {
            try
            {
                if (!Enabled)
                {
                    return;
                }

                foreach (ObjectMinion objectMinion in _objectMinions.Where(camp => !(camp.NextRespawnTime <= 0f)))
                {
                    Utilities.DrawTextCentered(objectMinion.MinimapPosition,
                                               Menu.Item(Name + "DrawingColor").GetValue <Color>(),
                                               ((int)(objectMinion.NextRespawnTime - Game.Time)).ToString(CultureInfo.InvariantCulture));
                }

                foreach (ObjectBarrack objectBarracks in _objectBarracks.Where(camp => !(camp.NextRespawnTime <= 0f)))
                {
                    Utilities.DrawTextCentered(objectBarracks.MinimapPosition,
                                               Menu.Item(Name + "DrawingColor").GetValue <Color>(),
                                               ((int)(objectBarracks.NextRespawnTime - Game.Time)).ToString(CultureInfo.InvariantCulture));
                }
            }
            catch (Exception ex)
            {
                Logger.WriteBlock(ex.Message, ex.ToString());
            }
        }
Пример #2
0
        private void OnDraw(EventArgs args)
        {
            try
            {
                if (!Enabled)
                {
                    return;
                }

                var crossColor = Menu.Item(Name + "DrawingCrossColor").GetValue <Color>();
                var lineColor  = Menu.Item(Name + "DrawingLineColor").GetValue <Color>();

                foreach (Obj_AI_Hero hero in from hero in ObjectManager.Get <Obj_AI_Hero>()
                         where hero.IsValid && !hero.IsDead
                         where Menu.Item(Name + "DrawAlly").GetValue <Boolean>() || !hero.IsAlly
                         where Menu.Item(Name + "DrawEnemy").GetValue <Boolean>() || !hero.IsEnemy
                         select hero)
                {
                    var arrivalTime = 0.0f;
                    var waypoints   = hero.GetWaypoints();
                    for (int i = 0, l = waypoints.Count - 1; i < l; i++)
                    {
                        if (waypoints[i].IsValid() && waypoints[i + 1].IsValid())
                        {
                            var current = Drawing.WorldToScreen(waypoints[i].To3D());
                            var next    = Drawing.WorldToScreen(waypoints[i + 1].To3D());

                            if (Utilities.IsOnScreen(current, next))
                            {
                                arrivalTime += (Vector3.Distance(waypoints[i].To3D(), waypoints[i + 1].To3D()) /
                                                (ObjectManager.Player.MoveSpeed / 1000)) / 1000;
                                Drawing.DrawLine(current.X, current.Y, next.X, next.Y, 1, lineColor);
                                if (i == l - 1 && arrivalTime > 0.1f)
                                {
                                    Utilities.DrawCross(next, 10f, 2f, crossColor);
                                    Utilities.DrawTextCentered(new Vector2(next.X - 5, next.Y + 15), crossColor,
                                                               arrivalTime.ToString("0.0"));
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Logger.WriteBlock(ex.Message, ex.ToString());
            }
        }
Пример #3
0
        private void OnDraw(EventArgs args)
        {
            try
            {
                if (!Enabled)
                {
                    return;
                }

                foreach (ImmuneHero iHero in _immuneHero.ToList().Where(iHero => iHero.TimeUsed != -1))
                {
                    Utilities.DrawTextCentered(
                        new Vector2(iHero.Hero.HPBarPosition.X + 75f, iHero.Hero.HPBarPosition.Y - 30f),
                        Menu.Item(Name + "Drawing" + (iHero.Hero.IsAlly ? "Ally" : "Enemy") + "Color").GetValue <Color>(),
                        (iHero.TimeUsed - Game.Time + iHero.Struct.Delay).ToString("0.0"));
                }

                foreach (var hero in ObjectManager.Get <Obj_AI_Hero>())
                {
                    if (hero.IsValid && (hero.IsAlly && Menu.Item(Name + "ShowAlly").GetValue <bool>() ||
                                         hero.IsEnemy && Menu.Item(Name + "ShowEnemy").GetValue <bool>()))
                    {
                        foreach (
                            var buff in
                            hero.Buffs.Where(
                                buff =>
                                buff.IsActive &&
                                (buff.Type == BuffType.Invulnerability || _immuneBuffs.Contains(buff.Name))))
                        {
                            Utilities.DrawTextCentered(
                                new Vector2(hero.HPBarPosition.X + 75f, hero.HPBarPosition.Y - 30f),
                                Menu.Item(Name + "Drawing" + (hero.IsAlly ? "Ally" : "Enemy") + "Color")
                                .GetValue <Color>(),
                                (buff.EndTime - Game.Time).ToString("0.0"));
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Logger.WriteBlock(ex.Message, ex.ToString());
            }
        }
Пример #4
0
        private void OnDraw(EventArgs args)
        {
            try
            {
                if (!Enabled)
                {
                    return;
                }

                foreach (Camp camp in _camps.Where(camp => !(camp.NextRespawnTime <= 0f)))
                {
                    Utilities.DrawTextCentered(Drawing.WorldToMinimap(camp.Position),
                                               Menu.Item(Name + "DrawingColor").GetValue <Color>(),
                                               ((int)(camp.NextRespawnTime - Game.Time)).ToString(CultureInfo.InvariantCulture));
                }
            }
            catch (Exception ex)
            {
                Logger.WriteBlock(ex.Message, ex.ToString());
            }
        }