July 29, 20187 yr 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?
July 29, 20187 yr 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
July 30, 20187 yr 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); } } }
Create an account or sign in to comment