public void CreateVendor(TownIDValue town, Point3D location, Map map, TownVendorType vendorType, int vendorCount, int spawnRange, int homeRange) { XmlSpawner xmlSpawner = null; switch (vendorType) { case TownVendorType.Banker: xmlSpawner = new XmlSpawner(new List <string> { "Banker" }, new List <int> { vendorCount }); break; } if (xmlSpawner == null) { return; } xmlSpawner.MoveToWorld(location, map); xmlSpawner.SpawnRange = spawnRange; xmlSpawner.HomeRange = homeRange; xmlSpawner.MaxCount = vendorCount; xmlSpawner.SmartRespawn(); }
public Town(TownIDValue town, Map map) : base(0x0) { Visible = false; Movable = false; //----- region = Region.GetRegionByIndexedRegionName(RegionName); Towns.TownList.Add(this); }
public static Town GetTown(TownIDValue townValue) { Town townInstance = null; foreach (Town instance in TownList) { if (instance == null) { continue; } if (instance.TownID == townValue) { return(instance); } } return(townInstance); }
public static void CreateTown(TownIDValue town) { Town townInstance = new Town(town, Map.Felucca); townInstance.CreateTown(); }