public void CreatePathGraph(string continent) { MPQTriangleSupplier mpq = new MPQTriangleSupplier(this.logger); mpq.SetContinent(continent); var triangleWorld = new ChunkedTriangleCollection(512, this.logger); triangleWorld.SetMaxCached(512); triangleWorld.AddSupplier(mpq); PathGraph = new PathGraph(continent, triangleWorld, null, this.logger); this.continent = continent; }
public Pather(string continent) { Continent = continent; var mpq = new MPQTriangleSupplier(); mpq.SetContinent(continent); var triangleWorld = new ChunkedTriangleCollection(512); triangleWorld.SetMaxCached(64); triangleWorld.AddSupplier(mpq); PG = new PathGraph(continent, triangleWorld, null, (string s) => { Log.WriteLine(s); }); }
public void Init(string iContinent) { continent = iContinent; mpq = new MPQTriangleSupplier(); mpq.SetContinent(continent); triangleWorld = new ChunkedTriangleCollection(512); triangleWorld.SetMaxCached(9); triangleWorld.AddSupplier(mpq); /* After the init routines we create a PathGraph object (as before you can replace Kalimdor with whatever you need */ world = new Pather.Graph.PathGraph(continent, triangleWorld, null); }
public void Init(string iContinent) { continent = iContinent; mpq = new MPQTriangleSupplier(); mpq.SetContinent(continent); triangleWorld = new ChunkedTriangleCollection(512); triangleWorld.SetMaxCached(9); triangleWorld.AddSupplier(mpq); /* After the init routines we create a PathGraph object (as before * you can replace Kalimdor with whatever you need */ world = new Pather.Graph.PathGraph(continent, triangleWorld, null); }
private void Startup() { RunState = RunState_e.Paused; WantedState = RunState_e.Running; BoogieCore.Log(LogType.System, "TotalMemory before " + System.GC.GetTotalMemory(true) / (1024 * 1024) + " MB"); WasAt = null; string zone = FigureOutZone(); MPQTriangleSupplier mpq = new MPQTriangleSupplier(); CurrentContinent = mpq.SetZone(zone); BoogieCore.Log(LogType.System, "Zone is : " + zone); BoogieCore.Log(LogType.System, "Continent is : " + CurrentContinent); string myFaction = "Unknown"; ChunkedTriangleCollection triangleWorld = new ChunkedTriangleCollection(512); triangleWorld.SetMaxCached(9); triangleWorld.AddSupplier(mpq); world = new PathGraph(CurrentContinent, triangleWorld, null); mover = new Mover(); radar = new UnitRadar(); BoogieCore.Log(LogType.System, "Pather loaded!"); while (ShouldRun) { Thread.Sleep(100); } }
static void Main() { //This init code is almost copy/pasted from PPather. Depending of where //yo are, you can replace Kalimdor with one of: //AhnQiraj //AhnQirajTemple //AlliancePVPBarracks //AuchindounDemon //AuchindounDraenei //AuchindounEthereal //AuchindounShadow //Azeroth //Blackfathom //BlackrockDepths //BlackRockSpire //BlackTemple //BlackwingLair //bladesedgearena //CavernsOfTime //CoilfangDraenei //CoilfangMarsh //CoilfangPumping //CoilfangRaid //Collin //CraigTest //DalaranArena //DeadminesInstance //DeeprunTram //development_nonweighted //DireMaul //EmeraldDream //Expansion01 //GnomeragonInstance //GruulsLair //HellfireDemon //HellfireMilitary //HellfireRaid //HellfireRampart //HillsbradPast //HordePVPBarracks //HyjalPast //Kalimdor //Karazahn //Mauradon //MoltenCore //Monastery //MonasteryInstances //NetherstormBG //OnyxiaLairInstance //OrgrimmarArena //OrgrimmarInstance //PVPLordaeron //PVPZone01 //PVPZone02 //PVPZone03 //PVPZone04 //PVPZone05 //RazorfenDowns //RazorfenKraulInstance //SchoolofNecromancy //ScottTest //Shadowfang //StormwindJail //StormwindPrison //Stratholme //SunkenTemple //Sunwell5Man //Sunwell5ManFix //SunwellPlateau //TanarisInstance //TempestKeepArcane //TempestKeepAtrium //TempestKeepFactory //TempestKeepRaid //test //Uldaman //WailingCaverns //Zul'gurub //ZulAman var mpq = new MPQTriangleSupplier(); mpq.SetContinent("Expansion01"); var triangleWorld = new ChunkedTriangleCollection(512); triangleWorld.SetMaxCached(9); triangleWorld.AddSupplier(mpq); /* After the init routines we create a PathGraph object (as before you can replace Kalimdor with whatever you need */ var world = new Pather.Graph.PathGraph("Expansion01", triangleWorld, null); // Here we define the starting point (somewhere in the orc noob village) var origin = new Pather.Graph.Location(240.94f, 2692.39f, 89.74f); // Here we define our destination (somewhere in Razor Hill) var destination = new Pather.Graph.Location(189.63f, 2690.94f, 88.71f); // We try to find a path var mypath = world.CreatePath(origin, destination, 5f); /* We save the PathGraph. Stores every chunk of the map we used in the PPather\PathInfo\{map} folder */ world.Save(); // Print the path Console.WriteLine("Second attempt. Press a key"); Console.ReadKey(); mypath = world.CreatePath(origin, destination, 5f); Console.WriteLine("Third attempt. Press a key"); Console.ReadKey(); mypath = world.CreatePath(origin, destination, 5f); // Print the path Console.WriteLine("Press a key to print the path"); Console.ReadKey(); foreach (Pather.Graph.Location loc in mypath.locations) { Console.WriteLine("X: {0} Y: {1} Z: {2}", loc.X, loc.Y, loc.Z); } Console.WriteLine("End of program. Press a key"); Console.ReadKey(); }
static void Main() { //This init code is almost copy/pasted from PPather. Depending of where //yo are, you can replace Kalimdor with one of: //AhnQiraj //AhnQirajTemple //AlliancePVPBarracks //AuchindounDemon //AuchindounDraenei //AuchindounEthereal //AuchindounShadow //Azeroth //Blackfathom //BlackrockDepths //BlackRockSpire //BlackTemple //BlackwingLair //bladesedgearena //CavernsOfTime //CoilfangDraenei //CoilfangMarsh //CoilfangPumping //CoilfangRaid //Collin //CraigTest //DalaranArena //DeadminesInstance //DeeprunTram //development_nonweighted //DireMaul //EmeraldDream //Expansion01 //GnomeragonInstance //GruulsLair //HellfireDemon //HellfireMilitary //HellfireRaid //HellfireRampart //HillsbradPast //HordePVPBarracks //HyjalPast //Kalimdor //Karazahn //Mauradon //MoltenCore //Monastery //MonasteryInstances //NetherstormBG //OnyxiaLairInstance //OrgrimmarArena //OrgrimmarInstance //PVPLordaeron //PVPZone01 //PVPZone02 //PVPZone03 //PVPZone04 //PVPZone05 //RazorfenDowns //RazorfenKraulInstance //SchoolofNecromancy //ScottTest //Shadowfang //StormwindJail //StormwindPrison //Stratholme //SunkenTemple //Sunwell5Man //Sunwell5ManFix //SunwellPlateau //TanarisInstance //TempestKeepArcane //TempestKeepAtrium //TempestKeepFactory //TempestKeepRaid //test //Uldaman //WailingCaverns //Zul'gurub //ZulAman var mpq = new MPQTriangleSupplier(); mpq.SetContinent("Expansion01"); var triangleWorld = new ChunkedTriangleCollection(512); triangleWorld.SetMaxCached(9); triangleWorld.AddSupplier(mpq); /* After the init routines we create a PathGraph object (as before * you can replace Kalimdor with whatever you need */ var world = new Pather.Graph.PathGraph("Expansion01", triangleWorld, null); // Here we define the starting point (somewhere in the orc noob village) var origin = new Pather.Graph.Location(240.94f, 2692.39f, 89.74f); // Here we define our destination (somewhere in Razor Hill) var destination = new Pather.Graph.Location(189.63f, 2690.94f, 88.71f); // We try to find a path var mypath = world.CreatePath(origin, destination, 5f); /* We save the PathGraph. Stores every chunk of the map we used in the * PPather\PathInfo\{map} folder */ world.Save(); // Print the path Console.WriteLine("Second attempt. Press a key"); Console.ReadKey(); mypath = world.CreatePath(origin, destination, 5f); Console.WriteLine("Third attempt. Press a key"); Console.ReadKey(); mypath = world.CreatePath(origin, destination, 5f); // Print the path Console.WriteLine("Press a key to print the path"); Console.ReadKey(); foreach (Pather.Graph.Location loc in mypath.locations) { Console.WriteLine("X: {0} Y: {1} Z: {2}", loc.X, loc.Y, loc.Z); } Console.WriteLine("End of program. Press a key"); Console.ReadKey(); }