Пример #1
0
        /// <summary>
        /// 炼制系统命令处理
        /// </summary>
        public bool processCmd(Logic.GameClient client, string[] cmdParams)
        {
            int nID = (int)CmdID;

            if (CmdID == TCPGameServerCmds.CMD_SPR_EXEC_LIANZHI)
            {
                int type  = Global.SafeConvertToInt32(cmdParams[1]); //炼制类型: 0 金币,1 绑钻,2钻石
                int count = Global.SafeConvertToInt32(cmdParams[2]); //炼制次数: 非正数表示全部剩余次数
                return(LianZhiManager.GetInstance().ExecLianZhi(client, type, count));
            }
            else if (CmdID == TCPGameServerCmds.CMD_SPR_QUERY_LIANZHICOUNT)
            {
                return(LianZhiManager.GetInstance().QueryLianZhiCount(client));
            }

            return(false);
        }
Пример #2
0
        public bool processCmd(GameClient client, string[] cmdParams)
        {
            int  nID = (int)this.CmdID;
            bool result;

            if (!GlobalNew.IsGongNengOpened(client, GongNengIDs.ZhuanHuan, true))
            {
                result = true;
            }
            else if (this.CmdID == TCPGameServerCmds.CMD_SPR_EXEC_LIANZHI)
            {
                int type  = Global.SafeConvertToInt32(cmdParams[1]);
                int count = Global.SafeConvertToInt32(cmdParams[2]);
                result = LianZhiManager.GetInstance().ExecLianZhi(client, type, count);
            }
            else
            {
                result = (this.CmdID == TCPGameServerCmds.CMD_SPR_QUERY_LIANZHICOUNT && LianZhiManager.GetInstance().QueryLianZhiCount(client));
            }
            return(result);
        }