コード例 #1
0
        private static bool IsTargetKillable(EnemyInfo target, float countDown)
        {
            float totalUltDamage = (float)GetBaseUltSpellDamage(target.Player, Player);
            float targetHealth   = GetTargetHealth(target, countDown);

            if (totalUltDamage < targetHealth)
            {
                return(false);
            }

            return(true);
        }
コード例 #2
0
        private static float GetTargetHealth(EnemyInfo target, float additionalTime)
        {
            if (target.Player.IsHPBarRendered)
            {
                return(target.Player.Health);
            }

            float regen = (HasPotionActive(target.Player) && Program.BaseUltMenu["trackPotion"].Cast <CheckBox>().CurrentValue) ? target.Player.HPRegenRate + GetPotionRegenRate(GetPotionBuff(target.Player)) : target.Player.HPRegenRate;

            float predictedHealth = target.Player.Health + (regen * ((Core.GameTickCount - target.LastSeen + additionalTime) / 1000f));

            return(predictedHealth > target.Player.MaxHealth ? target.Player.MaxHealth : predictedHealth);
        }
コード例 #3
0
ファイル: OfficialAddon.cs プロジェクト: xTeKillax/EloBuddy
        private static bool IsTargetKillable(EnemyInfo target, float countDown)
        {
            float totalUltDamage = (float)GetBaseUltSpellDamage(target.Player, Player);
            float targetHealth = GetTargetHealth(target, countDown);

            if (totalUltDamage < targetHealth)
                return false;

            return true;
        }
コード例 #4
0
ファイル: OfficialAddon.cs プロジェクト: xTeKillax/EloBuddy
        private static float GetTargetHealth(EnemyInfo target, float additionalTime)
        {
            if (target.Player.IsHPBarRendered)
                return target.Player.Health;

            float regen = (HasPotionActive(target.Player) && Program.BaseUltMenu["trackPotion"].Cast<CheckBox>().CurrentValue) ? target.Player.HPRegenRate + GetPotionRegenRate(GetPotionBuff(target.Player)) : target.Player.HPRegenRate;

            float predictedHealth = target.Player.Health + (regen * ((Core.GameTickCount - target.LastSeen + additionalTime) / 1000f));

            return predictedHealth > target.Player.MaxHealth ? target.Player.MaxHealth : predictedHealth;
        }