public static float GetProjectileSpeed(Hero unit) { //Console.WriteLine(unit.AttacksPerSecond * Game.FindKeyValues(unit.Name + "/AttackRate", KeyValueSource.Hero).FloatValue / 0.01); //var ProjectileSpeed = Game.FindKeyValues(unit.Name + "/ProjectileSpeed", KeyValueSource.Unit).FloatValue; var ProjectileSpeed = UnitDatabase.GetByName(unit.Name).ProjectileSpeed; return((float)ProjectileSpeed); }
public static double GetTurnTime(this Entity unit, Vector3 position) { var data = UnitDatabase.GetByClassId(unit.ClassID) ?? UnitDatabase.GetByName(unit.Name); if (data == null) { return (Math.Max( Math.Abs(FindAngleR(unit) - Utils.DegreeToRadian(unit.FindAngleBetween(position))) - 0.69, 0) / (0.5 * (1 / 0.03))); } var turnRate = data.TurnRate; return(Math.Max( Math.Abs(FindAngleR(unit) - Utils.DegreeToRadian(unit.FindAngleBetween(position))) - 0.69, 0) / (turnRate * (1 / 0.03))); }
public static float GetProjectileSpeed(Entity unit) { return(Var.Me.ClassID == ClassID.CDOTA_Unit_Hero_ArcWarden ? 800 : UnitDatabase.GetByName(unit.Name).ProjectileSpeed); }