newlist

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

这是爬塔的协议

<?xml version="1.0" encoding="utf-8" ?>
<coder name="TowerMsg" version="1" oldversion="1">
    <includes>
        <include file="tower.xml" />
        <include file="commdef.xml" />
        <include file="basebattledata.xml" />
    </includes>
    <defines>
        <!--各自宏定义-->
        <!-- 最大爬塔奖励数 -->
        <define name="MAX_TOWER_ENC_NUM" value="8" />
    </defines>
    <types>
        <!-- 打开爬塔请求 -->
        <type name="P_OPTOWER_REQ" MsgID="1600">
            <!-- 扩展字段 -->
            <item name="Ext" type="word" />
        </type>
        <!-- 打开爬塔应答 -->
        <type name="P_OPTOWER_ACK" MsgID="1601">
            <!-- 错误码 -->
            <item name="ErrCode" type="word" />
            <!-- 当前铜钱 -->
            <item name="CurCoin" type="uint64" />
            <!-- 当前元宝-->
            <item name="CurGold" type="uint64" />
            <!-- 当前技能点 -->
            <item name="CurSkillP" type="uint64" />
            <!-- 最大爬塔层记录 -->
            <item name="MaxID" type="word" />
            <!-- 当前层信息 -->
            <item name="CurTIF" type="D_TOWERIF" />
            <!-- 排行榜最高层数 -->
            <item name="RankMaxID" type="word" />
            <!-- 排行榜第一的玩家名称 -->
            <item name="RankDispName" type="tstring" count="DSPNAME_LEN" />
            <!-- 排行榜第一的玩家队长 -->
            <item name="RankMHero" type="word" />
        </type>
        <!-- 爬塔请求 -->
        <type name="P_CLIMBTOWER_REQ" MsgID="1602">
            <!-- 塔层 -->
            <item name="ID" type="word" />
        </type>
        <!-- 爬塔应答 -->
        <type name="P_CLIMBTOWER_ACK" MsgID="1603">
            <!-- 错误码 -->
            <item name="ErrCode" type="word" />
            <!-- 战斗信息 -->
            <item name="BattleIf" type="D_ATTACK_D" count="1" />
            <!-- 奖励信息 -->
            <item name="EncNum" type="byte" />
            <item name="EncInfo" type="D_ENCOURAGE" count="MAX_TOWER_ENC_NUM" refer="EncNum" />
            <!-- 当前层信息 -->
            <item name="CurTIF" type="D_TOWERIF" />
        </type>
        <!-- 重置爬塔请求 -->
        <type name="P_RESETTOWER_REQ" MsgID="1604">
            <!-- 扩展字段 -->
            <item name="Ext" type="byte" />
        </type>
        <!-- 重置爬塔应答 -->
        <type name="P_RESETTOWER_ACK" MsgID="1605">
            <!-- 错误码 -->
            <item name="ErrCode" type="word" />
            <!-- 重置爬塔次数 -->
            <item name="ResetNum" type="word" />
            <!-- 当前元宝 -->
            <item name="CurGold" type="uint64" />
            <!-- 当前层信息 -->
            <item name="CurTIF" type="D_TOWERIF" />
        </type>
    </types>
</coder>

将该XML文件拷到

E:\xg\server\src\server\protocol\xml

这个目录下

然后用这个目录E:\xg\server\tool下的vscoder.exe工具生成GBK协议

posted on 2014-04-16 10:32  一枚程序  阅读(841)  评论(0编辑  收藏  举报