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


C# UserNote.GetString方法代码示例

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


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

示例1: BossAward

        /// <summary>
        /// 领取奖励
        /// </summary>
        /// <param name="note"></param>
        public static void BossAward(UserNote note)
        {
            string fid = note.Player.Family.Value.GetStringOrDefault("FamilyID");
            if (string.IsNullOrEmpty(fid))
            {
                note.Call(FamilyCommand.BossAwardR, false, TipManager.GetMessage(FamilyReturn.NoAddFamily));
                return;
            }

            string bid = note.GetString(0);
            var p = GameConfigAccess.Instance.FindOneById(bid);
            if (p == null)
            {
                return;
            }

            string gid = note.GetString(1); //FamilyBossAccess.Instance.ViewAward(fid + bid, note.Player.ID);
            if (string.IsNullOrEmpty(gid))
            {
                return;
            }

            string[] tt = gid.Split('$');
            int number = 1;
            if (tt.Length != 2 || (!int.TryParse(tt[1], out number)))
            {
                number = 1;
            }
            string goodsid = tt[0];

            //TODO:检查包袱
            Dictionary<string, Variant> goods = new Dictionary<string, Variant>();
            Variant tmp = new Variant();
            tmp.Add("Number1", number);
            goods.Add(goodsid, tmp);
            if (BurdenManager.GetBurdenSpace(note.Player.B0.Value.GetValue<IList>("C")) == null)
            {
                note.Call(FamilyCommand.BossAwardR, false, TipManager.GetMessage(ActivityReturn.SignAward4));
                return;
            }

            //if (BurdenManager.IsFullBurden(note.Player.B0, goods))
            //{
            //    note.Call(FamilyCommand.BossAwardR, false, TipManager.GetMessage(ActivityReturn.SignAward4));
            //    return;
            //}

            if (FamilyBossAccess.Instance.GetAward(fid + bid, note.Player.ID, gid))
            {
                //发放物品
                note.Player.AddGoods(goods, GoodsSource.FamilyBoss);
                note.Call(FamilyCommand.BossAwardR, true, gid);
            }
            else
            {
                //已领取..
                note.Call(FamilyCommand.BossAwardR, false, TipManager.GetMessage(FamilyReturn.CannotBossAward));
            }
        }
开发者ID:abel,项目名称:sinan,代码行数:63,代码来源:FamilyBossBusiness.cs

示例2: DelEnemy

 /// <summary>
 /// 删除仇人
 /// </summary>
 /// <param name="note"></param>
 public static void DelEnemy(UserNote note)
 {
     string playerid = note.GetString(0);
     PlayerEx Social = note.Player.Social;
     IList Enemy = Social.Value.GetValue<IList>("Enemy");
     if (Enemy != null)
     {
         Variant msg = null;
         foreach (Variant d in Enemy)
         {
             if (d.GetStringOrDefault("PlayerID") == playerid)
             {
                 msg = d;
                 break;
             }
         }
         if (msg != null)
         {
             ///移除成功
             Enemy.Remove(msg);
             Social.Save();
         }
     }
     Variant v = new Variant();
     v.Add("ID",playerid);
     note.Call(SocialCommand.DelEnemyR, true, v);
 }
开发者ID:abel,项目名称:sinan,代码行数:31,代码来源:EnemyBusiness.cs

示例3: AddFriends

        /// <summary>
        /// 添加好友
        /// </summary>
        /// <param name="note"></param>
        public static void AddFriends(UserNote note)
        {
            string name = note.GetString(0);
            if (note.Player.Name == name)
            {
                return;
            }
            PlayerEx social = note.Player.Social;
            if (social == null)
            {
                note.Call(SocialCommand.AddFriendsR, false, TipManager.GetMessage(SocialReturn.UserInfoError));
                return;
            }

            PlayerBusiness player = PlayersProxy.FindPlayerByName(name);
            if (player == null)
            {
                note.Call(SocialCommand.AddFriendsR, false, TipManager.GetMessage(SocialReturn.UserInfoError));
                return;
            }

            if (social.Value != null)
            {
                if (SocialBusiness.IsLet(social, player.ID, new List<string> { "Friends" }))
                {
                    note.Call(SocialCommand.AddFriendsR, false, TipManager.GetMessage(SocialReturn.Friends));
                    return;
                }

                if (SocialBusiness.IsLet(social, player.ID, new List<string> { "Enemy" }))
                {
                    note.Call(SocialCommand.AddFriendsR, false, TipManager.GetMessage(SocialReturn.Master));
                    return;
                }
            }

            Variant v = new Variant();
            v.Add("PlayerID", player.ID);
            v.Add("Created", DateTime.UtcNow);
            IList list = social.Value.GetValue<IList>("Friends");
            int num = 0;
            if (list == null)
            {
                social.Value["Friends"] = new List<Variant>() { v };
                num = 1;
            }
            else
            {
                list.Add(v);
                num = list.Count;
            }
            social.Save();

            note.Call(SocialCommand.AddFriendsR, true, new PlayerSimple(player, 3));

            //添加好友
            note.Player.FinishNote(FinishCommand.Friends, num);
        }
