Пример #1
0
        public float GetTargetHealth(EnemyHeros playerHeros, int additionalTime)
        {
            if (playerHeros.Player.IsVisible) return playerHeros.Player.Health;

            var predictedhealth = playerHeros.Player.Health
                                  + playerHeros.Player.HPRegenRate
                                  * ((Environment.TickCount - playerHeros.LastSeen + additionalTime) / 1000f);

            return predictedhealth > playerHeros.Player.MaxHealth ? playerHeros.Player.MaxHealth : predictedhealth;
        }
Пример #2
0
        public float GetTargetHealth(EnemyHeros playerHeros, int additionalTime)
        {
            if (playerHeros.Player.IsVisible)
            {
                return(playerHeros.Player.Health);
            }

            var predictedhealth = playerHeros.Player.Health
                                  + playerHeros.Player.HPRegenRate
                                  * ((Environment.TickCount - playerHeros.LastSeen + additionalTime) / 1000f);

            return(predictedhealth > playerHeros.Player.MaxHealth ? playerHeros.Player.MaxHealth : predictedhealth);
        }