99 lines
1.9 KiB
Erlang
99 lines
1.9 KiB
Erlang
|
|
%%-----------------------------------------
|
||
|
|
%%
|
||
|
|
%%
|
||
|
|
%%-----------------------------------------
|
||
|
|
-module(proto_11).
|
||
|
|
-export([
|
||
|
|
info/0
|
||
|
|
,cfg/0
|
||
|
|
]
|
||
|
|
).
|
||
|
|
-include("protocol.hrl").
|
||
|
|
|
||
|
|
info() -> {
|
||
|
|
""
|
||
|
|
,[]
|
||
|
|
}.
|
||
|
|
|
||
|
|
cfg() ->
|
||
|
|
[
|
||
|
|
#rpc{
|
||
|
|
code = 1110
|
||
|
|
,log_title = "帐号登录"
|
||
|
|
,req_desc = "帐号登录"
|
||
|
|
,req = [
|
||
|
|
{array, tuple, args, "登录参数列", [
|
||
|
|
{string, key, "键"},
|
||
|
|
{string, val, "值"}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
]
|
||
|
|
,reply_desc = "帐号登录返回结果"
|
||
|
|
,reply = [
|
||
|
|
{uint8, code, "是否成功"},
|
||
|
|
{string, msg, "附加信息"},
|
||
|
|
{array, list, roles, "角色列表", [
|
||
|
|
{uint32, rid, "角色id"},
|
||
|
|
{string, srv_id, "服务器id"},
|
||
|
|
{string, name, "角色名"},
|
||
|
|
{uint16, lev, "等级"},
|
||
|
|
{uint8, sex, "性别"},
|
||
|
|
{uint16, career, "职业"},
|
||
|
|
{uint32, face_id, "头像ID"},
|
||
|
|
{uint8, is_online, "是否在线"}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
{uint8, least_career, "推荐职业(最少人选择的职业)"}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
#rpc{
|
||
|
|
code = 1190
|
||
|
|
,log_title = "加速包检查"
|
||
|
|
,req_desc = "加速包检查"
|
||
|
|
,req = []
|
||
|
|
},
|
||
|
|
#rpc{
|
||
|
|
code = 1196
|
||
|
|
,reply_desc = "基准时间"
|
||
|
|
,reply = [
|
||
|
|
{uint32, time, "服务器基准时间"}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
#rpc{
|
||
|
|
code = 1197
|
||
|
|
,log_title = "包校对"
|
||
|
|
,req_desc = "包校对"
|
||
|
|
,req = [
|
||
|
|
{string, sign, "sign"}
|
||
|
|
,{uint32, idx, "编号"}
|
||
|
|
,{uint16, code, "协议号"}
|
||
|
|
,{uint32, time, "时间"}
|
||
|
|
]
|
||
|
|
,reply_desc = ""
|
||
|
|
,reply = [
|
||
|
|
]
|
||
|
|
},
|
||
|
|
#rpc{
|
||
|
|
code = 1198
|
||
|
|
,log_title = "网络延时测试"
|
||
|
|
,req_desc = "网络延时测试"
|
||
|
|
,req = [
|
||
|
|
{uint32, time, "客户端ping时间"}
|
||
|
|
]
|
||
|
|
,reply_desc = "网络延时测试结果"
|
||
|
|
,reply = [
|
||
|
|
{uint32, time, "客户端ping时间"}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
,#rpc{
|
||
|
|
code = 1199
|
||
|
|
,log_title = "心跳包"
|
||
|
|
,req_desc = "心跳包"
|
||
|
|
,req = []
|
||
|
|
,reply_desc = "心跳包返回结果"
|
||
|
|
,reply = [
|
||
|
|
{uint32, time, "时间戳"}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
].
|