December 7, 20178 yr Ignoring the pseudo datasource, is this how flightmasters are added programmatically? private static void addForFilter(CreatureFilter filter) { List<creature> flightmasters = DbCreature.Get(filter); foreach (var creature in flightmasters) { TaxiNode node = new TaxiNode { Active = true, ContinentId = creature.map, Name = creature.Name, Position = creature.Position, }; //PluginLog.Log("Adding " + node.Name + " to taxi db"); Taxi.TaxiList.AddOrEditForCurrentPlayer(node); } Taxi.TaxiList.Save(); }
December 7, 20178 yr Hello, like this var t = new TaxiNode(slotIndex, name, new Vector3(x, y, z), Usefuls.ContinentId); if (t.IsValid()) { t.Active = true; TaxiList.AddOrEditForCurrentPlayer(t); }
December 7, 20178 yr Author So slotIndex not required because wRobot checks dbc to be safe? Sounds good.
December 21, 20178 yr Author I still don't completely understand this. On one character, I have a couple flight paths. However, when checking with the following method, the list is empty (no IsCharacterAvailable for all nodes). private static bool HasTaxiConnection() { var taxiList = Taxi.TaxiList.GetTaxiNodesOfCurrentPlayer(); return wManagerSetting.CurrentSetting.FlightMasterTaxiUse && taxiList.Exists(n => n.Name == "Ironforge, Dun Morogh" || n.Name == "Gryth Thurden") && taxiList.Exists(n => n.Name == "Stormwind, Elwynn" || n.Name == "Dungar Longdrink"); } This is after I use the code in the original post. The entries in the original post also don't show up, when opening TaxiDB in development tools. Can you maybe explain this a little? Should I ever add TaxiNodes to wRobot or should I always let wRobot do the adding himself? My goal was to teach wRobot that there are taxis nearby and then let it walk up to the flightmaster before finding out can/can't use it. How do I best achieve that - should I just fill a large TaxiDB manually and share the XML file with others?
Create an account or sign in to comment