493 lines
15 KiB
Erlang
493 lines
15 KiB
Erlang
%%%-------------------------------------------------------------------
|
||
%%% @author Administrator
|
||
%%% @copyright (C) 2023, <COMPANY>
|
||
%%% @doc
|
||
%%%
|
||
%%% @end
|
||
%%% Created : 15. 6月 2023 16:07
|
||
%%%-------------------------------------------------------------------
|
||
-module(proto_295).
|
||
-author("Administrator").
|
||
|
||
%%----------------------------------------------------
|
||
%% 冒险协议
|
||
|
||
%%----------------------------------------------------
|
||
-export([info/0, cfg/0]).
|
||
-include("protocol.hrl").
|
||
|
||
info() -> {
|
||
"冒险协议"
|
||
,["adventure_new.hrl", "partner.hrl", "attr.hrl", "star.hrl", "item.hrl", "combat.hrl"]
|
||
}.
|
||
|
||
-spec cfg() -> [#rpc{}].
|
||
cfg() ->
|
||
[
|
||
#rpc{
|
||
code = 29500
|
||
,log_title = "基本信息"
|
||
,req_desc = "基本信息"
|
||
,req = [
|
||
{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
,reply = [
|
||
{uint8, pass_id, "已通关层"}
|
||
,{uint8, pass_num, "本层通关房间数量"}
|
||
,{uint8, id, "当前层"}
|
||
,{array, tuple, room_id, "房间id", [
|
||
{uint16, x, "坐标"}
|
||
,{uint16, y, "坐标"}
|
||
]}
|
||
,{uint8, is_kill_boss, "本层boss是否已击杀(0:未 1:是 2:失败)"}
|
||
,{uint8, is_all_finish, "是否所有通关"}
|
||
,{uint32, start_time, "开始时间"}
|
||
,{uint32, end_time, "结束时间"}
|
||
,{array, tuple, maps_info, "地图长宽信息", [
|
||
{uint16, x, "x轴长度"}
|
||
,{uint16, y, "y轴长度"}
|
||
]}
|
||
,{uint32, energy, "体力"}
|
||
,{uint32, times, "剩余次数"}
|
||
,{uint32, explore, "探索度"}
|
||
,{uint32, partner_bid, "当前选择的英雄bid"}
|
||
,{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
}
|
||
,#rpc{
|
||
code = 29501
|
||
,log_title = "BUFF信息"
|
||
,req_desc = "BUFF信息"
|
||
,req = [
|
||
{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
,reply = [
|
||
{array, tuple, buff_list, "BUFF列表", [
|
||
{uint32, bid, "BUFFID"}
|
||
,{uint32, time, "数量"}
|
||
]}
|
||
,{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
}
|
||
,#rpc{
|
||
code = 29502
|
||
,log_title = "房间信息"
|
||
,req_desc = "房间信息"
|
||
,req = [
|
||
{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
,reply = [
|
||
{array, tuple, room_list, "房间列表", [
|
||
{array, tuple, room_id, "房间id", [
|
||
{uint16, x, "坐标"}
|
||
,{uint16, y, "坐标"}
|
||
]}
|
||
,{uint8, status, "状态(0:未开始 1:可探索 2:探索中 3:已完成)"}
|
||
,{uint8, lock, "锁定状态(0:未锁 1:加锁)"}
|
||
,{uint32, evt_id, "事件ID(0:未开始 >0:相关事件)"}
|
||
,{string, res_id, "格子资源ID"}
|
||
]}
|
||
,{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
}
|
||
,#rpc{
|
||
code = 29503
|
||
,log_title = "服务端通知更新指定房间信息"
|
||
,req_desc = "服务端通知更新指定房间信息"
|
||
,reply = [
|
||
{array, tuple, room_id, "房间id", [
|
||
{uint16, x, "坐标"}
|
||
,{uint16, y, "坐标"}
|
||
]}
|
||
,{uint8, status, "状态(0:未开始 1:可探索 2:探索中 3:已完成)"}
|
||
,{uint8, lock, "锁定状态(0:未锁 1:加锁)"}
|
||
,{uint32, evt_id, "事件ID(0:未开始 >0:相关事件)"}
|
||
,{string, res_id, "格子资源ID"}
|
||
,{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
}
|
||
,#rpc{
|
||
code = 29504
|
||
,log_title = "获取当前伙伴信息数据"
|
||
,req_desc = "获取当前伙伴信息数据"
|
||
,req = [
|
||
{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
,reply = [
|
||
{uint32, id, "使用伙伴"}
|
||
,{uint32, combat_num, "连续战斗场次"}
|
||
,{array, tuple, partners, "伙伴列表数据", [
|
||
{tuple, info1, [
|
||
{uint32, now_hp, "当前血量"}
|
||
,{tuple, info1, ?p_g_get(partner_info)}
|
||
]}
|
||
]}
|
||
,{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
}
|
||
,#rpc{
|
||
code = 29505
|
||
,log_title = "设置上阵伙伴信息"
|
||
,req_desc = "设置上阵伙伴信息"
|
||
,req = [
|
||
{array, single, plist, "伙伴列表数据", [
|
||
{uint32, id, "伙伴ID"}
|
||
]}
|
||
,{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
,reply = [
|
||
{uint8, code, "结果状态(0:失败 1:成功)"}
|
||
,{string, msg, "结果信息"}
|
||
,{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
}
|
||
,#rpc{
|
||
code = 29506
|
||
,log_title = "背包内容"
|
||
,req_desc = "背包内容"
|
||
,req = [
|
||
{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
,reply = [
|
||
{array, tuple, items_list, "道具信息", [
|
||
{uint32, bid, "道具ID"}
|
||
,{uint32, num, "道具数量"}
|
||
,{uint32, can_use, "是否可以直接使用 0-否, 1-是"}
|
||
]}
|
||
,{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
}
|
||
,#rpc{
|
||
code = 29507
|
||
,log_title = "道具使用"
|
||
,req_desc = "道具使用"
|
||
,req = [
|
||
{uint32, item_id, "道具ID"}
|
||
,{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
,reply = [
|
||
{uint8, code, "结果状态(0:失败 1:成功)"}
|
||
,{string, msg, "结果信息"}
|
||
,{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
}
|
||
,#rpc{
|
||
code = 29508
|
||
,log_title = "探索指定房间"
|
||
,req_desc = "探索指定房间"
|
||
,req = [
|
||
{array, tuple, room_ids, "路径信息", [
|
||
{uint16, x, "坐标"}
|
||
,{uint16, y, "坐标"}
|
||
]}
|
||
,{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
,reply = [
|
||
{uint8, code, "结果状态(0:失败 1:成功)"}
|
||
,{string, msg, "结果信息"}
|
||
,{array, tuple, footpoint, "路径信息", [
|
||
{uint16, x, "坐标"}
|
||
,{uint16, y, "坐标"}
|
||
]}
|
||
,{uint8, is_trap, "是否遇到陷阱,0-未遇到, 1-遇到"}
|
||
,{uint8, is_poison, "血量是否发生变化,0-否, 1-是"}
|
||
,{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
|
||
]
|
||
}
|
||
|
||
,#rpc{
|
||
code = 29509
|
||
,log_title = "获取随机伙伴信息"
|
||
,req_desc = "获取随机伙伴信息"
|
||
,req = [
|
||
{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
,reply = [
|
||
{uint8, code, "结果状态(0:失败 1:成功)"}
|
||
,{string, msg, "结果信息"}
|
||
,{array, single, plist, "伙伴列表数据", [
|
||
{uint32, bid, "伙伴BID"}
|
||
]}
|
||
,{array, single, camp_list, "加成阵营列表数据", [
|
||
{uint32, camp_id, "阵营ID"}
|
||
]}
|
||
,{array, single, partner_up_list, "加成伙伴列表数据", [
|
||
{uint32, bid, "伙伴BID"}
|
||
]}
|
||
,{uint32, times, "剩余随机次数"}
|
||
,{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
}
|
||
|
||
,#rpc{
|
||
code = 29510
|
||
,log_title = "选择伙伴"
|
||
,req_desc = "选择伙伴"
|
||
,req = [
|
||
{uint32, id, "伙伴ID"}
|
||
,{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
,reply = [
|
||
{uint8, code, "结果状态(0:失败 1:成功)"}
|
||
,{string, msg, "结果信息"}
|
||
,{uint32, id, "伙伴ID"}
|
||
,{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
}
|
||
|
||
,#rpc{
|
||
code = 29511
|
||
,log_title = "请求单位房间列表"
|
||
,req_desc = "请求单位房间列表"
|
||
,req = []
|
||
,reply = [
|
||
{array, tuple, room_list, "房间列表", [
|
||
{uint8, id, "ID(1-n)"}
|
||
,{uint32, evt_id, "事件ID(0:未开始 >0:相关事件)"}
|
||
]}
|
||
,{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
}
|
||
,#rpc{
|
||
code = 29512
|
||
,log_title = "冒险结束"
|
||
,req = [
|
||
]
|
||
,reply_desc = "冒险结束"
|
||
,reply = [
|
||
{uint8, code, "结果状态(0:失败 1:成功)"}
|
||
,{string, msg, "结果信息"}
|
||
]
|
||
}
|
||
|
||
,#rpc{
|
||
code = 29513
|
||
,log_title = "购买体力"
|
||
,req = [
|
||
]
|
||
,reply_desc = "购买体力"
|
||
,reply = [
|
||
{uint8, code, "结果状态(0:失败 1:成功)"}
|
||
,{string, msg, "结果信息"}
|
||
,{uint32, energy, "体力"}
|
||
]
|
||
}
|
||
|
||
,#rpc{
|
||
code = 29520
|
||
,log_title = "事件操作"
|
||
,req_desc = "事件操作"
|
||
,req = [
|
||
{array, tuple, room_id, "房间id", [
|
||
{uint16, x, "坐标"}
|
||
,{uint16, y, "坐标"}
|
||
]}
|
||
,{uint8, action, "操作类型(0:请求数据 1:确认操作处理 2:刷新操作)"}
|
||
,{array, tuple, ext_list, "额外参数(没有则不传,按约定传值)", [
|
||
{uint8, type, "参数类型{1:Pid, 2:是否跳过战斗, 3:是否连续战斗, 4:是否自动收取}"}
|
||
,{uint32, val, "值"}
|
||
]}
|
||
,{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
,reply = [
|
||
{uint8, code, "结果状态(0:失败 1:成功 2:事件通关)"}
|
||
,{string, msg, "结果信息"}
|
||
,{array, tuple, room_id, "房间id", [
|
||
{uint16, x, "坐标"}
|
||
,{uint16, y, "坐标"}
|
||
]}
|
||
,{uint8, action, "操作类型(0:请求数据 1:确认操作处理 2:刷新操作)"}
|
||
,{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
}
|
||
|
||
,#rpc{
|
||
code = 29524
|
||
,log_title = "怪物信息"
|
||
,reply_desc = "怪物信息"
|
||
,reply = [
|
||
{uint32, guards_power, "敌方战力"}
|
||
,{uint32, formation_type, "敌方阵型"}
|
||
,{array, tuple, guards, "战将信息", [
|
||
{uint32, partner_id, "英雄唯一id"}
|
||
,{uint8, pos, "位置"}
|
||
,{uint32, bid, "BID"}
|
||
,{uint16, lev, "等级"}
|
||
,{uint8, star, "星数"}
|
||
,{uint8, hp_per, "剩余血量百分比"}
|
||
]}
|
||
,{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
}
|
||
,#rpc{
|
||
code = 29525
|
||
,log_title = "获得技能"
|
||
,reply_desc = "获得技能"
|
||
,reply = [
|
||
{uint8, id, "ID(1-n)"}
|
||
,{uint32, skill_id, "获得技能"}
|
||
]
|
||
}
|
||
,#rpc{
|
||
code = 29527
|
||
,log_title = "NPC奖励选项"
|
||
,reply_desc = "NPC奖励选项"
|
||
,reply = [
|
||
{uint32, evt_id, "事件ID"}
|
||
,{array, single, npc_ids, "npc选择事件id列表", [
|
||
{uint32, id, "道具id"}
|
||
]}
|
||
,{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
}
|
||
,#rpc{
|
||
code = 29528
|
||
,log_title = "改造台信息"
|
||
,reply_desc = "改造台信息"
|
||
,reply = [
|
||
{array, single, foster_ids, "改造台id列表", [
|
||
{uint32, id, "改造台id"}
|
||
]}
|
||
,{array, single, chip_id, "芯片id列表", [
|
||
{uint32, id, "芯片id"}
|
||
]}
|
||
,{array, single, module_id, "模组id列表", [
|
||
{uint32, id, "模组id"}
|
||
]}
|
||
,{uint8, chip_num, "可以安装的芯片数量"}
|
||
,{uint8, module_num, "可以安装的芯片数量"}
|
||
,{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
}
|
||
,#rpc{
|
||
code = 29530
|
||
,log_title = "宝箱打开结果"
|
||
,reply_desc = "宝箱打开结果"
|
||
,reply = [
|
||
{array, tuple, items, "奖励结果", [
|
||
{uint32, bid, "道具ID"}
|
||
,{uint32, num, "值"}
|
||
,{uint8, move_to, "图标漂向(0:不漂 1:冒险背包 2:角色)"}
|
||
]}
|
||
]
|
||
}
|
||
,#rpc{
|
||
code = 29531
|
||
,log_title = "神秘商人"
|
||
,reply_desc = "神秘商人"
|
||
,reply = [
|
||
{uint8, shop_type, "类型(1:房间商店 2:技能商店)"}
|
||
,{array, new_map, list, "商品列表", [
|
||
{uint32, id, "排列位置"}
|
||
,{uint32, exec_id, "商品ID"}
|
||
,{uint32, pay_type, "支付类型"}
|
||
,{uint32, pay_val, "支付值"}
|
||
,{uint32, bid, "道具ID"}
|
||
,{uint32, num, "数量"}
|
||
,{uint8, is_buy, "是否已购买(0:不 1:是)"}
|
||
,{uint8, discount, "折扣(0不存在)"}
|
||
]}
|
||
,{uint8, times, "剩余购买次数"}
|
||
,{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
}
|
||
|
||
|
||
,#rpc{
|
||
code = 29534
|
||
,log_title = "奖励展示"
|
||
,req_desc = "奖励展示"
|
||
,req = [
|
||
{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
,reply = [
|
||
{array, tuple, list, "奖励列表", [
|
||
{uint32, id, "奖励ID"}
|
||
,{uint8, status, "1:达成可领 2:已领取"}
|
||
]}
|
||
,{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
}
|
||
,#rpc{
|
||
code = 29535
|
||
,log_title = "领取通关奖励"
|
||
,req_desc = "领取通关奖励"
|
||
,req = [
|
||
{uint32, id, "序号"}
|
||
,{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
,reply = [
|
||
{uint8, code, "结果状态(0:失败 1:成功)"}
|
||
,{string, msg, "结果信息"}
|
||
,{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
}
|
||
|
||
,#rpc{
|
||
code = 29541
|
||
,log_title = "陷阱或者祝福推送"
|
||
,reply_desc = "陷阱或者祝福推送"
|
||
,reply = [
|
||
{uint8, cate, "陷阱或者祝福(0:陷阱 1:祝福)"}
|
||
,{uint32, evt_id, "事件id(buff_id)"}
|
||
,{uint8, is_battle, "是否有战斗0-没有, 1-有"}
|
||
,{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
},
|
||
#rpc{
|
||
code = 29542
|
||
,log_title = "状态基本信息"
|
||
,req_desc = "状态基本信息"
|
||
,req = [
|
||
{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
,reply = [
|
||
{uint8, no_trap_num, "抵御陷阱次数"}
|
||
,{uint8, no_battle_num, "抵御陷阱战斗"}
|
||
,{uint8, no_bless_num, "抵御祝福"}
|
||
,{uint8, poison_info, "中毒信息"}
|
||
,{uint8, icon_drop_per_up, "金币掉落增加"}
|
||
,{uint8, icon_drop_per_down, "金币掉落减少"}
|
||
,{uint8, battle_hp, "每次战斗后回复生命值"}
|
||
,{uint8, break_block, "清除巨石加金币"}
|
||
,{uint8, add_buy_amount, "增加商店购买次数"}
|
||
,{uint8, step_energy_up, "行动力消耗增加"}
|
||
,{uint8, step_energy_down, "行动力消耗减少"}
|
||
,{uint8, shop_prize_up, "商店价格增加"}
|
||
,{uint8, shop_prize_down, "商店价格减少"}
|
||
,{uint8, reduce_npc1_option, "npc1选项减少"}
|
||
,{uint8, reduce_shop_blank, "商店选项减少"}
|
||
,{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
}
|
||
,#rpc{
|
||
code = 29543
|
||
,log_title = "log信息"
|
||
,req_desc = "log信息"
|
||
,req = [
|
||
{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
,reply = [
|
||
{array, single, log_info, "log信息", [
|
||
{uint32, item_id, "道具ID"}
|
||
]}
|
||
,{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
}
|
||
|
||
,#rpc{
|
||
code = 29544
|
||
,log_title = "结束信息"
|
||
,req_desc = "结束信息"
|
||
,req = [
|
||
{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
,reply = [
|
||
{uint32, game_over, "此次游戏结束"}
|
||
,{uint8, type, "1-无尽模式, 2-周回模式"}
|
||
]
|
||
}
|
||
].
|
||
|