Exemplo n.º 1
0
 public static void Load(EventArgs args)
 {
     if (ObjectManager.Player.ChampionName != "Kalista")
     {
         return;
     }
     SkillHandler.init();
     ItemHandler.init();
     MenuHandler.init();
     DrawingHandler.init();
     Game.OnGameUpdate += OnGameUpdateModes;
     AntiGapcloser.OnEnemyGapcloser += FightHandler.AntiGapCloser;
     Obj_AI_Hero.OnProcessSpellCast += FightHandler.OnProcessSpellCast;
 }
Exemplo n.º 2
0
        public static void OnDraw(EventArgs args)
        {
            if (Kalista.drawings)
            {
                if (MenuHandler.Config.Item("JumpTo").GetValue <KeyBind>().Active)
                {
                    DrawingHandler.getAvailableJumpSpots();
                }
                Spell[] spellList = { SkillHandler.Q, SkillHandler.W, SkillHandler.E, SkillHandler.R };

                foreach (var spell in spellList)
                {
                    var menuItem = MenuHandler.Config.Item(spell.Slot + "Range").GetValue <Circle>();
                    if (menuItem.Active && spell.Level > 0)
                    {
                        Utility.DrawCircle(ObjectManager.Player.Position, spell.Range, menuItem.Color);
                    }
                }
                bool drawHp     = MenuHandler.Config.Item("drawHp").GetValue <bool>();
                bool drawStacks = MenuHandler.Config.Item("drawStacks").GetValue <bool>();
                if (drawHp || drawStacks)
                {
                    int stacks;
                    foreach (var enemy in ObjectManager.Get <Obj_AI_Hero>().Where(ene => !ene.IsDead && ene.IsEnemy && ene.IsVisible))
                    {
                        if (drawHp)
                        {
                            unit = enemy;
                            drawDmg(MathHandler.getDamageToTarget(enemy), enemy.Health < MathHandler.getRealDamage(enemy) ? Color.Red : Color.Yellow);
                        }
                        if (drawStacks)
                        {
                            stacks = enemy.Buffs.FirstOrDefault(b => b.Name.ToLower() == "kalistaexpungemarker").Count;
                            if (stacks > 0)
                            {
                                Drawing.DrawText(enemy.HPBarPosition.X, enemy.HPBarPosition.Y - 5, Color.Red, "E:" + stacks + "H:" + (int)enemy.Health + "/D:" + (int)MathHandler.getRealDamage(enemy), enemy);
                            }
                        }
                    }
                }
                if (MenuHandler.Config.Item("drawESlow").GetValue <bool>())
                {
                    Utility.DrawCircle(ObjectManager.Player.Position, SkillHandler.E.Range - 110, Color.Pink);
                }
            }
        }