Ejemplo n.º 1
0
        public bool processCmd(GameClient client, string[] cmdParams)
        {
            int  nID = (int)this.CmdID;
            bool result;

            if (this.CmdID == TCPGameServerCmds.CMD_SPR_EXEC_WASHPROPS)
            {
                int  dbid        = Global.SafeConvertToInt32(cmdParams[1]);
                int  washIndex   = Global.SafeConvertToInt32(cmdParams[2]);
                bool bUseBinding = Global.SafeConvertToInt32(cmdParams[3]) > 0;
                int  moneyType   = Global.SafeConvertToInt32(cmdParams[4]);
                result = WashPropsManager.WashProps(client, dbid, washIndex, bUseBinding, moneyType);
            }
            else if (this.CmdID == TCPGameServerCmds.CMD_SPR_EXEC_WASHPROPSINHERIT)
            {
                int leftGoodsDBID  = Global.SafeConvertToInt32(cmdParams[1]);
                int rightGoodsDBID = Global.SafeConvertToInt32(cmdParams[2]);
                int moneyType      = Global.SafeConvertToInt32(cmdParams[3]);
                result = WashPropsManager.WashPropsInherit(client, leftGoodsDBID, rightGoodsDBID, moneyType);
            }
            else
            {
                result = true;
            }
            return(result);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 翅膀升星处理
        /// </summary>
        public bool processCmd(Logic.GameClient client, string[] cmdParams)
        {
            int nID = (int)CmdID;

            if (CmdID == TCPGameServerCmds.CMD_SPR_EXEC_WASHPROPS)
            {
                int  dbid        = Global.SafeConvertToInt32(cmdParams[1]);
                int  washIndex   = Global.SafeConvertToInt32(cmdParams[2]); //-1: 洗练数值  0及以上:洗练第几条属性
                bool bUseBinding = Global.SafeConvertToInt32(cmdParams[3]) > 0;
                int  moneyType   = Global.SafeConvertToInt32(cmdParams[4]);
                return(WashPropsManager.WashProps(client, dbid, washIndex, bUseBinding, moneyType));
            }
            else if (CmdID == TCPGameServerCmds.CMD_SPR_EXEC_WASHPROPSINHERIT)
            {
                int leftGoodsDBID  = Global.SafeConvertToInt32(cmdParams[1]); // 源装备
                int rightGoodsDBID = Global.SafeConvertToInt32(cmdParams[2]); // 目标装备
                int moneyType      = Global.SafeConvertToInt32(cmdParams[3]); //消耗钱类型
                return(WashPropsManager.WashPropsInherit(client, leftGoodsDBID, rightGoodsDBID, moneyType));
            }

            return(true);
        }