コード例 #1
0
ファイル: DropMgr.cs プロジェクト: uvbs/DDTank-3.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);
        }
コード例 #2
0
ファイル: DropMgr.cs プロジェクト: thanhtoan1196/GunnyII_r10
        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);
        }
コード例 #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);
        }
コード例 #4
0
ファイル: DropMgr.cs プロジェクト: vancourt/BaseGunnyII
        /// <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;
        }