Beispiel #1
0
        public int GetNextNpcId()
        {
            int nextId = _mapNpcIds.Count > 0 ? _mapNpcIds.Last() + 1 : 1;

            _mapNpcIds[nextId] = nextId;
            return(nextId);
        }
Beispiel #2
0
        public int GetNextNpcId()
        {
            int nextId = _mapNpcIds.Count > 0 ? _mapNpcIds.Last() + 1 : 1;

            while (ServerManager.Instance.GetShopByMapNpcId(nextId) != null)
            {
                nextId++;
            }
            _mapNpcIds[nextId] = nextId;
            return(nextId);
        }