Exemple #1
0
        /// <summary>
        /// 获取掉落物品
        /// </summary>
        /// <returns></returns>
        public static Dictionary <int, List <DropItem> > LoadDropItemDb()
        {
            Dictionary <int, List <DropItem> > list = new Dictionary <int, List <DropItem> >();

            using (ProduceBussiness db = new ProduceBussiness())
            {
                DropItem[] infos = db.GetAllDropItems();
                foreach (DropCondiction info in m_dropcondiction)
                {
                    IEnumerable <DropItem> temp = infos.Where(s => s.DropId == info.DropId);
                    list.Add(info.DropId, temp.ToList());
                }
            }
            return(list);
        }
Exemple #2
0
        public static Dictionary <int, List <DropItem> > LoadDropItemDb()
        {
            Dictionary <int, List <DropItem> > dictionary = new Dictionary <int, List <DropItem> >();

            using (ProduceBussiness produceBussiness = new ProduceBussiness())
            {
                DropItem[] allDropItems = produceBussiness.GetAllDropItems();
                foreach (DropCondiction dropCondiction in DropMgr.m_dropcondiction)
                {
                    DropCondiction         info   = dropCondiction;
                    IEnumerable <DropItem> source = Enumerable.Where <DropItem>((IEnumerable <DropItem>)allDropItems, (Func <DropItem, bool>)(s => s.DropId == info.DropId));
                    dictionary.Add(info.DropId, Enumerable.ToList <DropItem>(source));
                }
            }
            return(dictionary);
        }
Exemple #3
0
        public static Dictionary <int, List <DropItem> > LoadDropItemDb()
        {
            Dictionary <int, List <DropItem> > dictionary = new Dictionary <int, List <DropItem> >();

            using (ProduceBussiness produceBussiness = new ProduceBussiness())
            {
                DropItem[] allDropItems = produceBussiness.GetAllDropItems();
                foreach (DropCondiction info in DropMgr.m_dropcondiction)
                {
                    IEnumerable <DropItem> source =
                        from s in allDropItems
                        where s.DropId == info.DropId
                        select s;
                    dictionary.Add(info.DropId, source.ToList <DropItem>());
                }
            }
            return(dictionary);
        }
Exemple #4
0
        /// <summary>
        /// 获取掉落物品
        /// </summary>
        /// <returns></returns>
        public static Dictionary<int, List<DropItem>> LoadDropItemDb()
        {
            Dictionary<int, List<DropItem>> list = new Dictionary<int, List<DropItem>>();

            using (ProduceBussiness db = new ProduceBussiness())
            {
                DropItem[] infos = db.GetAllDropItems();
                foreach (DropCondiction info in m_dropcondiction)
                {
                    IEnumerable<DropItem> temp = infos.Where(s => s.DropId == info.DropId);
                    list.Add(info.DropId, temp.ToList());
                }
            }
            return list;
        }