public int GetNextNpcId() { int nextId = _mapNpcIds.Count > 0 ? _mapNpcIds.Last() + 1 : 1; _mapNpcIds[nextId] = nextId; return(nextId); }
public int GetNextNpcId() { int nextId = _mapNpcIds.Count > 0 ? _mapNpcIds.Last() + 1 : 1; while (ServerManager.Instance.GetShopByMapNpcId(nextId) != null) { nextId++; } _mapNpcIds[nextId] = nextId; return(nextId); }