当前位置: 首页>>代码示例>>C#>>正文


C# ConfigCacheSet.FindAll方法代码示例

本文整理汇总了C#中ConfigCacheSet.FindAll方法的典型用法代码示例。如果您正苦于以下问题:C# ConfigCacheSet.FindAll方法的具体用法?C# ConfigCacheSet.FindAll怎么用?C# ConfigCacheSet.FindAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ConfigCacheSet的用法示例。


在下文中一共展示了ConfigCacheSet.FindAll方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: BuildPacket

        public override void BuildPacket()
        {
            var cacheSetItemEqu = new ConfigCacheSet<ItemEquAttrInfo>();
            PushIntoStack(_userItemArray.Count);
            foreach (UserItemInfo item in _userItemArray)
            {
                ItemBaseInfo itemInfo = new ConfigCacheSet<ItemBaseInfo>().FindKey(item.ItemID);
                var general = new GameDataCacheSet<UserGeneral>().FindKey(Uid, item.GeneralID);
                var itemEquList = cacheSetItemEqu.FindAll(e => e.ItemID.Equals(item.ItemID));
                DataStruct dsItem = new DataStruct();
                dsItem.PushIntoStack(item.UserItemID.ToNotNullString());
                dsItem.PushIntoStack(itemInfo == null ? string.Empty : itemInfo.ItemName.ToNotNullString());
                dsItem.PushIntoStack(itemInfo == null ? string.Empty : itemInfo.HeadID.ToNotNullString());
                dsItem.PushIntoStack(item.ItemLv);
                dsItem.PushIntoStack(itemInfo == null ? LanguageManager.GetLang().shortInt : (short)itemInfo.QualityType);
                dsItem.PushIntoStack(general != null ? general.GeneralName : string.Empty);
                PushIntoStack(dsItem);
                dsItem.PushIntoStack(itemEquList.Count);
                foreach (var itemEquAttrInfo in itemEquList)
                {
                    DataStruct dsItem1 = new DataStruct();
                    dsItem1.PushIntoStack(itemEquAttrInfo.AttributeID.ToInt());
                    int strengNum = 0;
                    strengNum = MathUtils.Addition(itemEquAttrInfo.BaseNum, (itemEquAttrInfo.IncreaseNum * item.ItemLv), int.MaxValue);
                    //    dsItem1.PushIntoStack(itemEqu.BaseNum);
                    dsItem1.PushIntoStack(strengNum);
                    dsItem.PushIntoStack(dsItem1);
                }

            }
        }
开发者ID:rongxiong,项目名称:Scut,代码行数:31,代码来源:Action1209.cs

示例2: MonsterQueue

        /// <summary>
        /// 圣吉塔战役
        /// </summary>
        /// <param name="plotNpcID"></param>
        /// <param name="difficultNum"></param>
        public MonsterQueue(int plotNpcID, double difficultNum)
        {
            var sjtEmbattleList = new ConfigCacheSet<SJTPlotEmbattleInfo>().FindAll();
            sjtEmbattleList = sjtEmbattleList.FindAll(m => m.PlotNpcID == plotNpcID);
            foreach (SJTPlotEmbattleInfo embattle in sjtEmbattleList)
            {
                int index = embattle.GridSeqNo - 1;

                IGeneral general = Create(embattle, difficultNum);
                if (general != null)
                {
                    SetQueue(index, general);
                }
            }
            this.PriorityNum = 0;
        }
开发者ID:rongxiong,项目名称:Scut,代码行数:21,代码来源:MonsterQueue.cs

示例3: GetKeyWordSubstitution

        /// <summary>
        /// 屏蔽敏感词
        /// </summary>
        /// <param name="keyWord"></param>
        /// <returns></returns>
        public static bool GetKeyWordSubstitution(string keyWord)
        {
            keyWord = keyWord.Trim();
            bool IsWord = false;
            ConfigCacheSet<ChatKeyWord> cacheSet = new ConfigCacheSet<ChatKeyWord>();
            List<ChatKeyWord> chatKeyWordArray = cacheSet.FindAll();
            foreach (ChatKeyWord chatKeyWord in chatKeyWordArray)
            {
                if (keyWord.IndexOf(chatKeyWord.KeyWord) >= 0)
                {
                    IsWord = true;
                    break;
                }

            }
            return IsWord;
        }
开发者ID:rongxiong,项目名称:Scut,代码行数:22,代码来源:UserHelper.cs

