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

728 lines
26 KiB
Erlang
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
%%----------------------------------------------------
%% 冒险协议
%%
%% @author whjing2011@gmail.com
%%----------------------------------------------------
-module(proto_206).
-export([info/0, cfg/0]).
-include("protocol.hrl").
info() -> {
"冒险协议"
,["adventure.hrl", "partner.hrl", "attr.hrl", "star.hrl", "item.hrl", "adventure_mine.hrl", "combat.hrl"]
}.
-spec cfg() -> [#rpc{}].
cfg() ->
[
#rpc{
code = 20600
,log_title = "基本信息"
,req_desc = "基本信息"
,req = []
,reply = [
{uint8, pass_id, "已通关层"}
,{uint8, pass_num, "本层通关房间数量"}
,{uint8, id, "当前层"}
,{uint8, room, "当前房间"}
,{uint8, is_kill_boss, "本层boss是否已击杀(0:未 1:是 2:失败)"}
,{uint8, map_id, "地图序号"}
,{uint8, is_all_finish, "是否所有通关"}
,{uint32, start_time, "开始时间"}
,{uint32, end_time, "结束时间"}
,{uint8, current_id, "目前所在层"}
]
}
,#rpc{
code = 20601
,log_title = "BUFF信息"
,req_desc = "BUFF信息"
,req = []
,reply = [
{array, tuple, buff_list, "BUFF列表", [
{uint32, bid, "BUFFID"}
,{uint32, time, "数量"}
]}
,{array, tuple, holiday_buff_list, "活动BUFF列表", [
{uint32, bid, "BUFFID"}
,{uint32, time, "数量"}
]}
]
}
,#rpc{
code = 20602
,log_title = "房间信息"
,req_desc = "房间信息"
,req = []
,reply = [
{array, tuple, room_list, "房间列表", [
{uint8, id, "ID(1-n)"}
,{uint8, status, "状态(0:未开始 1:可探索 2:探索中 3:已完成)"}
,{uint8, lock, "锁定状态(0:未锁 1:加锁)"}
,{uint32, evt_id, "事件ID(0:未开始 >0:相关事件)"}
,{uint8, res_id, "格子资源ID"}
]}
]
}
,#rpc{
code = 20603
,log_title = "服务端通知更新指定房间信息"
,req_desc = "服务端通知更新指定房间信息"
,reply = [
{array, tuple, room_list, "房间列表", [
{uint8, id, "ID(1-n)"}
,{uint8, status, "状态(0:未开始 1:可探索 2:探索中 3:已完成)"}
,{uint8, lock, "锁定状态(0:未锁 1:加锁)"}
,{uint32, evt_id, "事件ID(0:未开始 >0:相关事件)"}
,{uint8, res_id, "格子资源ID"}
]}
]
}
,#rpc{
code = 20604
,log_title = "获取当前伙伴信息数据"
,req_desc = "获取当前伙伴信息数据"
,req = []
,reply = [
{uint32, id, "使用伙伴"}
,{uint32, combat_num, "连续战斗场次"}
,{array, tuple, partners, "伙伴列表数据", [
{tuple, info1, [
{uint32, now_hp, "当前血量"}
,{tuple, info1, ?p_g_get(partner_info)}
]}
]}
]
}
,#rpc{
code = 20605
,log_title = "设置上阵伙伴信息"
,req_desc = "设置上阵伙伴信息"
,req = [
{array, single, plist, "伙伴列表数据", [
{uint32, id, "伙伴ID"}
]}
]
,reply = [
{uint8, code, "结果状态(0:失败 1:成功)"}
,{string, msg, "结果信息"}
,{uint16, last_num, "上一轮通关数"}
]
}
,#rpc{
code = 20606
,log_title = "背包内容"
,req_desc = "背包内容"
,req = []
,reply = [
{array, tuple, items_list, "道具信息", [
{uint32, bid, "道具ID"}
,{uint32, num, "道具数量"}
]}
,{uint32, vip_buff, "vip加成千分比"}
]
}
,#rpc{
code = 20607
,log_title = "技能使用"
,req_desc = "技能使用"
,req = [
{uint32, skill_id, "技能ID"}
,{uint32, val, "附加值(伙伴ID/房间ID)"}
]
,reply = [
{uint8, code, "结果状态(0:失败 1:成功)"}
,{string, msg, "结果信息"}
]
}
,#rpc{
code = 20608
,log_title = "探索指定房间"
,req_desc = "探索指定房间"
,req = [
{uint8, room_id, "房间号"}
]
,reply = [
{uint8, code, "结果状态(0:失败 1:成功)"}
,{string, msg, "结果信息"}
,{uint8, room_id, "房间号"}
]
}
,#rpc{
code = 20609
,log_title = "技能信息"
,req_desc = "技能信息"
,req = []
,reply = [
{array, tuple, skill_list, "技能列表", [
{uint32, bid, "技能ID"}
,{uint32, num, "数量"}
,{uint32, use_count, "本轮已使用次数"}
]}
]
}
,#rpc{
code = 20610
,log_title = "选择伙伴"
,req_desc = "选择伙伴"
,req = [
{uint32, id, "伙伴ID"}
]
,reply = [
{uint8, code, "结果状态(0:失败 1:成功)"}
,{string, msg, "结果信息"}
,{uint32, id, "伙伴ID"}
]
}
,#rpc{
code = 20611
,log_title = "请求单位房间列表"
,req_desc = "请求单位房间列表"
,req = []
,reply = [
{array, tuple, room_list, "房间列表", [
{uint8, id, "ID(1-n)"}
,{uint32, evt_id, "事件ID(0:未开始 >0:相关事件)"}
]}
]
}
,#rpc{
code = 20612
,log_title = "冒险重置"
,reply_desc = "冒险重置"
,reply = []
}
,#rpc{
code = 20620
,log_title = "事件操作"
,req_desc = "事件操作"
,req = [
{uint8, room_id, "房间号"}
,{uint8, action, "操作类型(0:请求数据 1:确认操作处理 2:刷新操作)"}
,{array, tuple, ext_list, "额外参数(没有则不传,按约定传值)", [
{uint8, type, "参数类型{1:Pid, 2:是否跳过战斗, 3:是否连续战斗, 4:是否自动收取}"}
,{uint32, val, ""}
]}
]
,reply = [
{uint8, code, "结果状态(0:失败 1:成功 2:事件通关)"}
,{string, msg, "结果信息"}
,{uint8, room_id, "房间号"}
,{uint8, action, "操作类型(0:请求数据 1:确认操作处理 2:刷新操作)"}
]
}
,#rpc{
code = 20621
,log_title = "猜拳结果反馈"
,reply_desc = "猜拳结果反馈"
,reply = [
{uint8, sel_val, "选择值(1:拳 2:剪 3:掌"}
,{uint8, ret_val, "结果值(1:拳 2:剪 3:掌"}
,{uint8, ret, "结果(0:平 1:胜 2:败"}
,{array, tuple, items, "奖励结果", [
{uint32, bid, "道具ID"}
,{uint32, num, ""}
,{uint8, move_to, "图标漂向(0:不漂 1:冒险背包 2:角色)"}
]}
]
}
,#rpc{
code = 20623
,log_title = "答题信息"
,reply_desc = "答题信息"
,reply = [
{uint8, ret, "上题结果(0:开始发题 1:对 2:错)"}
,{uint8, sel_val, "选择答案(1-4)"}
,{uint8, right, "正确答案(1-4)"}
,{uint8, num, "第几题"}
,{uint8, max, "总共几题"}
,{uint32, bid, "题目ID(0:没有下一题 答题结束)"}
,{string, ret_msg, "提示语"}
,{array, tuple, now_items, "本题预告奖励", [
{uint32, bid, "道具ID"}
,{uint32, num, ""}
]}
,{array, tuple, max_items, "总奖励", [
{uint32, bid, "道具ID"}
,{uint32, num, ""}
]}
,{array, tuple, ret_items, "结果奖励", [
{uint32, bid, "道具ID"}
,{uint32, num, ""}
,{uint8, move_to, "图标漂向(0:不漂 1:冒险背包 2:角色)"}
]}
]
}
,#rpc{
code = 20624
,log_title = "怪物信息"
,reply_desc = "怪物信息"
,reply = [
{uint8, hp_per, "血量百分比"}
]
}
,#rpc{
code = 20625
,log_title = "获得技能"
,reply_desc = "获得技能"
,reply = [
{uint8, id, "ID(1-n)"}
,{uint32, skill_id, "获得技能"}
]
}
,#rpc{
code = 20627
,log_title = "NPC对话序号"
,reply_desc = "NPC对话序号"
,reply = [
{uint32, evt_id, "事件ID"}
,{uint8, id, "对话序号"}
]
}
,#rpc{
code = 20628
,log_title = "NPC对话结果"
,reply_desc = "NPC对话结果"
,reply = [
{string, msg, "提示语"}
,{array, tuple, items, "奖励结果", [
{uint32, bid, "道具ID"}
,{uint32, num, ""}
,{uint8, move_to, "图标漂向(0:不漂 1:冒险背包 2:角色)"}
]}
]
}
,#rpc{
code = 20630
,log_title = "宝箱打开结果"
,reply_desc = "宝箱打开结果"
,reply = [
{array, tuple, items, "奖励结果", [
{uint32, bid, "道具ID"}
,{uint32, num, ""}
,{uint8, move_to, "图标漂向(0:不漂 1:冒险背包 2:角色)"}
]}
]
}
,#rpc{
code = 20631
,log_title = "神秘商人"
,reply_desc = "神秘商人"
,reply = [
{uint8, type, "类型(1:房间商店 2:技能商店)"}
,{array, new_map, list, "商品列表", [
{uint32, id, "商品ID"}
,{uint8, pay_type, "支付类型"}
,{uint32, pay_val, "支付值"}
,{uint32, bid, "道具ID"}
,{uint32, num, "数量"}
,{uint8, is_buy, "是否已购买(0:不 1:是)"}
,{uint8, discount, "折扣(0不存在)"}
]}
]
}
,#rpc{
code = 20632
,log_title = "神秘商人总店"
,reply_desc = "神秘商人总店"
,req = []
,reply = [
{array, new_map, list, "商品列表", [
{uint32, id, "商品ID"}
,{uint8, pay_type, "支付类型"}
,{uint32, pay_val, "支付值"}
,{uint32, bid, "道具ID"}
,{uint32, num, "数量"}
,{uint8, is_buy, "是否已购买(0:不 1:是)"}
,{uint8, discount, "折扣(0不存在)"}
]}
]
}
,#rpc{
code = 20633
,log_title = "购买神秘商品"
,req_desc = "购买神秘商品"
,req = [
{uint32, id, "商品ID"}
]
,reply = [
{uint8, code, "结果状态(0:失败 1:成功 2:事件通关)"}
,{string, msg, "结果信息"}
,{uint8, id, "商品ID"}
]
}
,#rpc{
code = 20634
,log_title = "奖励展示"
,req_desc = "奖励展示"
,req = []
,reply = [
{array, tuple, list, "商品列表", [
{uint32, id, "宝箱ID"}
,{uint8, status, "0:未达成 1:达成可领"}
]}
,{uint32, kill_mon, "当前已击杀守卫"}
]
}
,#rpc{
code = 20635
,log_title = "领取通关奖励"
,req_desc = "领取通关奖励"
,req = [
{uint32, id, "序号"}
]
,reply = [
{uint8, code, "结果状态(0:失败 1:成功)"}
,{string, msg, "结果信息"}
]
}
,#rpc{
code = 20636
,log_title = "购买驱魂药剂"
,req_desc = "购买驱魂药剂"
,req = [
{uint8, num, "购买数量"}
]
,reply = [
{uint8, code, "结果状态(0:失败 1:成功)"}
,{string, msg, "结果信息"}
]
}
,#rpc{
code = 20640
,log_title = "矿脉基础协议"
,req_desc = "矿脉基础协议"
,req = [
{uint8, floor, "层数"}
,{uint8, is_notice, "是否飘字"}
]
,reply = [
{uint8, floor, "层数"}
,{uint8, count, "剩余挑战次数"}
,{uint8, occupy_count, "当前占领的数量"}
,{array, tuple, list, "矿脉信息", [
{rec, adventure_mine_hole, adventure_mine_hole, [
{uint8, room_id, "位置"}
,{tuple, role_id, [
{uint32, rid, "角色ID"}
,{string, srv_id, "服务器ID"}
]}
,{uint16, lev, "角色等级"}
,{string, name, "角色名"}
,{uint32, mine_id, "矿类型"}
,{uint32, face, "头像"}
]}
,{uint8, status, "状态 0正常 1战斗中 2保护期"}
]}
,{uint8, buy_count, "已购买次数"}
]
}
,#rpc{
code = 20641
,log_title = "矿脉信息"
,req_desc = "矿脉信息"
,req = [
{uint8, floor, "层数"}
,{uint8, room_id, "位置"}
]
,reply_desc = "矿脉信息"
,reply = [
{uint8, room_id, "位置"}
,{uint32, mine_id, "矿类型"}
,{uint32, rid, "角色ID"}
,{string, srv_id, "服务器ID"}
,{string, name, "角色名"}
,{uint16, lev, "等级"}
,{uint32, face, "头像"}
,{uint32, power, "战力"}
,{uint8, plunder_count, "剩余可掠夺次数"}
,{uint32, occupy_time, "占领的时间戳"}
,{array, tuple, defense, "防守阵容", [
{uint8, pos, "位置"}
,{uint32, id, "伙伴唯一id"}
,{uint32, bid, "英雄bid"}
,{uint16, lev, "等级"}
,{uint8, star, "星数"}
,{uint32, use_skin, "皮肤id"}
]}
,{array, tuple, items, "可获得奖励", [
{uint32, item_id, "物品ID"}
,{uint32, num, "数量"}
]}
,{uint8, id, "阵法id"}
,{uint32, hallows_id, "使用的圣器id(没有传0)"}
]
}
,#rpc{
code = 20642
,log_title = "当前防守中的英雄ID"
,req = []
,reply_desc = "当前防守中的英雄ID"
,reply = [
{array, single, defense, "英雄ID", [
{uint32, id, "防守中的英雄ID"}
]}
]
}
,#rpc{
code = 20643
,log_title = "挑战矿脉"
,req_desc = "挑战矿脉"
,req = [
{uint8, floor, "层数"}
,{uint8, room_id, "位置"}
,{uint8, is_skip, "是否跳过战斗"}
]
,reply = [
{uint8, code, "是否成功"}
,{string, msg, "附加信息"}
]
}
,#rpc{
code = 20644
,log_title = "日志记录"
,req_desc = "日志记录"
,req = []
,reply = [
{array, adventure_mine_log, log_list, "日志列表", [
{tuple, rid, [
{uint32, rid, "角色ID"}
,{string, srv_id, "角色服务器"}
]}
,{string, name, "名称"}
,{uint16, lev, "等级"}
,{uint32, face, "头像"}
,{uint32, power, "战力"}
,{uint8, floor, "层数"}
,{uint8, room_id, "位置"}
,{uint32, mine_id, "矿类型"}
,{uint8, ret, "结果(1:防守成功 2:被掠夺 3:被占领)"}
,{uint32, replay_id, "录像"}
,{uint32, time, "时间"}
,{array, tuple, loss, "失去物品", [
{uint32, item_id, "物品ID"}
,{uint32, num, "数量"}
]}
]}
]
}
,#rpc{
code = 20646
,log_title = "改变布阵"
,req_desc = "改变布阵"
,req = [
{uint8, floor, "层数"}
,{uint8, room_id, "位置"}
,{uint8, id, "阵法id"}
,{array, tuple, pos_info, "站位", [
{uint8, pos, "阵位"}
,{uint32, id, "伙伴id"}
]}
,{uint32, hallows_id, "使用的圣器id(没有传0)"}
]
,reply = [
{uint8, flag, "是否成功"}
,{string, msg, "提示语"}
]
}
,#rpc{
code = 20647
,log_title = "矿战挑战次数奖励"
,req_desc = "矿战挑战次数奖励"
,req = [
]
,reply = [
{uint16, had_combat_num, "已挑战次数"}
,{array, single, num_list, "已领取次数奖励", [
{uint8, num, "次数"}
]}
,{uint8, count, "剩余挑战次数"}
]
}
,#rpc{
code = 20648
,log_title = "领取矿战挑战次数奖励"
,req_desc = "领取矿战挑战次数奖励"
,req = [
{uint8, num, "次数"}
]
,reply = [
{uint8, code, "标志(0:失败 1:成功)"}
,{string, msg, "提示信息"}
,{uint8, num, "次数"}
]
}
,#rpc{
code = 20649
,log_title = "推送矿战结算协议"
,reply_desc = "推送矿战结算协议"
,reply = [
{uint8, result, "1:胜利 2 失败"}
,{uint8, floor, "层数"}
,{uint8, room_id, "位置"}
,{uint32, count, "剩余挑战次数"}
,{array, tuple, award, "奖励", [
{uint32, item_id, "物品id"}
,{uint32, num, "数量"}
]}
,{string, target_role_name, "对方名字"}
,{array, tuple, hurt_statistics, "伤害统计", [
{uint8, type, "1:进攻方 2:被攻击方"}
,{array, partner_hurt, partner_hurts, "伤害统计", [
{tuple, master_id, [
{uint32, rid, "拥有者ID"}
,{string, srvid, "拥有者服务器id"}
]}
,{uint32, id, id, "英雄bid"}
,{uint32, bid, bid, "英雄bid"}
,{uint32, star, star, "星级"}
,{uint32, lev, lev, "等级"}
,{uint32, camp_type, camp_type, "英雄阵营"}
,{uint32, dps, dps, "英雄伤害"}
,{uint32, cure, cure, "英雄治疗量"}
,{array, tuple, ext_data, "额外参数", [
{uint32, key, "键(5:皮肤id"}
,{uint32, val, ""}
]}
,{uint32, be_hurt, be_hurt, "英雄承受伤害"}
]}
]}
,{uint32, end_time, "结束倒计时时间"}
]
}
,#rpc{
code = 20651
,log_title = "放弃占领"
,req_desc = "放弃占领"
,req = [
{uint8, floor, "层数"}
,{uint8, room_id, "位置"}
]
,reply = [
{uint8, code, "标志(0:失败 1:成功)"}
,{string, msg, "提示信息"}
]
}
,#rpc{
code = 20652
,log_title = "请求我的矿脉的数据"
,req = [
]
,reply_desc = "请求我的矿脉的数据"
,reply = [
{array, tuple, mine_list, "我的矿脉数据", [
{uint8, floor, "层数"}
,{uint8, room_id, "位置"}
,{uint32, mine_id, "矿类型"}
,{uint32, occupy_time, "占领时间"}
,{uint8, primary_count, "初级旷工已雇佣次数"}
,{uint8, senior_count, "高级旷工已雇佣次数"}
,{array, tuple, hook_items, "累计的物品", [
{uint32, item_id, "物品ID"}
,{uint32, num, "数量"}
]}
]}
]
}
,#rpc{
code = 20653
,log_title = "有矿脉的层"
,req = []
,reply_desc = "有矿脉的层"
,reply = [
{array, single, floor_list, "哪层有矿脉", [
{uint8, floor, "层数"}
]}
]
}
,#rpc{
code = 20654
,log_title = "购买旷工"
,req_desc = "购买旷工"
,req = [
{uint8, floor, "层数"}
,{uint8, room_id, "位置"}
,{uint8, type, "旷工类型, 1:初级 2:高级"}
]
,reply = [
{uint8, code, "标志(0:失败 1:成功)"}
,{string, msg, "提示信息"}
,{uint8, floor, "层数"}
,{uint8, room_id, "位置"}
,{uint8, type, "旷工类型, 1:初级 2:高级"}
]
}
,#rpc{
code = 20655
,log_title = "购买次数"
,req_desc = "购买次数"
,req = [
]
,reply = [
{uint8, code, "标志(0:失败 1:成功)"}
,{string, msg, "提示信息"}
,{uint8, count, "剩余挑战次数"}
,{uint8, buy_count, "已购买次数"}
]
}
,#rpc{
code = 20656
,log_title = "反击"
,req_desc = "反击"
,req = [
{uint32, rid, "角色ID"}
,{string, srvid, "服务器id"}
]
,reply = [
{uint8, floor, "层数"}
,{uint8, room_id, "位置"}
]
}
,#rpc{
code = 20657
,log_title = "红点情况"
,req_desc = "红点情况"
,req = [
]
,reply = [
{uint8, code, "日志标志(0:关闭 1:开启)"}
]
}
,#rpc{
code = 20658
,log_title = "当前使用中的圣器ID"
,req = []
,reply_desc = "当前使用中的圣器ID"
,reply = [
{array, tuple, list, "圣器ID", [
{uint8, floor, "层数"}
,{uint8, room_id, "位置"}
,{uint32, hallows_id, "圣器ID"}
]}
]
}
,#rpc{
code = 20659
,log_title = "矿战红点情况"
,req_desc = "矿战红点情况"
,req = [
]
,reply = [
{uint8, code, "是否今日首次点开(0:关闭 1:开启)"}
]
}
,#rpc{
code = 20660
,log_title = "战斗结束时放弃占领"
,req_desc = "战斗结束时放弃占领"
,req = [
{uint8, floor, "层数"}
,{uint8, room_id, "位置"}
]
,reply = [
{uint8, code, "标志(0:失败 1:成功)"}
,{string, msg, "提示信息"}
]
}
].