예제 #1
0
        public ActionResult GetAW2(int mWeapon)
        {
            pers = (ComparePerksView)TempData.Peek("Pers");
            CompareTempClothes TC = new CompareTempClothes();
            int mwW = (from DRItems in dbDR.DRItems
                       where DRItems.Id == mWeapon
                       select DRItems.Weight).SingleOrDefault();

            if (mwW == 1)
            {
                TC.AWeapon = dbDR.DRItems.Where(c => c.Lvl <= pers.Lvl && c.Rank <= pers.Rank && c.Type > 10 && c.Type <= 20 && c.Slot == 4 && c.Weight == 1 || c.Id == 1).ToList();
            }
            else
            {
                TC.AWeapon = dbDR.DRItems.Where(c => c.Id == 1).ToList();
            }
            return(PartialView(TC.AWeapon));
        }
예제 #2
0
        public ActionResult compareClothes(int lvl = 1, int rank = 1)
        {
            pers.Lvl         = lvl;
            pers.Rank        = rank;
            TempData["Pers"] = pers;
            CompareTempClothes TC = new CompareTempClothes();

            TC.Armor     = dbDR.DRItems.Where(c => c.Lvl <= lvl && c.Rank <= rank && c.Type > 10 && c.Type <= 20 && c.Slot == 1 || c.Id == 1).ToList();
            TC.Pants     = dbDR.DRItems.Where(c => c.Lvl <= lvl && c.Rank <= rank && c.Type > 10 && c.Type <= 20 && c.Slot == 2 || c.Id == 1).ToList();
            TC.MWeapon   = dbDR.DRItems.Where(c => c.Lvl <= lvl && c.Rank <= rank && c.Type > 10 && c.Type <= 20 && c.Slot == 3 || c.Id == 1).ToList();
            TC.AWeapon   = dbDR.DRItems.Where(c => c.Id == 1).ToList();
            TC.Boots     = dbDR.DRItems.Where(c => c.Lvl <= lvl && c.Rank <= rank && c.Type > 10 && c.Type <= 20 && c.Slot == 5 || c.Id == 1).ToList();
            TC.Hauberk   = dbDR.DRItems.Where(c => c.Lvl <= lvl && c.Rank <= rank && c.Type > 10 && c.Type <= 20 && c.Slot == 6 || c.Id == 1).ToList();
            TC.Shoulders = dbDR.DRItems.Where(c => c.Lvl <= lvl && c.Rank <= rank && c.Type > 10 && c.Type <= 20 && c.Slot == 7 || c.Id == 1).ToList();
            TC.Bangle    = dbDR.DRItems.Where(c => c.Lvl <= lvl && c.Rank <= rank && c.Type > 10 && c.Type <= 20 && c.Slot == 8 || c.Id == 1).ToList();
            TC.Helmet    = dbDR.DRItems.Where(c => c.Lvl <= lvl && c.Rank <= rank && c.Type > 10 && c.Type <= 20 && c.Slot == 9 || c.Id == 1).ToList();
            TC.Bow       = dbDR.DRItems.Where(c => c.Lvl <= lvl && c.Rank <= rank && c.Type > 10 && c.Type <= 20 && c.Slot == 10 || c.Id == 1).ToList();
            return(PartialView(TC));
        }