소스 검색

Add check for the unique case of hinterlands aetheryte not being in the same map

Dragon 4 년 전
부모
커밋
60675c533c
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      Location.cs

+ 4 - 2
Location.cs

@@ -490,8 +490,10 @@ namespace HuntBuddy
 				.OrderBy(x => x.distance)
 				.FirstOrDefault()?.rowId;
 
-			var nearestAetheryte = Plugin.DataManager.Excel.GetSheet<Aetheryte>()?.FirstOrDefault(x =>
-				x.IsAetheryte && x.Territory.Row == territoryType && x.RowId == nearestAetheryteId);
+			var nearestAetheryte = territoryType == 399 // Support the unique case of aetheryte not being in the same map
+				? mapRow.TerritoryType?.Value?.Aetheryte.Value
+				: Plugin.DataManager.Excel.GetSheet<Aetheryte>()?.FirstOrDefault(x =>
+					x.IsAetheryte && x.Territory.Row == territoryType && x.RowId == nearestAetheryteId);
 
 			if (nearestAetheryte == null)
 			{