• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ConfigCacheSet类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: CheckTrumpEscalate

        /// <summary>
        /// 法宝加经验,升级
        /// </summary>
        /// <param name="userID"></param>
        /// <param name="experience"></param>
        public static void CheckTrumpEscalate(string userID, int experience)
        {
            UserTrump userTrump = new GameDataCacheSet<UserTrump>().FindKey(userID, TrumpInfo.CurrTrumpID);
            if (userTrump != null)
            {
                userTrump.Experience = MathUtils.Addition(userTrump.Experience, experience);
                while (userTrump.TrumpLv < GameConfigSet.MaxTrumpLv)
                {
                    short upLv = MathUtils.Addition(userTrump.TrumpLv, (short)1, GameConfigSet.MaxTrumpLv.ToShort());
                    TrumpInfo trumpInfo = new ConfigCacheSet<TrumpInfo>().FindKey(TrumpInfo.CurrTrumpID, upLv);
                    if (trumpInfo != null && userTrump.Experience >= trumpInfo.Experience)
                    {
                        userTrump.TrumpLv = MathUtils.Addition(userTrump.TrumpLv, (short)1, GameConfigSet.MaxTrumpLv.ToShort());
                        userTrump.Experience = MathUtils.Subtraction(userTrump.Experience, trumpInfo.Experience);
                        if (trumpInfo.SkillID > 0)
                        {
                            SkillInfo skillInfo = new SkillInfo();
                            skillInfo.AbilityID = trumpInfo.SkillID.ToInt();
                            skillInfo.AbilityLv = 1;
                            userTrump.SkillInfo.Add(skillInfo);
                        }
                    }
                    else
                    {
                        break;
                    }

                }
                if (userTrump.TrumpLv >= GameConfigSet.MaxTrumpLv)
                {
                    userTrump.Experience = 0;
                }
            }
        }
开发者ID:rongxiong,项目名称:Scut,代码行数:39,代码来源:TrumpHelper.cs


示例2: BuildPacket

        public override void BuildPacket()
        {
            this.PushIntoStack(magicList.Count);
            foreach (MagicInfo magicInfo in magicList)
            {
                DataStruct dsItem = new DataStruct();
                dsItem.PushIntoStack(magicInfo.MagicID);
                dsItem.PushIntoStack(magicInfo.MagicType.ToInt());
                dsItem.PushIntoStack(magicInfo.MagicName.ToNotNullString());
                dsItem.PushIntoStack(magicInfo.HeadID.ToNotNullString());
                dsItem.PushIntoStack(magicInfo.MagicDesc.ToNotNullString());

                var magicLvList = new ConfigCacheSet<MagicLvInfo>().FindAll(m => m.MagicID == magicInfo.MagicID);
                dsItem.PushIntoStack(magicLvList.Count);
                foreach (MagicLvInfo magicLv in magicLvList)
                {
                    DataStruct dsItem1 = new DataStruct();
                    dsItem1.PushIntoStack(magicLv.MagicLv.ToShort());
                    dsItem1.PushIntoStack(magicLv.ExpNum);
                    dsItem1.PushIntoStack(magicLv.ColdTime);
                    dsItem1.PushIntoStack(magicLv.EscalateMinLv.ToShort());
                    dsItem1.PushIntoStack(magicLv.AbilityType.ToShort());
                    dsItem1.PushIntoStack(magicLv.EffectNum.ToNotNullString());
                    dsItem1.PushIntoStack(magicLv.GridMaxNum);

                    dsItem.PushIntoStack(dsItem1);
                }

                this.PushIntoStack(dsItem);
            }
        }
开发者ID:0jpq0,项目名称:Scut,代码行数:31,代码来源:Action1504.cs


