Exemplo n.º 1
0
        public int GetNextNpcId()
        {
            int nextId = _mapNpcIds.Count > 0 ? _mapNpcIds.Last() + 1 : 1;

            _mapNpcIds[nextId] = nextId;
            return(nextId);
        }
Exemplo n.º 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);
        }