示例4: TakeAction

        public override bool TakeAction()
        {
            if (magicType == 0)
            {
                userMagicArray = new GameDataCacheSet<UserMagic>().FindAll(ContextUser.UserID).GetPaging(pageIndex, pageSize, out pageCount);
            }
            else
            {
                userMagicArray = new GameDataCacheSet<UserMagic>().FindAll(ContextUser.UserID, m => m.MagicType == magicType).GetPaging(pageIndex, pageSize, out pageCount);
                //List<UserMagic> tempList = new List<UserMagic>(userMagicArray);
                //userMagicArray = tempList.FindAll(m => m.MagicID != new GameUser().UserMagicID);
            }
            userMagicArray.ForEach(obj =>
            {
                obj.IsOpen = true;
            });
            if (magicType == MagicType.MoFaZhen)
            {
                var cacheSetMagic = new ConfigCacheSet<MagicInfo>();
                var magicList = cacheSetMagic.FindAll(s => s.MagicType == MagicType.MoFaZhen && s.DemandLv > ContextUser.UserLv);

                magicList.ForEach(mgic =>
                {
                    if (userMagicArray.Find(s => s.MagicID == mgic.MagicID) == null)
                    {
                        UserMagic userMagic = new UserMagic();
                        userMagic.IsOpen = mgic.DemandLv <= ContextUser.UserLv ? true : false;
                        userMagic.MagicID = mgic.MagicID;
                        userMagic.UserID = string.Empty;
                        userMagic.MagicLv = 0;
                        userMagic.MagicType = MagicType.MoFaZhen;
                        userMagic.IsLv = mgic.DemandLv;
                        userMagicArray.Add(userMagic);
                    }
                });
            }
            pageCount = MathUtils.Subtraction(pageCount, 1, 0);

            //List<UserQueue> userQueueArray = new GameDataCacheSet<UserQueue>().FindAll(ContextUser.UserID, m => m.QueueType == QueueType.MagicStrong);
            //if (userQueueArray.Count > 0 && userQueueArray[0].StrengNum >= 2)
            //{
            //    queueID = userQueueArray[0].QueueID;
            //    coldTime = userQueueArray[0].DoRefresh();
            //}
            userMagicArray.QuickSort((x, y) =>
            {
                if (x == null && y == null) return 0;
                if (x != null && y == null) return 1;
                if (x == null) return -1;
                return x.MagicID.CompareTo(y.MagicID);
            });
            ////记录操作日志
            //UserOperationLog userOperationLog = new UserOperationLog();
            //userOperationLog.UserID = ContextUser.UserID;
            //userOperationLog.ActionID = ActionIDDefine.Cst_Action1501;
            //userOperationLog.FunctionID = "魔术列表";
            //userOperationLog.CreateDate = DateTime.Now;
            //userOperationLog.Num = 1;
            //userOperationLog.Append();
            return true;
        }
开发者ID:rongxiong,项目名称:Scut,代码行数:61,代码来源:Action1501.cs

示例5: GetNextTask

 /// <summary>
 /// ��ȡ�¼�����
 /// </summary>
 /// <param name="parentTaskID"></param>
 /// <returns></returns>
 public static IList<StoryTaskInfo> GetNextTask(int parentTaskID)
 {
     var cacheSet = new ConfigCacheSet<StoryTaskInfo>();
     return cacheSet.FindAll(m => m.PreTaskID.Any(taskId => taskId == parentTaskID));
 }
开发者ID:wf15271760803,项目名称:Scut-samples,代码行数:10,代码来源:StoryTaskInfo.cs

示例6: GeneralUp

        /// <summary>
        /// 佣兵升级
        /// </summary>
        /// <param name="userGeneral"></param>
        public static void GeneralUp(UserGeneral userGeneral)
        {

            var cacheSetGeneralEscalate = new ConfigCacheSet<GeneralEscalateInfo>();
            var GeneralEscalateList = cacheSetGeneralEscalate.FindAll(s => s.GeneralType == GeneralType.YongBing && s.UpExperience <= userGeneral.CurrExperience);
            short generalLv = userGeneral.GeneralLv;
            GeneralEscalateInfo generalEscalateInfo = new GeneralEscalateInfo();
            GeneralEscalateList.ForEach(item =>
            {
                if (item.GeneralLv > generalLv)
                {
                    generalLv = item.GeneralLv;
                    generalEscalateInfo = item;
                }
            });
            if (generalLv > userGeneral.GeneralLv)
            {
                userGeneral.GeneralLv = generalLv;

                userGeneral.CurrExperience = MathUtils.Subtraction(userGeneral.CurrExperience, generalEscalateInfo.UpExperience);

            }
        }
开发者ID:jinfei426,项目名称:Scut,代码行数:27,代码来源:GeneralHelper.cs


注:本文中的ConfigCacheSet.FindAll方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。