Example #1
0
        public Dictionary <string, Item> GetItems(byte type)
        {
            ItemCacheL2 level2Cache = GetLevel2Cache(type);

            string[] ids = null;
            Dictionary <string, Item> result = new Dictionary <string, Item>();

            if (level2Cache.TryGetIds(out ids))
            {
                if (ids != null)
                {
                    for (int i = 0; i < ids.Length; i++)
                    {
                        Item it;
                        if (level2Cache.TryGetItem(ids[i], out it))
                        {
                            result.Add(ids[i], it);
                        }
                    }
                }
            }
            return(result);
        }
Example #2
0
        public bool TryGetIds(byte itemType, out string[] ids)
        {
            ItemCacheL2 level2Cache = this.GetLevel2Cache(itemType);

            return(level2Cache.TryGetIds(out ids));
        }