Ejemplo n.º 1
0
        public override bool TakeAction()
        {
            UserGeneral general = new PersonalCacheStruct <UserGeneral>().FindKey(Uid, _generalID);

            if (general != null)
            {
                var package = UserItemPackage.Get(Uid);
                _userItemArray = package.ItemPackage.FindAll(
                    u =>
                {
                    var itemInfo = new UserItemHelper(u);
                    return(!u.IsRemove && itemInfo.EquPartsID == _equParts &&
                           itemInfo.DemandLv <= general.GeneralLv &&
                           //u.ItemLv <= general.GeneralLv &&
                           u.ItemStatus.ToEnum <ItemStatus>() != ItemStatus.YongBing &&      //点击装备或者更换装备的时候,在筛选时去掉已经装备
                           itemInfo.CheckCareer(general.CareerID));
                });
                _userItemArray.QuickSort((a, b) => a.CompareTo(b));
            }
            //var package = UserItemPackage.Get(Uid);
            //_userItemArray = package.ItemPackage.FindAll(s=>s.ItemType==ItemType.ZhuangBei);
            return(true);
        }