示例#1
0
文件: Town.cs 项目: Pumpk1ns/outlands
        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();
        }