开发者ID:abel,项目名称:sinan,代码行数:62,代码来源:FriendsBusiness.cs

示例4: IntoBattle

        /// <summary>
        /// 进入玩家和怪的战斗
        /// </summary>
        /// <param name="note"></param>
        private void IntoBattle(UserNote note)
        {
            List<PlayerBusiness> players = FightBase.GetPlayers(note.Player);
            FightObject[] teamA = FightBase.CreateFightPlayers(players);
            FightType fType = (FightType)(note.GetInt32(0));
            FightObject[] teamB = FightBase.CreateApcTeam(players, fType, note[1]);

            string npcID = note.GetString(2);

            if (players.Count == 0 || teamB.Length == 0)
            {
                foreach (var v in players)
                {
                    v.SetActionState(ActionState.Standing);
                }
                return;
            }
            bool isEctype = (note.Player.Scene is SceneEctype || note.Player.Scene is SceneSubEctype);

            FightBusiness fb;
            if (fType == FightType.SceneAPC)
            {
                //打明怪
                SceneApc sab = note.GetValue<SceneApc>(3);
                int subID = note.GetInt32(4);
                fb = new FightSceneApc(teamA, teamB, players, npcID, isEctype, sab, subID);
            }
            else if (fType == FightType.RobAPC)
            {
                SceneApc sab = note.GetValue<SceneApc>(3);
                int subID = note.GetInt32(4);
                RobBusiness rb = note.GetValue<RobBusiness>(5);
                fb = new FightBusinessRobApc(teamA, teamB, players, npcID, isEctype, sab, subID, rb);
            }
            else if (fType == FightType.ProAPC)
            {
                //守护战争明怪
                SceneApc sab = note.GetValue<SceneApc>(3);
                int subID = note.GetInt32(4);
                PartBusiness pb = note.GetValue<PartBusiness>(5);
                fb = new FightBusinessProApc(teamA, teamB, players, npcID, isEctype, sab, subID, pb);
            }
            else
            {
                fb = new FightBusiness(teamA, teamB, players, npcID, isEctype);
            }
            foreach (var player in players)
            {
                player.Fight = fb;
            }
            fb.SendToClinet(FightCommand.StartFight, (int)fType, teamA, teamB);
            fb.Start();
        }
开发者ID:abel,项目名称:sinan,代码行数:57,代码来源:FightMediator.cs

示例5: AddEnemy

        /// <summary>
        /// 添加仇人
        /// </summary>
        /// <param name="note"></param>
        public static void AddEnemy(UserNote note)
        {
            string name = note.GetString(0);

            PlayerEx Social = note.Player.Social;
            if (Social == null)
            {
                note.Call(SocialCommand.AddEnemyR, false, TipManager.GetMessage(SocialReturn.UserInfoError));
                return;
            }
            PlayerBusiness player = PlayersProxy.FindPlayerByName(name);
            if (player == null)
            {
                note.Call(SocialCommand.AddEnemyR, false, TipManager.GetMessage(SocialReturn.UserInfoError));
                return;
            }
            if (SocialBusiness.IsLet(Social, player.ID, new List<string> { "Enemy" }))
            {
                note.Call(SocialCommand.AddEnemyR, false, TipManager.GetMessage(SocialReturn.Enemy));
                return;
            }
            if (SocialBusiness.IsLet(Social, player.ID, new List<string> {  "Friends" }))
            {
                note.Call(SocialCommand.AddEnemyR, false, TipManager.GetMessage(SocialReturn.Friends));
                return;
            }
            if (SocialBusiness.IsLet(Social, player.ID, new List<string> {  "Apprentice" }))
            {
                note.Call(SocialCommand.AddEnemyR, false, TipManager.GetMessage(SocialReturn.Apprentice));
                return;
            }
            if (SocialBusiness.IsLet(Social, player.ID, new List<string> {  "Master" }))
            {
                note.Call(SocialCommand.AddEnemyR, false, TipManager.GetMessage(SocialReturn.Master));
                return;
            }

            IList Enemy = Social.Value.GetValue<IList>("Enemy");
            Variant v = new Variant();
            v.Add("PlayerID", player.ID);
            v.Add("Created", DateTime.UtcNow);
            if (Enemy == null)
            {
                Social.Value["Enemy"] = new List<Variant> { v };
            }
            else
            {
                Enemy.Add(v);
            }
            Social.Save();
            note.Call(SocialCommand.AddEnemyR, true, new PlayerSimple(player, 3));
        }
