Esempio n. 1
0
        private static void OnEnemyGapcloser(CActiveCGapcloser gapcloser)
        {
            if (!getCheckBoxItem(MenuGenerator.miscOptions, "com.ilucian.misc.gapcloser"))
            {
                return;
            }

            if (!gapcloser.Sender.IsEnemy || !(gapcloser.End.LSDistance(ObjectManager.Player.ServerPosition) < 300)) return;

            if (Variables.Spell[Variables.Spells.E].IsReady())
            {
                Variables.Spell[Variables.Spells.E].Cast(
                    ObjectManager.Player.ServerPosition.LSExtend(gapcloser.End, -475));
            }
        }
Esempio n. 2
0
 private void OnEnemyCustomGapcloser(CActiveCGapcloser cGapcloser)
 {
     if (cGapcloser.Sender.IsEnemy && cGapcloser.End.Distance(ObjectManager.Player.ServerPosition) < 300 && !cGapcloser.Sender.IsDead && Spells[E].IsReady() && Config.Item("CUSTOMANTIGAPE").GetValue<bool>())
     {
         int idx = Config.Item("CUSTOMANTIGAPEMETHOD").GetValue<StringList>().SelectedIndex;
         if (idx == 0)
             Spells[E].Cast(ObjectManager.Player.ServerPosition.To2D() + (cGapcloser.End - cGapcloser.Start).To2D().Normalized().Perpendicular() * Spells[E].Range);
         else
             Spells[E].Cast(ObjectManager.Player.ServerPosition.To2D() + (cGapcloser.End - cGapcloser.Start).To2D().Normalized() * Spells[E].Range);
     }
 }