Files
2026-05-23 22:10:14 +08:00

255 lines
9.1 KiB
Erlang

%%----------------------------------------------------
%% 任务相关协议
%% @author liwl
%% @end
%%----------------------------------------------------
-module(proto_104).
-export([
info/0
,cfg/0
]
).
-include("protocol.hrl").
info() -> {
"任务相关协议"
,[
"quest.hrl"
]
}.
cfg() ->
[
#rpc{
code = 10400
,log_title = "已接任务面板"
,req_desc = "已接任务面板"
,req = []
,reply_desc = "已接任务面板"
,reply = [
{array, quest, quest_list, "已接任务列表", [
{uint32, id, "任务ID"}
,{uint8, type, "任务类型"}
,{uint8, finish, "是否已完成"}
,{uint32, accept_time, "接受任务时间"}
,{array, quest_progress, progress, "任务进度", [
{int16, id, "进度ID"}
,{uint8, finish, "是否已完成"}
,{uint32, target, "目标需求值"}
,{uint32, target_val, "目标值"}
,{uint32, value, "当前值"}
,{array, tuple, ext_data, "附加数据"
,[{uint8, key, "数值属性的枚举"}
, {uint32, value, "属性值"}
]
}
]
}
]
}
]
}
,#rpc{
code = 10402
,log_title = {"接受任务:~w", [id]}
,req_desc = {"接受任务:~w", [id]}
,req = [
{uint32, id, "任务ID"}
]
,reply_desc = {"接受任务, 结果[~w], 附加消息:~ts", [flag, msg]}
,reply = [
{int8, flag, "结果"}
,{string, msg, "信息"}
,{uint32, id, "任务ID"}
]
}
,#rpc{
code = 10403
,log_title = "增加已接任务"
,reply_desc = "增加已接任务"
,reply = [
{array, quest, quest_list, "增加已接任务列表", [
{uint32, id, "任务ID"}
,{uint8, type, "任务类型"}
,{uint8, finish, "是否已完成"}
,{uint32, accept_time, "接受任务时间"}
,{array, quest_progress, progress, "任务进度", [
{int16, id, "进度ID"}
,{uint8, finish, "是否已完成"}
,{uint32, target, "目标需求值"}
,{uint32, target_val, "目标值"}
,{uint32, value, "当前值"}
,{array, tuple, ext_data, "附加数据"
,[{uint8, key, "数值属性的枚举"}
, {uint32, value, "属性值"}
]
}
]
}
]
}
]
}
,#rpc{
code = 10404
,log_title = "删除可接任务"
,reply_desc = "删除可接任务"
,reply = [
{array, single, quest_list, "可接任务列表", [
{uint32, id, "任务ID"}
]
}
]
}
,#rpc{
code = 10405
,log_title = {"放弃任务:~w", [id]}
,req_desc = {"放弃任务:~w", [id]}
,req = [
{uint32, id, "任务ID"}
]
,reply_desc = {"放弃任务, 结果[~w], 附加消息:~ts", [flag, msg]}
,reply = [
{int8, flag, "结果"}
,{string, msg, "信息"}
,{uint32, id, "任务ID"}
]
}
,#rpc{
code = 10406
,log_title = {"提交任务:~w", [id]}
,req_desc = {"提交任务:~w", [id]}
,req = [
{uint32, id, "任务ID"}
]
,reply_desc = {"提交任务, 结果[~w], 附加消息:~ts", [flag, msg]}
,reply = [
{int8, flag, "结果"}
,{string, msg, "信息"}
,{uint32, id, "任务ID"}
]
}
,#rpc{
code = 10407
,log_title = "增加可接任务"
,reply_desc = "增加可接任务"
,reply = [
{array, single, quest_list, "可接任务列表", [
{uint32, id, "任务ID"}
]
}
]
}
,#rpc{
code = 10408
,log_title = "删除已接任务"
,reply_desc = "删除已接任务"
,reply = [
{array, single, quest_list, "任务列表", [
{uint32, id, "任务ID"}
]
}
]
}
,#rpc{
code = 10409
,log_title = "更新已接任务进度"
,reply_desc = "更新已接任务进度"
,reply = [
{array, quest, quest_list, "已接任务列表", [
{uint32, id, "任务ID"}
,{uint8, type, "任务类型"}
,{uint8, finish, "是否已完成"}
,{uint32, accept_time, "接受任务时间"}
,{array, quest_progress, progress, "任务进度", [
{int16, id, "进度ID"}
,{uint8, finish, "是否已完成"}
,{uint32, target, "目标需求值"}
,{uint32, target_val, "目标值"}
,{uint32, value, "当前值"}
,{array, tuple, ext_data, "附加数据"
,[{uint8, key, "数值属性的枚举"}
, {uint32, value, "属性值"}
]
}
]
}
]
}
]
}
,#rpc{
code = 10410
,log_title = "已接主支线任务面板"
,req_desc = "已接主支线任务面板"
,req = []
,reply_desc = "已接主支线任务面板"
,reply = [
{array, quest, quest_list, "已接任务列表", [
{uint32, id, "任务ID"}
,{uint8, type, "任务类型"}
,{uint8, finish, "是否已完成"}
,{uint32, accept_time, "接受任务时间"}
,{array, quest_progress, progress, "任务进度", [
{int16, id, "进度ID"}
,{uint8, finish, "是否已完成"}
,{uint32, target, "目标需求值"}
,{uint32, target_val, "目标值"}
,{uint32, value, "当前值"}
,{array, tuple, ext_data, "附加数据"
,[{uint8, key, "数值属性的枚举"}
, {uint32, value, "属性值"}
]
}
]
}
]
}
]
}
,#rpc{
code = 10411
,log_title = "已接主成长任务面板"
,req_desc = "已接主成长任务面板"
,req = []
,reply_desc = "已接主成长任务面板"
,reply = [
{array, quest, quest_list, "已接任务列表", [
{uint32, id, "任务ID"}
,{uint8, type, "任务类型"}
,{uint8, finish, "是否已完成"}
,{uint32, accept_time, "接受任务时间"}
,{array, quest_progress, progress, "任务进度", [
{int16, id, "进度ID"}
,{uint8, finish, "是否已完成"}
,{uint32, target, "目标需求值"}
,{uint32, target_val, "目标值"}
,{uint32, value, "当前值"}
,{array, tuple, ext_data, "附加数据"
,[{uint8, key, "数值属性的枚举"}
, {uint32, value, "属性值"}
]
}
]
}
]
}
]
}
,#rpc{
code = 10412
,log_title = {"提交任务"}
,req_desc = {"提交任务"}
,req = [
]
,reply_desc = {"提交任务, 结果[~w], 附加消息:~ts", [flag, msg]}
,reply = [
{int8, flag, "结果"}
,{string, msg, "信息"}
]
}
].