381 lines
12 KiB
Erlang
381 lines
12 KiB
Erlang
%%----------------------------------------------------
|
|
%% 圣器
|
|
%%
|
|
%% @author yzq
|
|
%%----------------------------------------------------
|
|
-module(proto_241).
|
|
-export([info/0, cfg/0]).
|
|
-include("protocol.hrl").
|
|
|
|
info() -> {
|
|
"圣器"
|
|
,["common.hrl", "hallows.hrl", "item.hrl", "quest.hrl"]
|
|
}.
|
|
|
|
-spec cfg() -> [#rpc{}].
|
|
cfg() ->
|
|
[
|
|
#rpc{
|
|
code = 24100
|
|
,log_title = "请求圣器数据"
|
|
,req_desc = "请求圣器数据"
|
|
,req = [
|
|
]
|
|
,reply_desc = "返回圣器数据"
|
|
,reply = [
|
|
{array, hallows, hallows, "圣器数据", ?p_g_set(hallows_info,[
|
|
{uint32, id, "圣器id"}
|
|
,{uint32, step, "当前阶数"}
|
|
,{uint32, lucky, "当前幸运值"}
|
|
,{uint32, lucky_endtime, "幸运值清零时间"}
|
|
,{uint32, seal, "当前圣印数量"}
|
|
,{array, tuple, add_attr, "总属性加成", [
|
|
{uint32, attr_id, "属性id"}
|
|
,{uint32, attr_val, "属性值"}
|
|
]}
|
|
,{array, hallows_skill, skill, "圣技", [
|
|
{uint32, lev, "圣技等级"}
|
|
,{uint32, skill_bid, "技能bid"}
|
|
]}
|
|
,{uint32, look_id, "幻化ID"}
|
|
,{uint32, refine_lev, "精炼等级"}
|
|
])}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 24101
|
|
,log_title = "圣器进阶"
|
|
,req_desc = "圣器进阶"
|
|
,req = [
|
|
{uint32, id, "圣器id"}
|
|
,{uint8, is_auto, "是否自动购买"}
|
|
]
|
|
,reply_desc = "圣器进阶"
|
|
,reply = [
|
|
{uint8, result, "1:成功 0 失败"}
|
|
,{string, msg, "消息"}
|
|
,{uint32, id, "圣器id"}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 24103
|
|
,log_title = "圣技升级"
|
|
,req_desc = "圣技升级"
|
|
,req = [
|
|
{uint32, hallows_id, "圣器id"}
|
|
]
|
|
,reply_desc = "圣技升级"
|
|
,reply = [
|
|
{uint8, result, "1:成功 0 失败"}
|
|
,{string, msg, "消息"}
|
|
,{uint32, hallows_id, "圣器id"}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 24104
|
|
,log_title = "圣印使用"
|
|
,req_desc = "圣印使用"
|
|
,req = [
|
|
{uint32, hallows_id, "圣器id"}
|
|
,{uint32, num, "使用数量"}
|
|
]
|
|
,reply_desc = "圣印使用"
|
|
,reply = [
|
|
{uint8, result, "1:成功 0 失败"}
|
|
,{string, msg, "消息"}
|
|
,{uint32, id, "圣器id"}
|
|
]
|
|
}
|
|
%% ,#rpc{
|
|
%% code = 24106
|
|
%% ,req_desc = "领取奖励"
|
|
%% ,req = [
|
|
%% {uint32, hallows_id, "圣器id"}
|
|
%% ,{uint32, id, "奖励id"}
|
|
%% ]
|
|
%% ,reply_desc = "领取奖励"
|
|
%% ,reply = [
|
|
%% {uint8, code, "结果状态(0:失败 1:成功)"}
|
|
%% ,{string, msg, "结果信息"}
|
|
%% ,{uint32, hallows_id, "圣器id"}
|
|
%% ]
|
|
%% }
|
|
,#rpc{
|
|
code = 24107
|
|
,log_title = "更新圣器"
|
|
,req_desc = "更新圣器"
|
|
,req = [
|
|
]
|
|
,reply_desc = "更新圣器"
|
|
,reply = [
|
|
{rec, hallows, hallows, ?p_g_get(hallows_info)}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 24108
|
|
,log_title = "激活圣器"
|
|
,req_desc = "激活圣器"
|
|
,req = [
|
|
]
|
|
,reply_desc = "激活圣器"
|
|
,reply = [
|
|
{rec, hallows, hallows, ?p_g_get(hallows_info)}
|
|
]
|
|
}
|
|
%% ,#rpc{
|
|
%% code = 24109
|
|
%% ,req_desc = "已领取奖励列表"
|
|
%% ,req = [
|
|
%% {uint32, id, "圣器id"}
|
|
%% ]
|
|
%% ,reply_desc = "激活圣器"
|
|
%% ,reply = [
|
|
%% {uint32, id, "圣器id"}
|
|
%% ,{array, single, reward, "已领取奖励列表", [
|
|
%% {uint8, reward_id, "奖励ID"}
|
|
%% ]}
|
|
%% ]
|
|
%% }
|
|
,#rpc{
|
|
code = 24120
|
|
,log_title = "任务信息"
|
|
,req_desc = "任务信息"
|
|
,req = []
|
|
,reply = [
|
|
{array, tuple, list, "任务列表", [
|
|
{uint32, id, "ID"}
|
|
,{uint8, finish, "是否已完成(0:未完成 1:已完成 2:已提交)"}
|
|
,{uint32, target_val, "目标值"}
|
|
,{uint32, value, "当前值"}
|
|
]}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 24121
|
|
,log_title = "任务信息更新"
|
|
,req_desc = "任务信息更新"
|
|
,req = []
|
|
,reply = [
|
|
{array, tuple, list, "任务列表", [
|
|
{uint32, id, "ID"}
|
|
,{uint8, finish, "是否已完成(0:未完成 1:已完成 2:已提交)"}
|
|
,{uint32, target_val, "目标值"}
|
|
,{uint32, value, "当前值"}
|
|
]}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 24122
|
|
,log_title = "提交任务"
|
|
,req_desc = "提交任务"
|
|
,req = [
|
|
{uint32, id, "任务ID"}
|
|
]
|
|
,reply = [
|
|
{uint8, code, "结果状态"}
|
|
,{string, msg, "结果信息"}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 24123
|
|
,log_title = "圣器重铸"
|
|
,req_desc = "圣器重铸"
|
|
,req = [
|
|
{uint32, id, "圣器id"}
|
|
]
|
|
,reply = [
|
|
{uint8, code, "结果状态"}
|
|
,{string, msg, "结果信息"}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 24124
|
|
,log_title = "第一次打开圣器界面"
|
|
,req_desc = "第一次打开圣器界面"
|
|
,req = [
|
|
]
|
|
,reply = [
|
|
{uint8, is_first, "是否打开过, 1是 0否"}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 24125
|
|
,log_title = "请求神器幻化数据"
|
|
,req_desc = "请求神器幻化数据"
|
|
,req = [
|
|
]
|
|
,reply_desc = "返回幻化数据"
|
|
,reply = [
|
|
{array, hallows_looks, hallows_looks, "幻化数据", ?p_g_set(hallows_looks,[
|
|
{uint32, id, "幻化id"}
|
|
,{uint32, endtime, "过期时间,0则不过期"}
|
|
,{uint32, eqm_hallows, "当前幻化的神器,0则未幻化"}
|
|
])}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 24126
|
|
,log_title = "更新幻化数据"
|
|
,req_desc = "更新幻化数据"
|
|
,req = [
|
|
]
|
|
,reply_desc = "更新幻化"
|
|
,reply = [
|
|
{rec, hallows_looks, hallows_looks, ?p_g_get(hallows_looks)}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 24127
|
|
,log_title = "激活幻化"
|
|
,req_desc = "激活幻化"
|
|
,req = [
|
|
]
|
|
,reply_desc = "激活幻化"
|
|
,reply = [
|
|
{rec, hallows_looks, hallows_looks, ?p_g_get(hallows_looks)}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 24128
|
|
,log_title = "幻化任务信息"
|
|
,req_desc = "幻化任务信息"
|
|
,req = []
|
|
,reply = [
|
|
{array, tuple, list, "任务列表", [
|
|
{uint32, id, "ID"}
|
|
,{uint8, finish, "是否已完成(0:未完成 1:已完成 2:已提交)"}
|
|
,{uint32, target_val, "目标值"}
|
|
,{uint32, value, "当前值"}
|
|
]}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 24129
|
|
,log_title = "幻化任务信息更新"
|
|
,req_desc = "幻化任务信息更新"
|
|
,req = []
|
|
,reply = [
|
|
{array, tuple, list, "任务列表", [
|
|
{uint32, id, "ID"}
|
|
,{uint8, finish, "是否已完成(0:未完成 1:已完成 2:已提交)"}
|
|
,{uint32, target_val, "目标值"}
|
|
,{uint32, value, "当前值"}
|
|
]}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 24130
|
|
,log_title = "提交幻化任务"
|
|
,req_desc = "提交幻化任务"
|
|
,req = [
|
|
{uint32, id, "任务ID"}
|
|
]
|
|
,reply = [
|
|
{uint8, code, "结果状态"}
|
|
,{string, msg, "结果信息"}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 24131
|
|
,log_title = "解锁幻化神器"
|
|
,req_desc = "解锁幻化神器"
|
|
,req = [
|
|
{uint32, id, "幻化ID"}
|
|
]
|
|
,reply = [
|
|
{uint8, code, "结果状态"}
|
|
,{string, msg, "结果信息"}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 24132
|
|
,log_title = "穿戴幻化神器"
|
|
,req_desc = "穿戴幻化神器"
|
|
,req = [
|
|
{uint32, id, "幻化ID"}
|
|
,{uint32, hallows_id, "神器ID"}
|
|
,{uint8, flag, "操作 1:穿戴 2:脱下"}
|
|
]
|
|
,reply = [
|
|
{uint8, code, "结果状态"}
|
|
,{string, msg, "结果信息"}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 24133
|
|
,log_title = "幻化过期"
|
|
,req_desc = "幻化过期"
|
|
,req = [
|
|
]
|
|
,reply = [
|
|
{uint32, id, "幻化ID"}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 24135
|
|
,log_title = "神器精炼"
|
|
,req_desc = "神器精炼"
|
|
,req = [
|
|
{uint32, hallows_id, "神器ID"}
|
|
]
|
|
,reply = [
|
|
{uint8, code, "结果状态"}
|
|
,{string, msg, "结果信息"}
|
|
,{uint32, hallows_id, "神器ID"}
|
|
,{uint32, refine_lev, "精炼等级"}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 24136
|
|
,log_title = "查看神器信息"
|
|
,req_desc = "查看神器信息"
|
|
,req = [
|
|
{tuple, r_id, [
|
|
{uint32, r_rid, "角色ID"}
|
|
,{string, r_srvid, "角色服务器ID"}
|
|
]}
|
|
,{uint32, type, "阵法类型"}
|
|
]
|
|
,reply_desc = "查看神器信息"
|
|
,reply = [
|
|
{array, hallows, hallows, "圣器数据", ?p_g_set(hallows_info,[
|
|
{uint32, id, "圣器id"}
|
|
,{uint32, step, "当前阶数"}
|
|
,{array, tuple, add_attr, "总属性加成", [
|
|
{uint32, attr_id, "属性id"}
|
|
,{uint32, attr_val, "属性值"}
|
|
]}
|
|
,{array, hallows_skill, skill, "圣技", [
|
|
{uint32, lev, "圣技等级"}
|
|
,{uint32, skill_bid, "技能bid"}
|
|
]}
|
|
,{uint32, look_id, "幻化ID"}
|
|
,{uint32, refine_lev, "精炼等级"}
|
|
])}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 24140
|
|
,log_title = "请求圣器数据"
|
|
,req_desc = "请求圣器数据"
|
|
,req = [
|
|
{uint32, hallows_id, "神器ID"}
|
|
]
|
|
,reply_desc = "返回圣器数据"
|
|
,reply = [
|
|
|
|
{uint32, id, "圣器id"}
|
|
,{uint32, step, "当前阶数"}
|
|
,{array, tuple, add_attr, "总属性加成", [
|
|
{uint32, attr_id, "属性id"}
|
|
,{uint32, attr_val, "属性值"}
|
|
]}
|
|
,{array, tuple, skill, "圣技", [
|
|
{uint32, lev, "圣技等级"}
|
|
,{uint32, skill_bid, "技能bid"}
|
|
]}
|
|
,{uint32, refine_lev, "精炼等级"}
|
|
]
|
|
}
|
|
].
|