开发者ID:abel,项目名称:sinan,代码行数:56,代码来源:EnemyBusiness.cs

示例6: CreateTeam

 /// <summary>
 /// 创建队伍
 /// </summary>
 /// <param name="note"></param>
 private bool CreateTeam(UserNote note)
 {
     PlayerBusiness player = note.Player;
     if (player.Team != null)
     {
         //已有队伍
         player.Call(TeamCommand.CreateTeamR, false, TipManager.GetMessage(ClientReturn.TeamsMediator1));
         return false;
     }
     PlayerTeam team = new PlayerTeam(player);
     if (team.Captain == player)
     {
         team.Icon = note.GetString(0);
         team.Explain = note.GetString(1);
         if (m_teams.TryAdd(team.TeamID, team))
         {
             player.CallAll(TeamCommand.CreateTeamR, true, team);
             return true;
         }
     }
     return false;
 }
开发者ID:abel,项目名称:sinan,代码行数:26,代码来源:TeamsMediator.cs

示例7: ChangeManager

 /// <summary>
 /// 移交队长
 /// </summary>
 /// <param name="note"></param>
 /// <param name="team"></param>
 private void ChangeManager(UserNote note, PlayerTeam team)
 {
     string teamID = team.TeamID;
     string newCaptainID = note.GetString(0);
     PlayerBusiness newCaptain = team.TransferCaptain(newCaptainID);
     if (newCaptain != null)
     {
         //通知
         var buffer = AmfCodec.Encode(TeamCommand.ChangeManagerR, new object[] { teamID, newCaptainID });
         team.Captain.CallAll(buffer);
         team.CallAway(buffer, note.Player.SceneID);
     }
 }
开发者ID:abel,项目名称:sinan,代码行数:18,代码来源:TeamCaptainMediator.cs

示例8: DealApply

        /// <summary>
        /// 申请交易
        /// </summary>
        /// <param name="note"></param>
        public static void DealApply(UserNote note)
        {
            string playerid = note.GetString(0);

            if (note.Player.Value.ContainsKey("Deal"))
            {
                note.Call(DealCommand.DealApplyR, false, TipManager.GetMessage(DealReturn.DealOther));
                return;
            }
            PlayerBusiness OnlineBusiness = PlayersProxy.FindPlayerByID(playerid);
            if (OnlineBusiness == null || (!OnlineBusiness.Online))
            {
                note.Call(DealCommand.DealApplyR, false, TipManager.GetMessage(DealReturn.NoLine));
                return;
            }

            if (OnlineBusiness.AState == ActionState.Fight)
            {
                note.Call(DealCommand.DealApplyR, false, TipManager.GetMessage(DealReturn.Fighting));
                return;
            }

            if (OnlineBusiness.Value.ContainsKey("Deal"))
            {
                Variant dy = OnlineBusiness.Value.GetVariantOrDefault("Deal");
                if (dy.GetIntOrDefault("Status") >= 0)
                {
                    note.Call(DealCommand.DealApplyR, false, TipManager.GetMessage(DealReturn.DealOther));
                    return;
                }
            }

            Variant d0 = new Variant();
            d0.Add("Status", 0);
            d0.Add("PlayerID", playerid);//被邀请者
            d0.Add("Goods", null);
            if (!note.Player.Value.ContainsKey("Deal"))
                note.Player.Value.Add("Deal", d0);

            Variant d1 = new Variant();
            d1.Add("Status", 0);
            d1.Add("PlayerID", note.PlayerID);//邀请者
            d1.Add("Goods", null);
            if (!OnlineBusiness.Value.ContainsKey("Deal"))
                OnlineBusiness.Value.Add("Deal", d1);

            OnlineBusiness.Call(DealCommand.DealApplyR, true, note.PlayerID);
            note.Call(DealCommand.DealApplyR, true, note.PlayerID);
        }
