591 lines
15 KiB
Erlang
591 lines
15 KiB
Erlang
%%%-------------------------------------------------------------------
|
|
%%% @author Administrator
|
|
%%% @copyright (C) 2024, <COMPANY>
|
|
%%% @doc
|
|
%%%
|
|
%%% @end
|
|
%%% Created : 02. 1月 2024 13:26
|
|
%%%-------------------------------------------------------------------
|
|
-module(proto_311).
|
|
-author("Administrator").
|
|
|
|
-export([info/0, cfg/0]).
|
|
-include("protocol.hrl").
|
|
|
|
info() -> {
|
|
"星空祈愿"
|
|
,["common.hrl"]
|
|
}.
|
|
|
|
-spec cfg() -> [#rpc{}].
|
|
cfg() ->
|
|
[
|
|
#rpc{
|
|
code = 31100
|
|
,log_title = "请求完成情况"
|
|
,req_desc = "请求完成情况"
|
|
,req = []
|
|
,reply_desc = "请求完成情况"
|
|
,reply = [
|
|
{uint32, free_end_time, "免费一抽冷却时间"},
|
|
{uint32, draw_times, "抽取次数"},
|
|
{uint32, gold_times, "剩余钻石次数"},
|
|
{uint32, luck_num, "幸运值"},
|
|
{uint32, is_skip, "是否跳过动画0-不跳过,1-跳过"},
|
|
{array, tuple, ids, "已完成的训练Id", [
|
|
{uint32, id, "id"},
|
|
{uint32, status, "0-未完成, 1-可领取, 2-已领取"}
|
|
]}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 31101
|
|
,log_title = "开始抽奖"
|
|
,req_desc = "开始抽奖"
|
|
,req = [
|
|
{uint32, group_id, "训练id"}
|
|
,{uint32, times, "次数"}
|
|
]
|
|
,reply_desc = "开始抽奖"
|
|
,reply = [
|
|
{uint8, flag, "是否成功"}
|
|
,{string, msg, "信息"}
|
|
,{array, single, item_id, "奖励", [
|
|
{uint32, id, "id"}
|
|
]}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 31102
|
|
,log_title = "领奖"
|
|
,req_desc = "领奖"
|
|
,req = [
|
|
{uint32, group_id, "训练id"}
|
|
,{uint32, type, "抽奖类型 1-免费,3-钻石,4-道具"},
|
|
{uint32, id, "id"}
|
|
]
|
|
,reply_desc = "开始挑战"
|
|
,reply = [
|
|
{uint8, flag, "是否成功"}
|
|
,{string, msg, "信息"}
|
|
]
|
|
}
|
|
|
|
,#rpc{
|
|
code = 31103
|
|
,log_title = "礼包信息"
|
|
,req_desc = "礼包信息"
|
|
,req = [
|
|
]
|
|
,reply_desc = "礼包信息"
|
|
,reply = [
|
|
{array, tuple, ids, "已完成的训练Id", [
|
|
{uint32, id, "id"},
|
|
{uint32, buy_num, "剩余购买次数"}
|
|
]}
|
|
]
|
|
},
|
|
#rpc{
|
|
code = 31104
|
|
,log_title = "领取达成奖励"
|
|
,req_desc = "领取达成奖励"
|
|
,req = [
|
|
{uint32, id, "id"}
|
|
]
|
|
,reply_desc = "领取达成奖励"
|
|
,reply = [
|
|
{uint8, flag, "是否成功"}
|
|
,{string, msg, "信息"}
|
|
]
|
|
}
|
|
|
|
,
|
|
#rpc{
|
|
code = 31105
|
|
,log_title = "跳过动画"
|
|
,req_desc = "跳过动画"
|
|
,req = [
|
|
{uint32, status, "状态"}
|
|
]
|
|
,reply_desc = "跳过动画"
|
|
,reply = [
|
|
{uint8, flag, "是否成功"}
|
|
,{string, msg, "信息"}
|
|
]
|
|
}
|
|
|
|
,
|
|
#rpc{
|
|
code = 31106
|
|
,log_title = "钻石购买礼包"
|
|
,req_desc = "钻石购买礼包"
|
|
,req = [
|
|
]
|
|
,reply_desc = "钻石购买礼包"
|
|
,reply = [
|
|
{uint8, flag, "是否成功"}
|
|
,{string, msg, "信息"}
|
|
]
|
|
}
|
|
|
|
,
|
|
#rpc{
|
|
code = 31107
|
|
,log_title = "日志信息"
|
|
,req_desc = "日志信息"
|
|
,req = [
|
|
]
|
|
,reply_desc = "日志信息"
|
|
,reply = [
|
|
{array, tuple, log_info, "日志", [
|
|
{uint32, time, "抽取的时间"},
|
|
{uint32, item_id, "item id"},
|
|
{uint32, num, "数量"}
|
|
]}
|
|
]
|
|
},
|
|
#rpc{
|
|
code = 31110
|
|
,log_title = "主題卡池-檢查活動數據"
|
|
,req_desc = "主題卡池-檢查活動數據"
|
|
,req = [
|
|
{uint32, bid, "活動ID"}
|
|
]
|
|
,reply = [
|
|
{uint8, result, "1 成功 0 成功"}
|
|
,{string, msg, "消息"}
|
|
]
|
|
},
|
|
#rpc{
|
|
code = 31111
|
|
,log_title = "主題卡池-招募"
|
|
,req_desc = "主題卡池-招募"
|
|
,req = [
|
|
{uint32, group_id, "分組id"}
|
|
,{uint32, type1, "1-道具抽"}
|
|
,{uint32, type2, "1-單抽,2-十連抽"}
|
|
]
|
|
,reply = [
|
|
{uint8, code, "结果(0:失败 1:成功)"}
|
|
,{string, msg, "结果信息"}
|
|
,{uint32, left_cnt, "剩餘招募次數"}
|
|
]
|
|
},
|
|
|
|
|
|
#rpc{
|
|
code = 31120
|
|
,log_title = "任务信息"
|
|
,req_desc = "任务信息"
|
|
,req = []
|
|
,reply = [
|
|
{uint32, period, "期数"},
|
|
{uint32, cur_day, "天数"}
|
|
,{uint32, end_time, "结束时间"}
|
|
,{array, tuple, list, "任务列表", [
|
|
{uint32, id, "ID"}
|
|
,{uint8, type, "任务类型"}
|
|
,{uint8, finish, "是否已完成(0:未完成 1:已完成 2:已提交)"}
|
|
,{uint32, target_val, "目标值"}
|
|
,{uint32, value, "当前值"}
|
|
,{uint32, end_time, "结束时间"}
|
|
]}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 31121
|
|
,log_title = "任务信息更新"
|
|
,req_desc = "任务信息更新"
|
|
,req = []
|
|
,reply = [
|
|
{array, tuple, list, "任务列表", [
|
|
{uint32, id, "ID"}
|
|
,{uint8, type, "任务类型"}
|
|
,{uint8, finish, "是否已完成(0:未完成 1:已完成 2:已提交)"}
|
|
,{uint32, target_val, "目标值"}
|
|
,{uint32, value, "当前值"}
|
|
,{uint32, end_time, "结束时间"}
|
|
]}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 31122
|
|
,log_title = "提交任务"
|
|
,req_desc = "提交任务"
|
|
,req = [
|
|
{uint32, id, "任务ID"}
|
|
]
|
|
,reply = [
|
|
{uint8, code, "结果状态"}
|
|
,{string, msg, "结果信息"}
|
|
]
|
|
},
|
|
#rpc{
|
|
code = 31123
|
|
,log_title = "请求完成情况"
|
|
,req_desc = "请求完成情况"
|
|
,req = []
|
|
,reply_desc = "请求完成情况"
|
|
,reply = [
|
|
{uint32, free_end_time, "免费一抽冷却时间"},
|
|
{uint32, draw_times, "抽取次数"},
|
|
{uint32, gold_times, "剩余钻石次数"},
|
|
{uint32, luck_num, "幸运值"},
|
|
{uint32, is_skip, "是否跳过动画0-不跳过,1-跳过"},
|
|
{array, tuple, ids, "已完成的训练Id", [
|
|
{uint32, id, "id"},
|
|
{uint32, status, "0-未完成, 1-可领取, 2-已领取"}
|
|
]}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 31124
|
|
,log_title = "开始抽奖"
|
|
,req_desc = "开始抽奖"
|
|
,req = [
|
|
{uint32, group_id, "训练id"}
|
|
,{uint32, times, "次数"}
|
|
]
|
|
,reply_desc = "开始抽奖"
|
|
,reply = [
|
|
{uint8, flag, "是否成功"}
|
|
,{string, msg, "信息"}
|
|
,{array, single, item_id, "奖励", [
|
|
{uint32, id, "id"}
|
|
]}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 31125
|
|
,log_title = "领奖"
|
|
,req_desc = "领奖"
|
|
,req = [
|
|
{uint32, group_id, "训练id"}
|
|
,{uint32, type, "抽奖类型 1-免费,3-钻石,4-道具"},
|
|
{uint32, id, "id"}
|
|
]
|
|
,reply_desc = "开始挑战"
|
|
,reply = [
|
|
{uint8, flag, "是否成功"}
|
|
,{string, msg, "信息"}
|
|
]
|
|
},
|
|
|
|
#rpc{
|
|
code = 31126
|
|
,log_title = "领取达成奖励"
|
|
,req_desc = "领取达成奖励"
|
|
,req = [
|
|
{uint32, id, "id"}
|
|
]
|
|
,reply_desc = "领取达成奖励"
|
|
,reply = [
|
|
{uint8, flag, "是否成功"}
|
|
,{string, msg, "信息"}
|
|
]
|
|
}
|
|
|
|
,
|
|
#rpc{
|
|
code = 31127
|
|
,log_title = "跳过动画"
|
|
,req_desc = "跳过动画"
|
|
,req = [
|
|
{uint32, status, "状态"}
|
|
]
|
|
,reply_desc = "跳过动画"
|
|
,reply = [
|
|
{uint8, flag, "是否成功"}
|
|
,{string, msg, "信息"}
|
|
]
|
|
}
|
|
,
|
|
#rpc{
|
|
code = 31128
|
|
,log_title = "日志信息"
|
|
,req_desc = "日志信息"
|
|
,req = [
|
|
]
|
|
,reply_desc = "日志信息"
|
|
,reply = [
|
|
{array, tuple, log_info, "日志", [
|
|
{uint32, time, "抽取的时间"},
|
|
{uint32, item_id, "item id"},
|
|
{uint32, num, "数量"}
|
|
]}
|
|
]
|
|
}
|
|
|
|
,#rpc{
|
|
code = 31130
|
|
,log_title = "皮肤碎片开始抽奖"
|
|
,req_desc = "皮肤碎片开始抽奖"
|
|
,req = [
|
|
{uint32, camp_id, "活动id"}
|
|
,{uint32, times, "次数"}
|
|
]
|
|
,reply_desc = "开始抽奖"
|
|
,reply = [
|
|
{uint8, code, "是否成功"}
|
|
,{string, msg, "信息"}
|
|
,{uint32, is_notice, "是否高级特效"}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 31131
|
|
,log_title = "皮肤碎片开始领奖"
|
|
,req_desc = "皮肤碎片开始领奖"
|
|
,req = [
|
|
{uint32, camp_id, "活动id"}
|
|
,{uint32, times, "次数"}
|
|
]
|
|
,reply_desc = "皮肤碎片开始领奖"
|
|
,reply = [
|
|
{uint8, code, "是否成功"}
|
|
,{string, msg, "信息"}
|
|
]
|
|
},
|
|
#rpc{
|
|
code = 31140
|
|
,log_title = "请求限时祈愿数据"
|
|
,req_desc = "请求限时祈愿数据"
|
|
,req = [
|
|
{uint32, group_id, "分組id"}
|
|
]
|
|
,reply_desc = "请求限时祈愿数据"
|
|
,reply = [
|
|
{uint32, draw_times, "抽取次数"},
|
|
{uint32, group_id, "分組id"},
|
|
{uint32, camp_id, "活动id"},
|
|
{array, tuple, ids, "达成奖励数据", [
|
|
{uint32, id, "id"},
|
|
{uint32, status, "0-未完成, 1-可领取, 2-已领取"}
|
|
]}
|
|
]
|
|
},
|
|
#rpc{
|
|
code = 31141
|
|
,log_title = "主題卡池-招募"
|
|
,req_desc = "主題卡池-招募"
|
|
,req = [
|
|
{uint32, group_id, "分組id"}
|
|
,{uint32, type, "1-單抽,2-十連抽"}
|
|
]
|
|
,reply = [
|
|
{uint8, code, "结果(0:失败 1:成功)"}
|
|
, {uint32, camp_id, "活动id"}
|
|
,{string, msg, "结果信息"}
|
|
]
|
|
},
|
|
#rpc{
|
|
code = 31142
|
|
,log_title = "领取达成奖励"
|
|
,req_desc = "领取达成奖励"
|
|
,req = [
|
|
{uint32, group_id, "分組id"}
|
|
]
|
|
,reply_desc = "跳过动画"
|
|
,reply = [
|
|
{uint8, code, "是否成功"}
|
|
,{string, msg, "信息"}
|
|
, {uint32, camp_id, "活动id"}
|
|
]
|
|
},
|
|
#rpc{
|
|
code = 31143
|
|
,log_title = "更新限时祈愿数据"
|
|
,req_desc = "更新限时祈愿数据"
|
|
,req = [
|
|
]
|
|
,reply_desc = "更新限时祈愿数据"
|
|
,reply = [
|
|
{uint32, draw_times, "抽取次数"},
|
|
{uint32, group_id, "分組id"},
|
|
{uint32, camp_id, "活动id"},
|
|
{array, tuple, ids, "达成奖励数据", [
|
|
{uint32, id, "id"},
|
|
{uint32, status, "0-未完成, 1-可领取, 2-已领取"}
|
|
]}
|
|
]
|
|
},
|
|
#rpc{
|
|
code = 31144
|
|
,log_title = "请求限时僚机祈愿数据"
|
|
,req_desc = "请求限时僚机祈愿数据"
|
|
,req = [
|
|
{uint32, group_id, "分組id"}
|
|
]
|
|
,reply_desc = "请求限时僚机祈愿数据"
|
|
,reply = [
|
|
{uint32, draw_times, "抽取次数"},
|
|
{uint32, group_id, "分組id"},
|
|
{array, tuple, ids, "达成奖励数据", [
|
|
{uint32, id, "id"},
|
|
{uint32, status, "0-未完成, 1-可领取, 2-已领取"}
|
|
]}
|
|
]
|
|
},
|
|
#rpc{
|
|
code = 31145
|
|
,log_title = "主題卡池-僚机招募"
|
|
,req_desc = "主題卡池-僚机招募"
|
|
,req = [
|
|
{uint32, group_id, "分組id"}
|
|
,{uint32, type, "1-單抽,2-十連抽"}
|
|
]
|
|
,reply = [
|
|
{uint8, code, "结果(0:失败 1:成功)"}
|
|
,{string, msg, "结果信息"}
|
|
]
|
|
},
|
|
|
|
#rpc{
|
|
code = 31146
|
|
,log_title = "领取僚机达成奖励"
|
|
,req_desc = "领取僚机达成奖励"
|
|
,req = [
|
|
{uint32, group_id, "分組id"}
|
|
]
|
|
,reply_desc = "领取僚机达成奖励"
|
|
,reply = [
|
|
{uint8, code, "是否成功"}
|
|
,{string, msg, "信息"}
|
|
]
|
|
},
|
|
#rpc{
|
|
code = 31147
|
|
,log_title = "更新限时僚机祈愿数据"
|
|
,req_desc = "更新限时僚机祈愿数据"
|
|
,req = [
|
|
]
|
|
,reply_desc = "更新限时僚机祈愿数据"
|
|
,reply = [
|
|
{uint32, draw_times, "抽取次数"},
|
|
{uint32, group_id, "分組id"},
|
|
{array, tuple, ids, "达成奖励数据", [
|
|
{uint32, id, "id"},
|
|
{uint32, status, "0-未完成, 1-可领取, 2-已领取"}
|
|
]}
|
|
]
|
|
},
|
|
#rpc{
|
|
code = 31150
|
|
,log_title = "集卡数据"
|
|
,req_desc = "集卡数据"
|
|
,req = [
|
|
]
|
|
,reply_desc = "集卡数据"
|
|
,reply = [
|
|
{uint32, group, "组别"},
|
|
{array, single, ids, "已有的卡牌", [
|
|
{uint32, id, "id"}
|
|
]},
|
|
{array, tuple, reach_reward, "达成奖励数据", [
|
|
{uint32, id, "id"},
|
|
{uint32, status, "0-未完成, 1-可领取, 2-已领取"}
|
|
]},
|
|
{array, tuple, rewards, "连线奖励数据", [
|
|
{uint32, id, "id"},
|
|
{uint32, status, "0-未完成, 1-可领取, 2-已领取"}
|
|
]},
|
|
{uint32, draw_times, "抽取次数"}
|
|
]
|
|
},
|
|
#rpc{
|
|
code = 31151
|
|
,log_title = "抽卡"
|
|
,req_desc = "抽卡"
|
|
,req = [
|
|
{uint32, times, "次数"}
|
|
]
|
|
,reply_desc = "抽卡"
|
|
,reply = [
|
|
{uint8, code, "是否成功"},
|
|
{string, msg, "信息"},
|
|
{array, tuple, face_list, "卡牌数据", [
|
|
{uint32, id, "id"},
|
|
{uint32, num, "数量"},
|
|
{uint8, is_debris, "是否需要分解 0- 不需要, 1-需要"}
|
|
]},
|
|
{array, tuple, item_list, "物品数据", [
|
|
{uint32, item_id, "id"},
|
|
{uint32, num, "数量"}
|
|
]}
|
|
]
|
|
},
|
|
#rpc{
|
|
code = 31152
|
|
,log_title = "领取达成奖励"
|
|
,req_desc = "领取达成奖励"
|
|
,req = [
|
|
{uint32, id, "id"}
|
|
]
|
|
,reply_desc = "领取达成奖励"
|
|
,reply = [
|
|
{uint8, code, "是否成功"}
|
|
,{string, msg, "信息"}
|
|
]
|
|
},
|
|
#rpc{
|
|
code = 31153
|
|
,log_title = "领取连线奖励"
|
|
,req_desc = "领取连线奖励"
|
|
,req = [
|
|
{uint32, id, "id"}
|
|
]
|
|
,reply_desc = "领取连线奖励"
|
|
,reply = [
|
|
{uint8, code, "是否成功"}
|
|
,{string, msg, "信息"}
|
|
]
|
|
},
|
|
#rpc{
|
|
code = 31160
|
|
,log_title = "任务信息"
|
|
,req_desc = "任务信息"
|
|
,req = []
|
|
,reply = [
|
|
{uint32, period, "期数"},
|
|
{uint32, cur_day, "天数"}
|
|
,{uint32, end_time, "结束时间"}
|
|
,{array, tuple, list, "任务列表", [
|
|
{uint32, id, "ID"}
|
|
,{uint8, type, "任务类型"}
|
|
,{uint8, finish, "是否已完成(0:未完成 1:已完成 2:已提交)"}
|
|
,{uint32, target_val, "目标值"}
|
|
,{uint32, value, "当前值"}
|
|
,{uint32, end_time, "结束时间"}
|
|
]}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 31161
|
|
,log_title = "任务信息更新"
|
|
,req_desc = "任务信息更新"
|
|
,req = []
|
|
,reply = [
|
|
{array, tuple, list, "任务列表", [
|
|
{uint32, id, "ID"}
|
|
,{uint8, type, "任务类型"}
|
|
,{uint8, finish, "是否已完成(0:未完成 1:已完成 2:已提交)"}
|
|
,{uint32, target_val, "目标值"}
|
|
,{uint32, value, "当前值"}
|
|
,{uint32, end_time, "结束时间"}
|
|
]}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 31162
|
|
,log_title = "提交任务"
|
|
,req_desc = "提交任务"
|
|
,req = [
|
|
{uint32, id, "任务ID"}
|
|
]
|
|
,reply = [
|
|
{uint8, code, "结果状态"}
|
|
,{string, msg, "结果信息"}
|
|
]
|
|
}
|
|
].
|
|
|