Пример #1
0
 /// <summary>
 /// This function will return the distance in meters.
 /// The manual distance units are in map compass units, while the distance units used in the UI are meters.
 /// In AC there are 240 meters in a kilometer; thus if you set your attack range to 1 in the UI it
 /// will showas 0.00416666666666667in the manual options (0.00416666666666667 being 1/240). 
 /// </summary>
 /// <param name="obj1"></param>
 /// <param name="obj2"></param>
 /// <returns></returns>
 /// <exception cref="ArgumentOutOfRangeException">Object passed with an Id of 0</exception>
 public static double GetDistance(WorldObject obj1, WorldObject obj2)
 {
     return GetDistance(obj1.Wrap(), obj2.Wrap());
 }
Пример #2
0
 /// <summary>
 /// This function will return the distance in meters.
 /// The manual distance units are in map compass units, while the distance units used in the UI are meters.
 /// In AC there are 240 meters in a kilometer; thus if you set your attack range to 1 in the UI it
 /// will showas 0.00416666666666667in the manual options (0.00416666666666667 being 1/240). 
 /// </summary>
 /// <param name="destObj"></param>
 /// <returns></returns>
 /// <exception cref="ArgumentOutOfRangeException">CharacterFilder.Id or Object passed with an Id of 0</exception>
 public static double GetDistanceFromSelf(WorldObject destObj)
 {
     return GetDistanceFromSelf(destObj.Wrap());
 }