开发者ID:abel,项目名称:sinan,代码行数:53,代码来源:DealBusiness.cs

示例9: FightCC

 /// <summary>
 /// 请求切磋
 /// </summary>
 /// <param name="note"></param>
 protected void FightCC(UserNote note)
 {
     PlayerBusiness player = note.Player;
     if (player.AState == ActionState.Fight || player.TeamJob == TeamJob.Member)
     {
         return;
     }
     string pkID = note.GetString(0);
     PlayerBusiness b;
     if (m_players.TryGetValue(pkID, out b))
     {
         if (b.Fight != null) return;
         b.Call(FightCommand.FightCCR, note.PlayerID);
     }
 }
开发者ID:abel,项目名称:sinan,代码行数:19,代码来源:SceneBusiness_Fight.cs

示例10: FightPK

        /// <summary>
        /// 强制PK
        /// </summary>
        /// <param name="note"></param>
        protected virtual void FightPK(UserNote note)
        {
            if (m_fightType == FightType.NotPK)
            {
                return;
            }

            PlayerBusiness player = note.Player;
            if (player.AState == ActionState.Fight || player.RedName || player.TeamJob == TeamJob.Member)
            {
                return;
            }

            string pkID = note.GetString(0);
            PlayerBusiness b;
            if (m_players.TryGetValue(pkID, out b))
            {
                if (b.Fight != null)
                {
                    return;
                }
                if (player.Team != null && player.Team == b.Team)
                {
                    return;
                }
                DateTime now = DateTime.UtcNow;
                //PK保护时间
                if (m_fightType == FightType.PK)
                {
                    if (player.GetPKProtect() > now)
                    {
                        player.Call(ClientCommand.SendActivtyR, new object[] { "T01", TipManager.GetMessage(ClientReturn.PKProtect) });
                        return;
                    }
                    if (b.LastPK > now || b.GetPKProtect() > now)
                    {
                        player.Call(ClientCommand.SendActivtyR, new object[] { "T01", TipManager.GetMessage(ClientReturn.PKProtect) });
                        return;
                    }
                }

                player.FightTime = DateTime.UtcNow;
                UserNote note2 = new UserNote(note, FightCommand.IntoBattlePK, new object[] { m_fightType, b });
                Notifier.Instance.Publish(note2);
            }
        }
开发者ID:abel,项目名称:sinan,代码行数:50,代码来源:SceneBusiness_Fight.cs

示例11: GetPetsList

        /// <summary>
        /// 得到宠物列表
        /// </summary>
        /// <param name="note"></param>
        public void GetPetsList(UserNote note)
        {
            //表示没有家园不
            //if (note.Player.SceneID != SceneHome.DefaultID)
            //    return;
            //玩家ID
            string id = note.GetString(0);
            if (note.PlayerID == id)
            {
                note.Call(PetsCommand.GetPetsListR, PetAccess.Instance.GetPetList(note.Player.B2));
                return;
            }

            PlayerBusiness pb = PlayersProxy.FindPlayerByID(id);
            if (pb == null)
                return;
            note.Call(PetsCommand.GetPetsListR, PetAccess.Instance.GetPetList(pb.B2));
        }
开发者ID:abel,项目名称:sinan,代码行数:22,代码来源:PetMediator.cs

示例12: KillMember

        /// <summary>
        /// 请出队伍
        /// </summary>
        /// <param name="note"></param>
        /// <param name="team"></param>
        private void KillMember(UserNote note, PlayerTeam team)
        {
            string memberID = note.GetString(0);
            PlayerBusiness memeber = team.RemoveMember(memberID);
            if (memeber != null)
            {
                var buffer = AmfCodec.Encode(TeamCommand.OutTeamR,
                    new object[] { true, team.TeamID, memberID, memeber.Name, null });

                team.Captain.CallAll(buffer);
                //通知其它场景上的用户
                team.CallAway(buffer, note.Player.SceneID);

                var t = memeber.TeamInstance;
                if (t != null)
                {
                    t.Exit(memeber, true);
                }
            }
        }
开发者ID:abel,项目名称:sinan,代码行数:25,代码来源:TeamCaptainMediator.cs

