فهرست منبع

Fix distance checking for "/phb next"

I hate dealing with position and coordinates, but it should be fixed now
Lilith Song 3 سال پیش
والد
کامیت
b8ced43c23
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      HuntBuddy/Plugin.cs

+ 2 - 1
HuntBuddy/Plugin.cs

@@ -165,7 +165,8 @@ namespace HuntBuddy
 					{
 						var openType = Location.OpenType.None;
 						var playerLocation = Plugin.ClientState.LocalPlayer!.Position;
-						var playerVec2 = new Vector2(playerLocation.X, playerLocation.Z);
+						var map = Plugin.DataManager.GetExcelSheet<TerritoryType>()!.GetRow(Plugin.ClientState.TerritoryType)!.Map!.Value!;
+						var playerVec2 = MapUtil.WorldToMap(new Vector2(playerLocation.X, playerLocation.Z), map);
 						var chosen = this.CurrentAreaMobHuntEntries
 							.Where(entry => this.MobHuntStruct->CurrentKills[entry.CurrentKillsOffset] < entry.NeededKills)
 							.OrderBy(entry => Vector2.Distance(Location.Database[entry.MobHuntId].Coordinate, playerVec2))