Преглед на файлове

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)
 			{