示例3: BuildPacket

 public override void BuildPacket()
 {
     PushIntoStack(_pageCount);
     PushIntoStack(ContextUser.GameCoin);
     PushIntoStack(ContextUser.GoldNum);
     PushIntoStack(_mallItemsInfoArray.Count);
     foreach (MallItemsInfo mallItems in _mallItemsInfoArray)
     {
         ItemBaseInfo itemInfo = new ConfigCacheSet<ItemBaseInfo>().FindKey(mallItems.ItemID);
         int mallPrice = 0;
         int specilPrice = 0;
         if (itemInfo != null)
         {
             mallPrice = mallItems.Price;
             if (mallItems.MallType == ShopType.Props || mallItems.MallType == ShopType.PresendBox)
             {
                 mallPrice = (FestivalHelper.StoreDiscount() * mallPrice).ToInt();
             }
             specilPrice = mallItems.SpecialPrice;
         }
         DataStruct dsItem = new DataStruct();
         dsItem.PushIntoStack(mallItems.ItemID);
         dsItem.PushIntoStack(itemInfo == null ? string.Empty : itemInfo.ItemName.ToNotNullString());
         dsItem.PushIntoStack(itemInfo == null ? string.Empty : itemInfo.HeadID.ToNotNullString());
         dsItem.PushIntoStack(itemInfo == null ? string.Empty : itemInfo.MaxHeadID.ToNotNullString());
         dsItem.PushIntoStack(itemInfo == null ? string.Empty : itemInfo.ItemDesc.ToNotNullString());
         dsItem.PushIntoStack(itemInfo == null ? LanguageManager.GetLang().shortInt : (short)itemInfo.QualityType);
         dsItem.PushIntoStack(mallPrice);
         dsItem.PushIntoStack(specilPrice);
         dsItem.PushIntoStack(mallItems.SeqNO);
         dsItem.PushIntoStack((short)_commandType);
         PushIntoStack(dsItem);
     }
     PushIntoStack(ContextUser.ObtainNum);
 }
开发者ID:jinfei426,项目名称:Scut,代码行数:35,代码来源:Action7001.cs


示例4: TakeAction

        public override bool TakeAction()
        {
            UserDailyRestrain dailyRestrain = new GameDataCacheSet<UserDailyRestrain>().FindKey(ContextUser.UserID);
            if (RankingHelper.IsGainSportsReward(ContextUser.UserID) && dailyRestrain != null && dailyRestrain.UserExtend != null)
            {
                var envSet = ServerEnvSet.Get(ServerEnvKey.JingJiChangReward, "");
                SportsRewardInfo sportsInfo = new ConfigCacheSet<SportsRewardInfo>().FindKey(dailyRestrain.UserExtend.UserRankID);
                {                if (envSet != null && sportsInfo != null)

                    if (envSet.ToDateTime().Date > dailyRestrain.Funtion11.Date && dailyRestrain.UserExtend.UserRankID > 0)
                    {

                        dailyRestrain.Funtion11 = DateTime.Now;
                        dailyRestrain.UserExtend.UserRankID = 0;
                        //dailyRestrain.Update();

                        ContextUser.ObtainNum = MathUtils.Addition(ContextUser.ObtainNum, sportsInfo.RewardObtian, int.MaxValue);
                        ContextUser.GameCoin = MathUtils.Addition(ContextUser.GameCoin, sportsInfo.RewardGoin, int.MaxValue);
                        //ContextUser.Update();
                        UserHelper.Contribution(ContextUser.UserID, sportsInfo.RewardObtian);
                        ErrorInfo = string.Format(LanguageManager.GetLang().St5106_JingJiChangRankReward, sportsInfo.RewardObtian, sportsInfo.RewardGoin);
                    }
                }
            }
            return true;
        }
开发者ID:rongxiong,项目名称:Scut,代码行数:26,代码来源:Action5106.cs


示例5: GetItemID

 //��ȡ�������ж��ֽ����������ȡһ��
 public static int GetItemID(LairRewardType lairRewardType)
 {
     var rewardTypeAll = new ConfigCacheSet<LairRewardInfo>().FindAll(u => u.LairRewardType == lairRewardType.ToInt());
     var i = RandomUtils.GetRandom(0, rewardTypeAll.Count);
     var itemID = rewardTypeAll[i].ItemID;
     return itemID;
 }
开发者ID:rongxiong,项目名称:Scut,代码行数:8,代码来源:LairTreasuerHelp.cs


