Matenia 627 Posted December 7, 2017 Share Posted December 7, 2017 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(); } Link to comment Share on other sites More sharing options...
Droidz 2737 Posted December 7, 2017 Share Posted December 7, 2017 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); } Link to comment Share on other sites More sharing options...
Matenia 627 Posted December 7, 2017 Author Share Posted December 7, 2017 How can I find the slotIndex? Thanks for the help. Link to comment Share on other sites More sharing options...
Droidz 2737 Posted December 7, 2017 Share Posted December 7, 2017 With lua, but now WRobot read dbc to update taxi list, positions are safe. Link to comment Share on other sites More sharing options...
Matenia 627 Posted December 7, 2017 Author Share Posted December 7, 2017 So slotIndex not required because wRobot checks dbc to be safe? Sounds good. Link to comment Share on other sites More sharing options...
Matenia 627 Posted December 21, 2017 Author Share Posted December 21, 2017 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? Link to comment Share on other sites More sharing options...
Droidz 2737 Posted December 23, 2017 Share Posted December 23, 2017 check your PM Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now