示例13: OpenBox

        void OpenBox(UserNote note)
        {
            BoxBusiness box;
            if (!BoxProxy.TryGetBox(note.GetString(0), out box))
            {
                return;
            }
            PlayerBusiness player = note.Player;
            bool open = box.OpenBox(player);
            if (open)
            {
                //更新
                box.Reset();
                List<BoxBusiness> boxs = BoxProxy.GetSceneBox(player.SceneID);
                player.Scene.CallAll(player.ShowID, ClientCommand.RefreshBoxR, new object[] { player.SceneID, boxs });

                //守护战争开启宝箱
                ScenePro sp = player.Scene as ScenePro;
                if (sp != null)
                {
                    PlayersProxy.CallAll(ActivityCommand.OpenChestR, new object[] { note.Player.Name });
                }
            }
        }
开发者ID:abel,项目名称:sinan,代码行数:24,代码来源:BoxMediator.cs

示例14: Mosaic

        /// <summary>
        /// 镶嵌,主要是将宝石镶嵌在装备上
        /// </summary>
        /// <param name="note"></param>
        private void Mosaic(UserNote note)
        {
            //宝石等级不能超过装备等级,必须能够改造
            string goodsid = note.GetString(0);
            //提升成功率的道具
            int upcount = note.GetInt32(1);
            //镶在什么位置
            string p = note.GetString(2);
            string baoshiid = note.GetString(3);

            int baoship = note.GetInt32(4);//宝石在包袱中的位置

            string npcid = note.GetString(5);
            if (!note.Player.EffectActive(npcid, ""))
                return;

            Goods g = GoodsAccess.Instance.GetGoodsByID(goodsid, note.PlayerID);
            if (g == null)
            {
                note.Call(MosaicCommand.MosaicR, false, TipManager.GetMessage(MosaicReturn.MosaicEquipNo));
                return;
            }

            if (g.Value.GetIntOrDefault("IsChange") == 0)
            {
                note.Call(MosaicCommand.MosaicR, false, TipManager.GetMessage(MosaicReturn.MosaicNoChange));
                return;
            }

            List<GameConfig> mosaic = GameConfigAccess.Instance.Find("Mosaic");
            GameConfig gc = null;
            foreach (GameConfig gcg in mosaic)
            {
                if (gcg.Value.GetStringOrDefault("Type") == g.Value.GetStringOrDefault("GoodsType"))
                {
                    gc = gcg;
                    break;
                }
            }
            if (gc == null)
            {
                note.Call(MosaicCommand.MosaicR, false, TipManager.GetMessage(MosaicReturn.MosaicNoLet));
                return;
            }
            //允许镶嵌的宝石列表
            IList mosaicNeed = gc.Value.GetValue<IList>("MosaicNeed");

            GameConfig baoshi = GameConfigAccess.Instance.FindOneById(baoshiid);
            if (baoshi == null)
            {
                note.Call(MosaicCommand.MosaicR, false, TipManager.GetMessage(MosaicReturn.MosaicNoBaoShi));
                return;
            }

            int baoShiLevel = baoshi.Value.GetIntOrDefault("Level");

            //需用绑定游戏币数量

            Variant price = g.Value.GetVariantOrDefault("Price");
            Variant buy = price.GetVariantOrDefault("Buy");

            if (!mosaicNeed.Contains(baoshi.ID))
            {
                //不能够镶嵌该宝石
                note.Call(MosaicCommand.MosaicR, false, TipManager.GetMessage(MosaicReturn.MosaicNoLet));
                return;
            }

            //得到物品所在孔的信息
            Variant baoShiInfo = g.Value.GetVariantOrDefault("BaoShiInfo");

            object o;
            if (!baoShiInfo.TryGetValueT(p, out o))
            {
                note.Call(MosaicCommand.MosaicR, false, TipManager.GetMessage(MosaicReturn.MosaicEquipNo));
                return;
            }

            if ((string)o == "-1")
            {
                note.Call(MosaicCommand.MosaicR, false, TipManager.GetMessage(MosaicReturn.MosaicNoPunch));
                return;
            }

            GameConfig goods = null;

            if ((string)o != "0")
            {
                //表示想镶嵌的位置存在宝石
                goods = GameConfigAccess.Instance.FindOneById((string)o);
                //表示该位置已经镶嵌宝石,但新宝石要求必须大于旧宝石
                if (goods.Value.GetIntOrDefault("Level") >= baoShiLevel)
                {
                    //新镶嵌的宝石等级要求大于旧宝石
                    note.Call(MosaicCommand.MosaicR, false, TipManager.GetMessage(MosaicReturn.MosaicNewOrOld));
                    return;
//.........这里部分代码省略.........
开发者ID:abel,项目名称:sinan,代码行数:101,代码来源:EquipMosaicMediator.cs

示例15: Melt

        /// <summary>
        /// 熔炼,主要是将装备销除得到新的道具和取下镶嵌的宝石,只能够选择一颗宝石
        /// </summary>
        /// <param name="note"></param>
        private void Melt(UserNote note)
        {
            //熔练配置信息
            //string id = note.GetString(0);
            //熔炼的道具
            string goodsid = note.GetString(0);
            //选择宝石,-1表示没有选择
            string baoshi = note.GetString(1);

            //熔炼的道具信息
            Goods g = GoodsAccess.Instance.GetGoodsByID(goodsid, note.PlayerID);

            if (g == null)
            {
                note.Call(MeltCommand.MeltR, false, TipManager.GetMessage(MeltReturn.MeltEquipNo));
                return;
            }
            //熔炼物品的绑定状态
            int isBinding = g.Value.GetIntOrDefault("IsBinding");
            if (g.Value.GetIntOrDefault("IsChange") == 0)
            {
                note.Call(MeltCommand.MeltR, false, TipManager.GetMessage(MeltReturn.MeltNoChange));
                return;
            }

            if (g.Value.GetStringOrDefault("GoodsType").IndexOf("111") != 0)
            {
                note.Call(MeltCommand.MeltR, false, TipManager.GetMessage(MeltReturn.MeltEquipNo));
                return;
            }
            Variant Price = g.Value.GetValueOrDefault<Variant>("Price");
            Variant Buy = Price.GetValueOrDefault<Variant>("Buy");
            double Score = Math.Round(Buy.GetIntOrDefault("Score") * 0.5);
            if (Score > note.Player.Score)
            {
                note.Call(MeltCommand.MeltR, false, TipManager.GetMessage(MeltReturn.MeltNoScoreB));
                return;
            }
            string id = string.Empty;
            List<GameConfig> meltList = GameConfigAccess.Instance.Find("Split");
            foreach (GameConfig gcs in meltList)
            {
                if ((int)gcs.Value["Level"] == g.Value.GetIntOrDefault("Level"))
                {
                    //可以熔炼类型列表
                    IList ts = gcs.Value["Type"] as IList;
                    foreach (Variant m in ts)
                    {
                        if (m.GetStringOrDefault("GoodsType") == g.Value.GetStringOrDefault("GoodsType"))
                        {
                            id = gcs.ID;
                            break;
                        }
                    }
                }
            }

            //得到熔炼配置信息
            GameConfig gc = GameConfigAccess.Instance.FindOneById(id);
            if (gc == null)
            {
                note.Call(MeltCommand.MeltR, false, TipManager.GetMessage(MeltReturn.MeltConfigError));
                return;
            }
            //得到的道具
            IList v = gc.Value.GetValue<IList>("GetGoods");

            PlayerEx burden = note.Player.B0;
            IList c = burden.Value.GetValue<IList>("C");
            //包袱空格数
            int space = BurdenManager.BurdenSpace(c);
            //需要空格数
            int count = baoshi == "-1" ? v.Count : v.Count + 1;

            if (count > space)
            {
                //表示包袱不能存放可得到的物品
                note.Call(MeltCommand.MeltR, false, TipManager.GetMessage(MeltReturn.MeltBurdenFull));
                return;
            }
            List<Variant> list = new List<Variant>();

            Dictionary<string, PlayerEx> bus = new Dictionary<string, PlayerEx>();
            Dictionary<string, int> numberList = new Dictionary<string, int>();
            Dictionary<string, int> binds = new Dictionary<string, int>();
            Variant tmp;
            foreach (Variant m in v)
            {
                //得到的物品
                GameConfig getGoods = GameConfigAccess.Instance.FindOneById(m.GetStringOrDefault("GoodsID"));

                int a = BurdenManager.StactCount(getGoods);
                string name = "B0";
                if (a == 0)
                {
                    note.Call(MeltCommand.MeltR, false, TipManager.GetMessage(MeltReturn.MeltEquipError));
//.........这里部分代码省略.........
开发者ID:abel,项目名称:sinan,代码行数:101,代码来源:EquipMeltMediator.cs


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