exuals 2 Posted July 29, 2018 Share Posted July 29, 2018 It will repeatedly choose an Alliance vendor when I'm Horde, it made 17 trips to an Alliance base, obviously dying. I manually disabled it in the DB and it still will go to that vendor which is farther than the nearest Horde one. Any plans for fixes or at least an API call so I can rewrite functionality? Link to comment https://wrobot.eu/forums/topic/9862-vendoring-issues/ Share on other sites More sharing options...
Bambo 148 Posted July 29, 2018 Share Posted July 29, 2018 For what I have heard it is recommend to split wrobot into two folders. One folder for each faction. That should fix all of these problems. Greetings Link to comment https://wrobot.eu/forums/topic/9862-vendoring-issues/#findComment-46191 Share on other sites More sharing options...
Matenia 627 Posted July 30, 2018 Share Posted July 30, 2018 private static Predicate<Npc> _dbFilter = n => n.CurrentProfileNpc && (n.Type == Npc.NpcType.Vendor || n.Type == Npc.NpcType.Repair); public static void Start() { FiniteStateMachineEvents.OnBeforeCheckIfNeedToRunState += VendorHandler; } private static void VendorHandler(Engine engine, State state, CancelEventArgs cancelable) { if(state != null && state.GetType() == typeof(ToTown) && new ToTown().NeedToRun) { NpcDB.AcceptOnlyProfileNpc = true; NpcDB.ListNpc.RemoveAll(_dbFilter); Npc vendor = FindVendor(); //this is your own function that returns an object of type NPC if (vendor != null) { NpcDB.AddNpc(vendor, false, true); } } } Link to comment https://wrobot.eu/forums/topic/9862-vendoring-issues/#findComment-46206 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