示例6: BuildPacket

        public override void BuildPacket()
        {
            this.PushIntoStack(TaskHelper.DailyEveryMaxNum);
            this.PushIntoStack(currNum);
            this.PushIntoStack(userTaskList.Count);
            foreach (UserTask userTask in userTaskList)
            {
                DailyTaskInfo dtaskInfo = new ConfigCacheSet<DailyTaskInfo>().FindKey(userTask.TaskID);
                var userItem = userTask.GetDailyItem(userLv);
                ItemBaseInfo itemInfo = new ConfigCacheSet<ItemBaseInfo>().FindKey(userItem != null ? userItem.ItemID : 0);

                DataStruct dsItem = new DataStruct();
                dsItem.PushIntoStack(userTask.TaskID);
                dsItem.PushIntoStack(dtaskInfo.TaskName.ToNotNullString());
                dsItem.PushIntoStack((short)userTask.TaskState);
                dsItem.PushIntoStack((short)userTask.TaskType);
                dsItem.PushIntoStack((short)userTask.TaskStar);
                dsItem.PushIntoStack(dtaskInfo.TaskDescp.ToNotNullString());
                dsItem.PushIntoStack(dtaskInfo.TaskTarget);
                dsItem.PushIntoStack((int)userTask.TaskStar);
                dsItem.PushIntoStack(userTask.TaskTargetNum.ToInt());
                dsItem.PushIntoStack(userTask.GetDailyExpNum(userLv));
                dsItem.PushIntoStack(itemInfo != null ? itemInfo.ItemName.ToNotNullString() : string.Empty);
                dsItem.PushIntoStack(userItem != null ? userItem.Num : 0);

                this.PushIntoStack(dsItem);
            }
        }
开发者ID:0jpq0,项目名称:Scut,代码行数:28,代码来源:Action3005.cs


示例7: ProcessCmd

        protected override void ProcessCmd(string[] args)
        {
            int magicID = args.Length > 0 ? args[0].Trim().ToInt() : 0;
            short magicLv = args.Length > 1 ? args[1].Trim().ToShort() : (short)1;

            var cacheSet = new GameDataCacheSet<UserMagic>();
            var userMagic = cacheSet.FindKey(UserID, magicID);
            MagicInfo magic = new ConfigCacheSet<MagicInfo>().FindKey(magicID);
            if (magic == null)
            {
                return;
            }
            if (userMagic == null)
            {
                userMagic = new UserMagic()
                {
                    UserID = UserID,
                    MagicID = magicID,
                    MagicLv = magicLv,
                    IsEnabled = false,
                    MagicType = magic.MagicType,
                };
                cacheSet.Add(userMagic);
            }
            else
            {
                userMagic.MagicLv = magicLv;
            }
        }
开发者ID:jinfei426,项目名称:Scut,代码行数:29,代码来源:MagicCommand.cs


示例8: GetVipUseNum

 /// <summary>
 /// 每日限制次数
 /// </summary>
 /// <returns></returns>
 public static int GetVipUseNum(int vipLv, RestrainType restrainType)
 {
     int rType = (int)restrainType;
     int baseNum = 0;
     int MaxNum = 0;
     int vipNum = 0;
     DailyRestrainSet restrainSet = new ShareCacheStruct<DailyRestrainSet>().FindKey(restrainType);
     if (restrainSet != null)
     {
         baseNum = restrainSet.MaxNum;
     }
     VipLvInfo lvInfo = new ConfigCacheSet<VipLvInfo>().FindKey(vipLv);
     var restrainArray = new CacheList<DailyRestrain>();
     if (lvInfo != null)
     {
         restrainArray = lvInfo.DailyRestrain;
     }
     foreach (DailyRestrain daily in restrainArray)
     {
         if (daily.ID == rType)
         {
             vipNum = daily.Num;
         }
     }
     MaxNum = MathUtils.Addition(baseNum, vipNum, int.MaxValue);
     return MaxNum;
 }
开发者ID:jinfei426,项目名称:Scut,代码行数:31,代码来源:VipHelper.cs


