189 lines
6.1 KiB
Erlang
189 lines
6.1 KiB
Erlang
|
|
%%----------------------------------------------------
|
||
|
|
%% 邀请码
|
||
|
|
%%
|
||
|
|
%% @author whjing2011@gmail.com
|
||
|
|
%%----------------------------------------------------
|
||
|
|
-module(proto_198).
|
||
|
|
-export([info/0, cfg/0]).
|
||
|
|
-include("protocol.hrl").
|
||
|
|
|
||
|
|
info() -> {
|
||
|
|
"邀请码"
|
||
|
|
,["invite_code.hrl"]
|
||
|
|
}.
|
||
|
|
|
||
|
|
-spec cfg() -> [#rpc{}].
|
||
|
|
cfg() ->
|
||
|
|
[
|
||
|
|
#rpc{
|
||
|
|
code = 19800
|
||
|
|
,log_title = "个人邀请码"
|
||
|
|
,req_desc = "个人邀请码"
|
||
|
|
,req = []
|
||
|
|
,reply = [
|
||
|
|
{uint32, code, "邀请码"}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
,#rpc{
|
||
|
|
code = 19801
|
||
|
|
,log_title = "绑定邀请码"
|
||
|
|
,req_desc = "绑定邀请码"
|
||
|
|
,req = [
|
||
|
|
{uint32, code, "邀请码"}
|
||
|
|
]
|
||
|
|
,reply = [
|
||
|
|
{uint8, code, "结果(0:成功 1:失败)"}
|
||
|
|
,{string, msg, "结果信息"}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
,#rpc{
|
||
|
|
code = 19802
|
||
|
|
,log_title = "绑定角色列表"
|
||
|
|
,req_desc = "绑定角色列表"
|
||
|
|
,req = []
|
||
|
|
,reply = [
|
||
|
|
{array, invite_code_bind, list, "绑定列表", ?p_g_set(invite_role, [
|
||
|
|
{tuple, role_id, [
|
||
|
|
{uint32, rid, "角色ID"}
|
||
|
|
,{string, srv_id, "服务器ID"}
|
||
|
|
]}
|
||
|
|
,{string, name, "角色名"}
|
||
|
|
,{uint8, lev, "等级"}
|
||
|
|
,{uint8, vip, "VIP"}
|
||
|
|
,{uint8, sex, "性别"}
|
||
|
|
,{uint8, online, "是否在线"}
|
||
|
|
,{uint32, power, "战力"}
|
||
|
|
,{uint32, face, face_id, "头像"}
|
||
|
|
,{uint32, avatar_bid, "头像框基础id"}
|
||
|
|
,{uint8, is_return, "是否回归"}
|
||
|
|
,{uint32, face_update_time, "自定义头像时间"}
|
||
|
|
,{string, face_file, "自定义头像"}
|
||
|
|
])}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
,#rpc{
|
||
|
|
code = 19803
|
||
|
|
,log_title = "绑定角色变化推送(新增/更新)"
|
||
|
|
,reply_desc = "绑定角色变化推送(新增/更新)"
|
||
|
|
,reply = [
|
||
|
|
{rec, invite_code_bind, invite_code_bind, ?p_g_get(invite_role)}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
,#rpc{
|
||
|
|
code = 19804
|
||
|
|
,log_title = "奖励信息"
|
||
|
|
,req_desc = "奖励信息"
|
||
|
|
,req = []
|
||
|
|
,reply = [
|
||
|
|
{array, tuple, list, "奖励列表", [
|
||
|
|
{uint8, id, "ID"}
|
||
|
|
,{uint8, num, "累计可奖励次数(>had时为可领取)"}
|
||
|
|
,{uint8, had, "已累计奖励次数"}
|
||
|
|
]}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
,#rpc{
|
||
|
|
code = 19805
|
||
|
|
,log_title = "奖励领取"
|
||
|
|
,req_desc = "奖励领取"
|
||
|
|
,req = [
|
||
|
|
{uint8, id, "ID"}
|
||
|
|
]
|
||
|
|
,reply = [
|
||
|
|
{uint8, code, "结果编号(0:正常 1:失败)"}
|
||
|
|
,{string, msg, "结果信息"}
|
||
|
|
,{uint8, id, "ID"}
|
||
|
|
,{uint8, num, "累计可奖励次数(>had时为可领取)"}
|
||
|
|
,{uint8, had, "已累计奖励次数"}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
,#rpc{
|
||
|
|
code = 19806
|
||
|
|
,log_title = "是否查看过邀请码"
|
||
|
|
,req_desc = "是否查看过邀请码"
|
||
|
|
,req = []
|
||
|
|
,reply = [
|
||
|
|
{uint8, status, "0:否 1:是"}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
,#rpc{
|
||
|
|
code = 1980
|
||
|
|
,log_title = "自己所绑定的角色"
|
||
|
|
,req_desc = "自己所绑定的角色"
|
||
|
|
,req = []
|
||
|
|
,reply = [
|
||
|
|
{uint32, code, "绑定号码"}
|
||
|
|
,{uint32, rid, "绑定角色ID"}
|
||
|
|
,{string, srv_id, "服务器ID"}
|
||
|
|
,{string, name, "角色名"}
|
||
|
|
,{uint8, lev, "等级"}
|
||
|
|
,{uint8, vip, "VIp等级"}
|
||
|
|
,{uint8, online, "是否在线"}
|
||
|
|
,{uint32, power, "战力"}
|
||
|
|
,{uint32, face, face_id, "头像"}
|
||
|
|
,{uint32, avatar_bid, "头像框基础id"}
|
||
|
|
,{uint32, face_update_time, "自定义头像时间"}
|
||
|
|
,{string, face_file, "自定义头像"}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
,#rpc{
|
||
|
|
code = 19807
|
||
|
|
,req_desc = "自己所绑定的角色"
|
||
|
|
,req = []
|
||
|
|
,reply = [
|
||
|
|
{uint32, code, "绑定号码"}
|
||
|
|
,{uint32, rid, "绑定角色ID"}
|
||
|
|
,{string, srv_id, "服务器ID"}
|
||
|
|
,{string, name, "角色名"}
|
||
|
|
,{uint8, lev, "等级"}
|
||
|
|
,{uint8, vip, "VIp等级"}
|
||
|
|
,{uint8, online, "是否在线"}
|
||
|
|
,{uint32, power, "战力"}
|
||
|
|
,{uint32, face, face_id, "头像"}
|
||
|
|
,{uint32, avatar_bid, "头像框基础id"}
|
||
|
|
,{uint32, face_update_time, "自定义头像时间"}
|
||
|
|
,{string, face_file, "自定义头像"}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
,#rpc{
|
||
|
|
code = 19810
|
||
|
|
,log_title = "绑定回归码"
|
||
|
|
,req_desc = "绑定回归码"
|
||
|
|
,req = [
|
||
|
|
{uint32, code, "邀请码"}
|
||
|
|
]
|
||
|
|
,reply = [
|
||
|
|
{uint8, code, "结果(0:成功 1:失败)"}
|
||
|
|
,{string, msg, "结果信息"}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
,#rpc{
|
||
|
|
code = 19811
|
||
|
|
,log_title = "回归奖励信息"
|
||
|
|
,req_desc = "回归奖励信息"
|
||
|
|
,req = []
|
||
|
|
,reply = [
|
||
|
|
{array, tuple, list, "奖励列表", [
|
||
|
|
{uint8, id, "ID"}
|
||
|
|
,{uint8, num, "累计可奖励次数(>had时为可领取)"}
|
||
|
|
,{uint8, had, "已累计奖励次数"}
|
||
|
|
]}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
,#rpc{
|
||
|
|
code = 19812
|
||
|
|
,log_title = "回归奖励领取"
|
||
|
|
,req_desc = "回归奖励领取"
|
||
|
|
,req = [
|
||
|
|
{uint8, id, "ID"}
|
||
|
|
]
|
||
|
|
,reply = [
|
||
|
|
{uint8, code, "结果编号(0:正常 1:失败)"}
|
||
|
|
,{string, msg, "结果信息"}
|
||
|
|
,{uint8, id, "ID"}
|
||
|
|
,{uint8, num, "累计可奖励次数(>had时为可领取)"}
|
||
|
|
,{uint8, had, "已累计奖励次数"}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
].
|