예제 #1
0
        public static float CalculateComboDamage(Obj_AI_Hero target, bool rangeCheck = true)
        {
            if (_menu == null || target == null || !_menu.Item(_menu.Name + ".enabled").GetValue <bool>())
            {
                return(0f);
            }
            try
            {
                var ignite = _menu.Item(_menu.Name + ".ignite").GetValue <bool>() && Ignite.Exists() && Ignite.IsReady();
                var smite  = _menu.Item(_menu.Name + ".smite").GetValue <bool>() &&
                             (BlueSmite.Exists() && BlueSmite.IsReady() || RedSmite.Exists() && RedSmite.IsReady());

                if (!ignite && !smite)
                {
                    return(0f);
                }
                var distance = target.Position.Distance(ObjectManager.Player.Position, true);

                var damage = 0f;
                if (ignite && (!rangeCheck || distance <= Math.Pow(Ignite.Range, 2)))
                {
                    damage += (float)ObjectManager.Player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);
                }
                if (smite)
                {
                    if (!rangeCheck || distance <= Math.Pow(BlueSmite.Range, 2))
                    {
                        damage += CalculateBlueSmiteDamage();
                    }
                    if (!rangeCheck || distance <= Math.Pow(RedSmite.Range, 2))
                    {
                        damage += CalculateRedSmiteDamage();
                    }
                }
                return(damage);
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
            return(0f);
        }
예제 #2
0
 public static bool HasSmite(Obj_AI_Hero hero)
 {
     return(Smite.Exists(hero) || BlueSmite.Exists(hero) || RedSmite.Exists(hero));
 }