示例9: BuildPacket

        public override void BuildPacket()
        {
            PushIntoStack(firstName.ToNotNullString());
            this.PushIntoStack((short)postType);
            this.PushIntoStack((short)isApply);
            this.PushIntoStack(fightList.Count);
            foreach (var fight in fightList)
            {
                CityInfo cityInfo = new ConfigCacheSet<CityInfo>().FindKey(fight.CityID);
                DataStruct dsItem = new DataStruct();
                dsItem.PushIntoStack(fight.CityID);
                dsItem.PushIntoStack(cityInfo == null ? string.Empty : cityInfo.CityName.ToNotNullString());
                dsItem.PushIntoStack(fight.CityHead.ToNotNullString());
                dsItem.PushIntoStack((short)fight.GuildLv);
                dsItem.PushIntoStack(fight.SkillNum);
                this.PushIntoStack(dsItem);
            }
            this.PushIntoStack(currCityName.ToNotNullString());
            this.PushIntoStack(rewardDesc.ToNotNullString());
            this.PushIntoStack(guildName.ToNotNullString());
            this.PushIntoStack(endData);
            this.PushIntoStack((short)isChampion);


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


示例10: TakeAction

 public override bool TakeAction()
 {
     var package = UserItemPackage.Get(ContextUser.UserID);
     UserItemInfo useritem = package.ItemPackage.Find(m => !m.IsRemove && m.UserItemID.Equals(userItemID));
     if (useritem != null)
     {
         ItemBaseInfo itemInfo = new ConfigCacheSet<ItemBaseInfo>().FindKey(useritem.ItemID);
         if (itemInfo != null && itemInfo.DemandLv > ContextUser.VipLv)
         {
             ErrorCode = LanguageManager.GetLang().ErrorCode;
             ErrorInfo = LanguageManager.GetLang().St_VipNotEnough;
             return false;
         }
     }
     ItemUseHelper itemuse = new ItemUseHelper();
     itemuse.UseItem(userItemID, Uid);
     if (itemuse.result && itemuse.content != string.Empty)
     {
         ErrorCode = 0;
     }
     if (!itemuse.result)
     {
         ErrorCode = LanguageManager.GetLang().ErrorCode;
     }
     ErrorInfo = itemuse.content.Trim(',');
     return true;
 }
开发者ID:jinfei426,项目名称:Scut,代码行数:27,代码来源:Action1609.cs


示例11: BuildPacket

        public override void BuildPacket()
        {

            PushIntoStack(generalInfo == null ? string.Empty : generalInfo.GeneralName.ToNotNullString());
            PushIntoStack(generalMedicineArray.Count);
            foreach (GeneralMedicine item in generalMedicineArray)
            {
                ItemBaseInfo itemInfo = new ConfigCacheSet<ItemBaseInfo>().FindKey(item.MedicineID);

                int itemcount = TrumpHelper.GetUserItemNum(item.UserID, item.MedicineID);
                if (itemcount > 0)
                {
                    gridStatus = 1;
                }
                else
                {
                    gridStatus = 2;
                }

                DataStruct ds = new DataStruct();
                ds.PushIntoStack(item.MedicineID);
                ds.PushIntoStack(itemInfo == null ? string.Empty : itemInfo.HeadID.ToNotNullString());
                ds.PushIntoStack(itemInfo == null ? LanguageManager.GetLang().shortInt : itemInfo.MedicineLv);
                ds.PushIntoStack(itemInfo == null ? LanguageManager.GetLang().shortInt : itemInfo.MedicineType);
                ds.PushIntoStack((short)GetGeneralMedicine(item));
                ds.PushIntoStack(gridStatus);
                ds.PushIntoStack(itemInfo == null ? string.Empty : itemInfo.ItemName.ToNotNullString());
                PushIntoStack(ds);
            }
            this.PushIntoStack(powerNum);
            this.PushIntoStack(soulNum);
            this.PushIntoStack(intellectNum);
        }
开发者ID:jinfei426,项目名称:Scut,代码行数:33,代码来源:Action1406.cs


示例12: BuildPacket

        public override void BuildPacket()
        {
            this.PushIntoStack(lifeNum);
            this.PushIntoStack((short)powerNum);
            this.PushIntoStack((short)soulNum);
            this.PushIntoStack((short)intelligenceNum);
            this.PushIntoStack((short)isPractice);
            this.PushIntoStack(storyTaskArray.Length);
            foreach (var task in storyTaskArray)
            {
                int collectNum = TrumpHelper.GetUserItemNum(ContextUser.UserID, task.TargetItemID);
                iscomplete = IsComplete(ContextUser, task);
                PlotInfo plotInfo = new ConfigCacheSet<PlotInfo>().FindKey(task.PlotID);
                ItemBaseInfo itemInfo = new ConfigCacheSet<ItemBaseInfo>().FindKey(task.TargetItemID);
                DataStruct dsItem = new DataStruct();
                dsItem.PushIntoStack(task.TaskID);
                dsItem.PushIntoStack(task.TaskName.ToNotNullString());
                dsItem.PushIntoStack(task.TaskDescp.ToNotNullString());
                dsItem.PushIntoStack(plotInfo == null ? 0 : plotInfo.CityID);
                dsItem.PushIntoStack(task.PlotID);
                dsItem.PushIntoStack(task.TargetItemID);
                dsItem.PushIntoStack(itemInfo == null ? string.Empty : itemInfo.ItemName.ToNotNullString());
                dsItem.PushIntoStack(itemInfo == null ? string.Empty : itemInfo.HeadID.ToNotNullString());
                dsItem.PushIntoStack(collectNum);
                dsItem.PushIntoStack(task.TargetItemNum);
                dsItem.PushIntoStack((short)iscomplete);

                this.PushIntoStack(dsItem);
            }

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


示例13: PrizeItemName

        public static short _currMaxLv = GameConfigSet.CurrMaxLv.ToShort(); //玩家最大等级

        /// <summary>
        /// 将星佣兵完成任务后奖励物品名称
        /// </summary>
        /// <param name="prize"></param>
        /// <returns></returns>
        public static string PrizeItemName(PrizeInfo prize)
        {
            string name = string.Empty;
            switch (prize.Type)
            {
                case RewardType.CrystalId:
                    CrystalInfo crystal = new ConfigCacheSet<CrystalInfo>().FindKey(prize.ItemID);
                    name = crystal == null ? string.Empty : crystal.CrystalName;
                    break;
                case RewardType.Item:
                    ItemBaseInfo itemInfo = new ConfigCacheSet<ItemBaseInfo>().FindKey(prize.ItemID);
                    name = itemInfo == null ? string.Empty : itemInfo.ItemName;
                    break;
                case RewardType.Spare:
                    SparePartInfo sparePartInfo = new ConfigCacheSet<SparePartInfo>().FindKey(prize.ItemID);
                    name = sparePartInfo == null ? string.Empty : sparePartInfo.Name;
                    break;
                case RewardType.CrystalType:
                    name = string.Format(LanguageManager.GetLang().St_Crystal,
                                         CrystalHelper.GetQualityName(prize.CrystalType.ToEnum<CrystalQualityType>()),
                                         string.Empty);
                    break;

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


示例14: BuildPacket

        public override void BuildPacket()
        {
            PushIntoStack(moreTeam.MorePlot.PlotID);
            PushIntoStack(moreTeam.MorePlot.PlotName.ToNotNullString());
            PushIntoStack(moreTeam.UserList.Count);
            PushIntoStack(PlotTeamCombat.TeamMaxPeople);
            PushIntoStack(moreTeam.MorePlot.ItemId);
            PushIntoStack(moreTeam.MorePlot.ItemName.ToNotNullString());
            PushIntoStack(moreTeam.MorePlot.ItemNum);
            PushIntoStack(moreTeam.MorePlot.ExpNum);
            PushIntoStack(moreTeam.TeamUser != null && moreTeam.TeamUser.UserId.ToNotNullString().Equals(Uid) ? 1 : 0);
            PushIntoStack(moreTeam.Status);

            PushIntoStack(moreTeam.UserList.Count);
            foreach (var teamUser in moreTeam.UserList)
            {
                var gameUser = new GameDataCacheSet<GameUser>().FindKey(teamUser.UserId);
                UserGeneral general = UserGeneral.GetMainGeneral(teamUser.UserId);
                CareerInfo careerInfo = null;
                if (general != null)
                {
                    careerInfo = new ConfigCacheSet<CareerInfo>().FindKey(general.CareerID);
                }

                DataStruct dsItem = new DataStruct();
                dsItem.PushIntoStack(teamUser.UserId);
                dsItem.PushIntoStack(teamUser.NickName.ToNotNullString());
                dsItem.PushIntoStack(careerInfo == null ? 0 : (int)careerInfo.CareerID);
                dsItem.PushIntoStack(careerInfo == null ? string.Empty : careerInfo.CareerName.ToNotNullString());
                dsItem.PushIntoStack(gameUser == null ? (short)0 : gameUser.UserLv);
                PushIntoStack(dsItem);
            }
        }
开发者ID:0jpq0,项目名称:Scut,代码行数:33,代码来源:Action4204.cs


示例15: BuildPacket

        public override void BuildPacket()
        {
            PushIntoStack(ContextUser.GoldNum);
            PushIntoStack(ContextUser.GameCoin);
            PushIntoStack(freeNum);
            PushIntoStack(isSale);
            PushIntoStack(issTelegrams);
            PushIntoStack(grayCrystalArray.Count);
            foreach (GrayCrystal crystal in grayCrystalArray)
            {
                CrystalInfo crystalInfo = new ConfigCacheSet<CrystalInfo>().FindKey(crystal.CrystalID) ?? new CrystalInfo();
                DataStruct dsItem = new DataStruct();
                dsItem.PushIntoStack(crystal.UserCrystalID);
                dsItem.PushIntoStack(crystalInfo.CrystalID);
                dsItem.PushIntoStack(crystalInfo.CrystalName.ToNotNullString());
                dsItem.PushIntoStack(crystalInfo.HeadID.ToNotNullString());
                dsItem.PushIntoStack((short)crystalInfo.CrystalQuality);
                PushIntoStack(dsItem);
            }
            PushIntoStack(userLightArray.Count);
            foreach (UserLight light in userLightArray)
            {
                ProbabilityInfo probabilityInfo = new ConfigCacheSet<ProbabilityInfo>().FindKey(light.HuntingID);
                DataStruct dsItem = new DataStruct();
                dsItem.PushIntoStack(light.HuntingID);
                dsItem.PushIntoStack(probabilityInfo == null ? 0 : probabilityInfo.Price);
                dsItem.PushIntoStack(light.IsLight);
                PushIntoStack(dsItem);
            }
            this.PushIntoStack(prompt.ToNotNullString());

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


示例16: TakeAction

 public override bool TakeAction()
 {
     var package = UserItemPackage.Get(ContextUser.UserID);
     UserItemInfo userItem = package.ItemPackage.Find(m => !m.IsRemove && m.UserItemID == userItemID);
     if (userItem != null)
     {
         UserTrump userTrump = new GameDataCacheSet<UserTrump>().FindKey(ContextUser.UserID, TrumpInfo.CurrTrumpID);
         if (userTrump != null && userTrump.TrumpLv >= GameConfigSet.MaxTrumpLv)
         {
             ErrorCode = LanguageManager.GetLang().ErrorCode;
             ErrorInfo = LanguageManager.GetLang().St1456_OutTrumpMaxLv;
             return false;
         }
         ItemBaseInfo itemInfo = new ConfigCacheSet<ItemBaseInfo>().FindKey(userItem.ItemID);
         if (itemInfo != null && itemInfo.PropType == 10)
         {
             TrumpHelper.CheckTrumpEscalate(ContextUser.UserID, itemInfo.EffectNum);
             UserItemHelper.UseUserItem(ContextUser.UserID, itemInfo.ItemID, 1);
             var usergeneral = UserGeneral.GetMainGeneral(ContextUser.UserID);
             if (usergeneral != null)
             {
                 usergeneral.RefreshMaxLife();
             }
         }
     }
     return true;
 }
开发者ID:jinfei426,项目名称:Scut,代码行数:27,代码来源:Action1456.cs


示例17: BuildPacket

        public override void BuildPacket()
        {
            PushIntoStack(codeTime);
            PushIntoStack(ContextUser.GameCoin);
            PushIntoStack(ContextUser.GoldNum);
            PushIntoStack(mysteryShopsList.Count);
            foreach (MysteryShops shops in mysteryShopsList)
            {
                ItemBaseInfo itemInfo = new ConfigCacheSet<ItemBaseInfo>().FindKey(shops.ItemID);
                int mallPrice = 0;
                if (itemInfo != null)
                {
                    mallPrice = itemInfo.MysteryPrice;
                }
                DataStruct dsItem = new DataStruct();
                dsItem.PushIntoStack(shops.ItemID);
                dsItem.PushIntoStack(itemInfo == null ? string.Empty : itemInfo.ItemName.ToNotNullString());
                dsItem.PushIntoStack(itemInfo == null ? LanguageManager.GetLang().shortInt : (short)itemInfo.QualityType);
                dsItem.PushIntoStack(itemInfo == null ? string.Empty : itemInfo.HeadID.ToNotNullString());
                dsItem.PushIntoStack(mallPrice);
                dsItem.PushIntoStack(shops.ItemNum);
                dsItem.PushIntoStack(shops.BuyNum == 0 ? 1 : 2);

                PushIntoStack(dsItem);
            }
        }
开发者ID:0jpq0,项目名称:Scut,代码行数:26,代码来源:Action7002.cs


示例18: BuildPacket

 public override void BuildPacket()
 {
     this.PushIntoStack(pageCount);
     this.PushIntoStack(abilityArray.Count);
     foreach (GuildAbility ability in abilityArray)
     {
         GuildAbilityInfo abilityInfo = new ConfigCacheSet<GuildAbilityInfo>().FindKey(ability.ID);
         if (abilityInfo != null)
         {
             isCityCombat = abilityInfo.IsCityCombat ? (short)1 : (short)0;
         }
         GuildAbilityLvInfo abilityLvInfo = new ConfigCacheSet<GuildAbilityLvInfo>().FindKey(ability.ID, ability.Lv);
         DataStruct dsItem = new DataStruct();
         dsItem.PushIntoStack(ability.ID);
         dsItem.PushIntoStack(abilityInfo == null ? string.Empty : abilityInfo.AbilityName.ToNotNullString());
         dsItem.PushIntoStack(abilityInfo == null ? string.Empty : abilityInfo.AbilityHead.ToNotNullString());
         dsItem.PushIntoStack(ability.Lv);
         dsItem.PushIntoStack(abilityLvInfo == null ? string.Empty : abilityLvInfo.EffectNum.ToString().ToNotNullString());
         dsItem.PushIntoStack(abilityLvInfo == null ? 0 : abilityLvInfo.UpDonateNum);
         dsItem.PushIntoStack(isCityCombat);
         dsItem.PushIntoStack(abilityInfo == null ? (short)0 : (short)abilityInfo.GuildAbilityType);
         this.PushIntoStack(dsItem);
     }
     this.PushIntoStack(gAbilityInfo == null ? string.Empty : gAbilityInfo.AbilityName.ToNotNullString());
     this.PushIntoStack(currExperience);
     this.PushIntoStack(donateCoin);
     this.PushIntoStack(donateGold);
 }
开发者ID:jinfei426,项目名称:Scut,代码行数:28,代码来源:Action6201.cs


示例19: BuildPacket

 public override void BuildPacket()
 {
     PushIntoStack(pageCount);
     PushIntoStack(_itemCount);
     PushIntoStack(_gridNum);
     PushIntoStack(ContextUser.GameCoin);
     PushIntoStack(ContextUser.GoldNum);
     PushIntoStack(mlist.Count);
     foreach (UserItemInfo item in mlist)
     {
         DataStruct ds = new DataStruct();
         ItemBaseInfo itemInfo = new ConfigCacheSet<ItemBaseInfo>().FindKey(item.ItemID);
         ds.PushIntoStack(item.UserItemID.ToNotNullString());
         ds.PushIntoStack(itemInfo == null ? 0 : itemInfo.ItemID);
         ds.PushIntoStack(itemInfo == null ? LanguageManager.GetLang().shortInt : (short)itemInfo.ItemType);
         ds.PushIntoStack(item.Num);
         ds.PushIntoStack(itemInfo == null ? string.Empty : itemInfo.HeadID.ToNotNullString());
         ds.PushIntoStack(itemInfo == null ? LanguageManager.GetLang().shortInt : itemInfo.PropType);
         ds.PushIntoStack(itemInfo == null ? string.Empty : itemInfo.ItemName.ToNotNullString());
         ds.PushIntoStack(itemInfo == null ? string.Empty : itemInfo.ItemDesc.ToNotNullString());
         ds.PushIntoStack(itemInfo == null ? 0 : itemInfo.SalePrice);
         ds.PushIntoStack(itemInfo == null ? 0 : itemInfo.IsUse ? 1 : 0);
         ds.PushIntoStack(itemInfo == null ? 0 : itemInfo.IsCostly ? 1 : 0);
         ds.PushIntoStack(itemInfo == null ? string.Empty : itemInfo.MaxHeadID);
         ds.PushIntoStack(itemInfo == null ? 0 : itemInfo.PropType != 15 ? 0 : ItemUseHelper.ItemNum(ContextUser.UserID, itemInfo.EffectNum) <= 0 ? 0 : 1);
         PushIntoStack(ds);
     }
 }
开发者ID:rongxiong,项目名称:Scut,代码行数:28,代码来源:Action1101.cs


示例20: BuildPacket

        public override void BuildPacket()
        {
            this.PushIntoStack(itemBaseList.Count);
            foreach (ItemBaseInfo itemInfo in itemBaseList)
            {
                DataStruct dsItem = new DataStruct();
                dsItem.PushIntoStack(itemInfo.ItemID);
                dsItem.PushIntoStack(itemInfo.ItemName.ToNotNullString());
                dsItem.PushIntoStack(itemInfo.HeadID.ToNotNullString());
                dsItem.PushIntoStack(itemInfo.ItemDesc.ToNotNullString());
                dsItem.PushIntoStack(itemInfo.ItemType.ToShort());
                dsItem.PushIntoStack(itemInfo.EquParts.ToShort());
                dsItem.PushIntoStack(itemInfo.QualityType.ToShort());
                dsItem.PushIntoStack(itemInfo.DemandLv.ToShort());

                string[] careerList = itemInfo.CareerRange.Split(new char[] { ',' });
                dsItem.PushIntoStack(careerList.Length);
                foreach (string CareerID in careerList)
                {
                    CareerInfo careerInfo = new ConfigCacheSet<CareerInfo>().FindKey(CareerID.ToInt());
                    DataStruct dsItem1 = new DataStruct();
                    dsItem1.PushIntoStack(careerInfo != null ? careerInfo.CareerID.ToInt() : (int)0);
                    dsItem1.PushIntoStack(careerInfo != null ? careerInfo.CareerName.ToNotNullString() : string.Empty);

                    dsItem.PushIntoStack(dsItem1);
                }

                var equList = new ConfigCacheSet<ItemEquAttrInfo>().FindAll(m => m.ItemID == itemInfo.ItemID);
                dsItem.PushIntoStack(equList.Count);
                foreach (ItemEquAttrInfo equ in equList)
                {
                    DataStruct dsItem1 = new DataStruct();
                    dsItem1.PushIntoStack(equ.AttributeID.ToInt());
                    dsItem1.PushIntoStack(equ.BaseNum);
                    dsItem1.PushIntoStack(equ.IncreaseNum);

                    dsItem.PushIntoStack(dsItem1);
                }

                dsItem.PushIntoStack(itemInfo.MedicineType);
                dsItem.PushIntoStack(itemInfo.MedicineLv);
                dsItem.PushIntoStack(itemInfo.MedicineNum);
                dsItem.PushIntoStack(itemInfo.PropType);
                dsItem.PushIntoStack(itemInfo.EffectNum.ToNotNullString());

                var itemSynthesisList = new ConfigCacheSet<ItemSynthesisInfo>().FindAll(m => m.ItemID == itemInfo.ItemID);
                dsItem.PushIntoStack(itemSynthesisList.Count);
                foreach (ItemSynthesisInfo synthesisInfo in itemSynthesisList)
                {
                    DataStruct dsItem1 = new DataStruct();
                    dsItem1.PushIntoStack(synthesisInfo.SynthesisID);
                    dsItem1.PushIntoStack(synthesisInfo.DemandNum);
                    dsItem1.PushIntoStack(synthesisInfo.SynthesisNum);

                    dsItem.PushIntoStack(dsItem1);
                }

                this.PushIntoStack(dsItem);
            }
        }
开发者ID:rongxiong,项目名称:Scut,代码行数:60,代码来源:Action7010.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ConfigData类代码示例发布时间:2022-05-24
下一篇:
C# Config类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap