Beispiel #1
0
        protected static float GetComboDamage(Obj_AI_Base unit)
        {
            if (MenuManager.IsCacheEnabled && ComboDamages.Exist(unit.NetworkId))
            {
                return(ComboDamages.Get(unit.NetworkId));
            }

            var damage = 0f;

            if (R.IsReady() && unit.IsValidTarget(R.Range))
            {
                damage += Damage.GetRDamage(unit);
            }
            if (HasExplosiveChargeBuff(unit))
            {
                damage += Damage.GetEPhysicalDamage(unit);
            }

            if (unit.IsValidTarget(Player.Instance.GetAutoAttackRange()))
            {
                damage += Player.Instance.GetAutoAttackDamageCached(unit, true);
            }

            if (MenuManager.IsCacheEnabled)
            {
                ComboDamages.Add(unit.NetworkId, damage);
            }
            return(damage);
        }
Beispiel #2
0
        protected static float GetComboDamage(Obj_AI_Base unit)
        {
            if (MenuManager.IsCacheEnabled && ComboDamages.Exist(unit.NetworkId))
            {
                return(ComboDamages.Get(unit.NetworkId));
            }

            var damage = Damage.GetWDamage(unit);

            if (Q.IsReady() && unit.IsValidTargetCached(Q.Range))
            {
                damage += Damage.GetQDamage(unit);
            }

            if (E.IsReady() && unit.IsValidTargetCached(E.Range))
            {
                damage += Player.Instance.GetSpellDamageCached(unit, SpellSlot.E);
            }

            if (R.IsReady() && unit.IsValidTargetCached(R.Range))
            {
                damage += Player.Instance.GetSpellDamageCached(unit, SpellSlot.R);
            }

            if (Player.Instance.IsInAutoAttackRange(unit))
            {
                damage += Player.Instance.GetAutoAttackDamageCached(unit, true);
            }

            if (MenuManager.IsCacheEnabled)
            {
                ComboDamages.Add(unit.NetworkId, damage);
            }
            return(damage);
        }
Beispiel #3
0
            public static float GetComboDamage(AIHeroClient enemy, int autos = 0)
            {
                if (MenuManager.IsCacheEnabled && ComboDamages.Exist(new KeyValuePair <int, int>(enemy.NetworkId, autos)))
                {
                    return(ComboDamages.Get(new KeyValuePair <int, int>(enemy.NetworkId, autos)));
                }

                float damage = 0;

                if ((Activator.Activator.Items[ItemsEnum.BladeOfTheRuinedKing] != null) &&
                    Activator.Activator.Items[ItemsEnum.BladeOfTheRuinedKing].ToItem().IsReady())
                {
                    damage += Player.Instance.GetItemDamage(enemy, ItemId.Blade_of_the_Ruined_King);
                }

                if ((Activator.Activator.Items[ItemsEnum.Cutlass] != null) && Activator.Activator.Items[ItemsEnum.Cutlass].ToItem().IsReady())
                {
                    damage += Player.Instance.GetItemDamage(enemy, ItemId.Bilgewater_Cutlass);
                }

                if ((Activator.Activator.Items[ItemsEnum.Gunblade] != null) && Activator.Activator.Items[ItemsEnum.Gunblade].ToItem().IsReady())
                {
                    damage += Player.Instance.GetItemDamage(enemy, ItemId.Hextech_Gunblade);
                }

                if (E.IsReady())
                {
                    damage += GetEDamage(enemy, true, autos > 0 ? autos : CountEStacks(enemy));
                }

                damage += Player.Instance.GetAutoAttackDamageCached(enemy, true) * autos < 1 ? 1 : autos;

                if (MenuManager.IsCacheEnabled)
                {
                    ComboDamages.Add(new KeyValuePair <int, int>(enemy.NetworkId, autos), damage);
                }

                return(damage);
            }