public Class46(string string_2, string string_3) { Func<Cell, bool> func = null; this.scene_0 = null; this.d3Actor_0 = null; this.vector3_0 = null; this.bool_1 = false; this.cell_0 = null; this.list_0 = null; this.int_0 = 0; this.list_1 = null; this.ienumerable_0 = null; this.cell_1 = null; this.list_2 = null; this.int_1 = 0; this.list_3 = new List<Vector3>(); this.int_2 = 0; this.int_3 = 0; //base..ctor(); this.finderState_0 = Class46.FinderState.SearchForTargetScene; if (string.IsNullOrWhiteSpace(string_2)) { IEnumerable<Scene> arg_B3_0 = Framework.Navigator.LoadedScenes; if (Class46.func_0 == null) { Class46.func_0 = new Func<Scene, bool>(Class46.smethod_1); } Scene scene = arg_B3_0.First(Class46.func_0); IEnumerable<Cell> arg_D5_0 = Framework.Navigator.AllCells; if (func == null) { func = new Func<Cell, bool>(this.method_3); } this.ienumerable_0 = arg_D5_0.Where(func); this.scene_0 = scene; this.string_0 = scene.SNOName; this.finderState_0 = Class46.FinderState.SearchForUnit; } else { this.string_0 = string_2; } if (string.IsNullOrWhiteSpace(string_3)) { this.bool_0 = true; this.string_1 = ""; } else { this.bool_0 = false; this.string_1 = string_3; } }
private static bool smethod_6(Scene scene_0) { return scene_0.SceneId == Framework.Hero.CurrentSceneId; }
private bool method_6(Scene scene_1) { return scene_1.SNOName.Contains(this.string_0); }
private void method_1() { Func<Scene, bool> func = null; Func<Cell, bool> func2 = null; Func<Cell, float> func3 = null; Func<Vector3, float> func4 = null; if (Framework.Navigator.LoadedScenes.Count != this.int_1 || Class45.LastRan != this.int_2 || Class48.LastRan != this.int_3) { this.int_3 = Class48.LastRan; this.int_2 = Class45.LastRan; this.int_1 = Framework.Navigator.LoadedScenes.Count; this.list_3.Clear(); } if (this.scene_0 == null) { IEnumerable<Scene> arg_9E_0 = Framework.Navigator.LoadedScenes; if (func == null) { func = new Func<Scene, bool>(this.method_6); } this.scene_0 = arg_9E_0.FirstOrDefault(func); } else { if (this.ienumerable_0 == null) { IEnumerable<Cell> arg_D7_0 = Framework.Navigator.AllCells; if (func2 == null) { func2 = new Func<Cell, bool>(this.method_7); } this.ienumerable_0 = arg_D7_0.Where(func2); } if (this.cell_1 == null) { IEnumerable<Cell> arg_107_0 = this.ienumerable_0; if (func3 == null) { func3 = new Func<Cell, float>(this.method_8); } this.cell_1 = arg_107_0.OrderBy(func3).First<Cell>(); } this.list_2 = Framework.Navigator.GetPath(Framework.Hero.Position, this.cell_1.Center, 10f, 20f); if (this.list_2.Count > 0) { this.finderState_0 = Class46.FinderState.MoveToTargetScene; this.vector3_0 = new Vector3?(this.list_2.Last<Vector3>()); return; } } List<Vector3> openEnds = Framework.Navigator.OpenEnds; if (this.scene_0 == null && openEnds.Count == 0) { GClass0.smethod_0().method_4("Explorer: Target was not found!"); } else { if (this.list_3 != null && this.list_3.Count > 0) { while (this.list_3.Count > 0 && Framework.Hero.DistanceTo(this.list_3[0]) < 20f) { this.list_3.RemoveAt(0); } if (this.list_3.Count > 0) { Movement.MoveTo(this.list_3[0]); } } else { if (this.scene_0 != null) { IEnumerable<Vector3> arg_261_0 = openEnds; if (func4 == null) { func4 = new Func<Vector3, float>(this.method_9); } IOrderedEnumerable<Vector3> orderedEnumerable = arg_261_0.OrderBy(func4); foreach (Vector3 current in orderedEnumerable) { List<Vector3> path = Framework.Navigator.GetPath(Framework.Hero.Position, current, 10f, 20f); if (path.Count > 0) { this.list_3 = path; return; } } GClass0.smethod_0().method_4("Explorer: Cannot progress...."); } else { IOrderedEnumerable<Vector3> orderedEnumerable2; if (this.vector3_0.HasValue) { orderedEnumerable2 = openEnds.OrderBy(new Func<Vector3, float>(this.method_10)); } else { IEnumerable<Vector3> arg_332_0 = openEnds; if (Class46.func_1 == null) { Class46.func_1 = new Func<Vector3, float>(Class46.smethod_2); } orderedEnumerable2 = arg_332_0.OrderBy(Class46.func_1); } foreach (Vector3 current in orderedEnumerable2) { this.list_3 = Framework.Navigator.GetPath(Framework.Hero.Position, current, 10f, 20f); while (this.list_3.Count > 0 && Framework.Hero.DistanceTo(this.list_3[0]) < 20f) { this.list_3.RemoveAt(0); } if (this.list_3.Count > 0) { Movement.MoveTo(this.list_3[0]); return; } } GClass0.smethod_0().method_5("Cannot find a path to explore"); } } } }
public void method_2() { this.int_2 = -1; this.finderState_0 = Class46.FinderState.SearchForTargetScene; this.cell_0 = null; this.list_0 = null; this.list_1 = null; this.d3Actor_0 = null; this.scene_0 = null; this.ienumerable_0 = null; this.cell_1 = null; }