Esempio n. 1
0
 public static DiaGizmo FindNearestDeathGateToPosition(Vector3 position, Dictionary <Vector3, DateTime> ignoreList)
 {
     if (ignoreList == null)
     {
         ignoreList = new Dictionary <Vector3, DateTime>();
     }
     //328830
     if (ExplorationData.FortressLevelAreaIds.Contains(AdvDia.CurrentLevelAreaId) || ExplorationData.FortressWorldIds.Contains(AdvDia.CurrentWorldId))
     {
         var gizmo =
             ZetaDia.Actors.GetActorsOfType <DiaObject>(true)
             .Where(u => u.IsValid && u.ActorSnoId == 328830 && !NavigationCoroutine.IsDeathGateIgnored(u.Position, ignoreList))
             .OrderBy(u => u.Position.Distance(position))
             .FirstOrDefault();
         return(gizmo as DiaGizmo);
     }
     return(null);
 }