%%%------------------------------------------------------------------- %%% @author lfl 240039421@qq.com %%% @copyright (C) 2019,11.18 lfl %%% @doc %%% 巅峰冠军赛协议文件 %%% @end %%%------------------------------------------------------------------- -module(proto_277). -export([ info/0 ,cfg/0 ] ). -include("protocol.hrl"). info() -> { "竞技场协议" ,["arena_peak_champion.hrl", "attr.hrl", "formation.hrl", "arena_champion.hrl", "combat.hrl"] }. cfg() -> [ #rpc{ code = 27700 ,log_title = "赛程整体实时状态信息" ,req_desc = "赛程整体实时状态信息" ,req = [] ,reply = [ {uint32, start_time, "赛季开始时间(unixtime)"} ,{uint32, end_time, "赛季结束时间(unixtime)"} ,{uint32, step, "赛程阶段(0:未,1:积分赛,256:晋级赛 64:64强,8:8强)"} ,{uint8, step_status, "阶段状态(0:未到时间 1:进行中 2:结束)"} ,{uint32, step_status_time, "阶段距离开始/结束时间(unixtime)"} ,{uint8, round, "回合"} ,{uint8, round_status, "回合状态(1:准备 2:竞猜 3:对战)"} ,{uint32, round_status_time, "回合状态时间(unixtime)"} ,{uint8, flag, "是否更新当前UI信息(0:不需要 1:需要 2:更新UI并请求观看录像 3:弹参与框 4:赛区主服未开启)"} ,{uint32, period, "赛季周期"} ,{uint32, zone_id, "所在战区"} ,{uint32, max_zone_id, "最大战区id"} ] } ,#rpc{ code = 27701 ,log_title = "个人基本信息" ,req_desc = "个人基本信息" ,req = [] ,reply = [ {uint16, rank, "当前排名(0:表示没有参赛资格)"} ,{uint16, best_rank, "历史最佳排名"} ,{uint32, can_bet, "可下注"} ,{uint8, group_256, "晋级赛强分组"} ,{uint8, group_64, "冠军赛分组"} ] } ,#rpc{ code = 27702 ,log_title = "我的比赛信息" ,req_desc = "我的比赛信息" ,req = [] ,reply = {peak_champion_pk, ?p_g_set(peak_champion_pk, [ {uint32, step, "赛程阶段(0:未,1:积分赛,256:晋级赛 64:64强,8:8强)"} ,{uint8, round, "回合"} ,{uint8, group, "组号"} ,{uint32, a_bet, "A方投注值"} ,{tuple, a_id, [ {uint32, a_rid, "A角色ID"} ,{string, a_srv_id, "A服务器ID"} ]} ,{string, a_name, "A名称"} ,{uint16, a_lev, "A等级"} ,{uint32, a_face, "A头像"} ,{uint32, a_face_update_time, "自定义头像时间"} ,{string, a_face_file, "自定义头像"} ,{uint32, a_avatar_id, "A头像框"} ,{uint8, a_sex, "A性别"} ,{uint32, a_power, "A方总战力"} ,{array, arena_peak_role_defense, a_defense, "a方防守阵容", ?p_g_set(arena_peak_role_defense, [ {uint8, order, "回合"} ,{uint8, formation_type, "阵法类型"} ,{uint32, hallows_id, "神器id"} ,{uint32, hallows_look_id, "神器幻化id"} ,{uint32, power, "战力"} ,{array, arena_peak_role_partner, plist, "伙伴信息", [ {uint8, pos, "站位"} ,{uint32, id, "伙伴ID"} ,{uint32, bid, "伙伴BID"} ,{uint16, lev, "等级"} ,{uint8, star, "星级"} ,{uint8, break_lev, "突破等级"} ,{uint32, power, "战力"} ,{uint32, skin_id, "皮肤id"} ,{uint32, hurt, "伤害量"} ,{uint32, behurt, "被伤害量"} ,{uint32, curt, "治疗量"} ,{array, tuple, ext, "额外参数", [ {uint32, key, "键(11:共鸣前等级)"} ,{uint32, val, "值"} ]} ]} ])} ,{uint32, b_bet, "B方投注值"} ,{tuple, b_id, [ {uint32, b_rid, "B角色ID"} ,{string, b_srv_id, "B服务器ID"} ]} ,{string, b_name, "B名称"} ,{uint16, b_lev, "B等级"} ,{uint32, b_face, "B头像"} ,{uint32, b_face_update_time, "自定义头像时间"} ,{string, b_face_file, "自定义头像"} ,{uint32, b_avatar_id, "B头像框"} ,{uint8, b_sex, "B性别"} ,{uint32, b_power, "B战力"} ,{array, arena_peak_role_defense, b_defense, "a方防守阵容", ?p_g_get(arena_peak_role_defense)} ,{uint8, ret, "结果(0:未打 1:胜利 2:失败)"} ,{array, arena_peak_result_info, result_info, "录像信息", [ {uint8, order, "回合"} ,{uint8, ret, "1:A胜 2:B胜"} ,{uint32, time, "战斗时间"} ,{uint8, round, "战斗回合总数"} ,{uint8, a_end_hp, "A队伍剩余血量百分比"} ,{uint8, b_end_hp, "B队伍剩余血量百分比"} ,{tuple, replay_info, [ {uint32, replay_id, "录像id"} ,{string, replay_sid, "录像服务器ID"} ]} ]} ,{uint16, a_sprite_lev, "精灵等级"} ,{array, tuple, a_sprites, "布置的精灵", [ {uint8, pos, "位置"} ,{uint32, item_bid, "精灵bid(0:未布置)"} ]} ,{uint16, b_sprite_lev, "精灵等级"} ,{array, tuple, b_sprites, "布置的精灵", [ {uint8, pos, "位置"} ,{uint32, item_bid, "精灵bid(0:未布置)"} ]} ,{array, tuple, a_sprites_list, "全部队伍布置的精灵如空读a_sprites", [ {uint8, team, "队伍编号"} ,{array, tuple, sprites_list, "该队伍布置的精灵", [ {uint8, pos, "位置"} ,{uint32, item_bid, "精灵bid(0:未布置)"} ]} ]} ,{array, tuple, b_sprites_list, "全部队伍布置的精灵如空读a_sprites", [ {uint8, team, "队伍编号"} ,{array, tuple, sprites_list, "该队伍布置的精灵", [ {uint8, pos, "位置"} ,{uint32, item_bid, "精灵bid(0:未布置)"} ]} ]} ])} } ,#rpc{ code = 27703 ,log_title = "竞猜信息" ,req_desc = "竞猜信息" ,req = [] ,reply = [ {uint8, bet_type, "下注类型(0:未投注 1:A 2:B)"} ,{uint32, bet_val, "下注值"} ,{uint16, a_bet_ratio, "A方赔率(千分比)"} ,{uint16, b_bet_ratio, "B方赔率(千分比)"} ,{rec, peak_champion_pk, peak_champion_pk, ?p_g_get(peak_champion_pk)} ] } ,#rpc{ code = 27704 ,log_title = "竞猜押注" ,req_desc = "竞猜押注" ,req = [ {uint8, bet_type, "下注类型(1:A 2:B)"} ,{uint32, bet_val, "下注值"} ] ,reply = [ {uint8, code, "标志(0:失败 1:成功)"} ,{string, msg, "提示信息"} ,{uint32, can_bet, "可下注"} ,{uint8, bet_type, "下注类型(1:A 2:B)"} ,{uint32, bet_val, "下注值"} ] } ,#rpc{ code = 27705 ,log_title = "我的竞猜信息" ,req_desc = "我的竞猜信息" ,req = [] ,reply = [ {array, tuple, list, "我的竞猜", [ {uint16, id, "id维一值"} ,{uint8, target, "目标(1:A 2:B)"} ,{uint32, bet, "下注筹码"} ,{uint32, get_bet, "获得筹码"} ,{rec, peak_champion_pk, peak_champion_pk, ?p_g_get(peak_champion_pk)} ]} ] } ,#rpc{ code = 27706 ,log_title = "上次比赛结果信息(返回打开窗口,否则不用)" ,req_desc = "上次比赛结果信息(返回打开窗口,否则不用)" ,req = [] ,reply = [ {uint16, rank, "名次"} ,{uint8, cnum, "战斗次数"} ,{uint8, win, "胜利次数"} ] } ,#rpc{ code = 27707 ,log_title = "竞猜押注实时更新" ,req_desc = "竞猜押注实时更新" ,req = [] ,reply_desc = "竞猜押注实时更新" ,reply = [ {uint32, a_bet, "A方投注值"} ,{uint32, b_bet, "B方投注值"} ,{uint16, a_bet_ratio, "A方赔率(千分比)"} ,{uint16, b_bet_ratio, "B方赔率(千分比)"} ] } ,#rpc{ code = 27708 ,log_title = "我的PK信息" ,req_desc = "我的PK信息" ,req = [] ,reply = [ {array, tuple, list, "我的参与日志", [ {uint16, id, "id维一值"} ,{uint16, score, "获取积分"} ,{rec, peak_champion_pk, peak_champion_pk, ?p_g_get(peak_champion_pk)} ]} ] } ,#rpc{ code = 27709 ,log_title = "获取晋级赛/64强信息" ,req_desc = "获取晋级赛/64强信息" ,req = [ {uint32, zone_id, "赛区"} ,{uint8, type, "1:晋级赛 2:64强"} ] ,reply = [ {uint32, zone_id, "赛区"} ,{uint8, type, "1:晋级赛 2:64强 3:8强"} ,{array, tuple, list, "小组列表", [ {uint8, group, "组号"} ,{array, peak_champion_32_pk, pos_list, "位置列表信息", [ {uint8, pos, "位置(1-15)"} ,{tuple, id, [ {uint32, rid, "角色ID"} ,{string, srv_id, "服务器ID"} ]} ,{string, name, "角色名"} ,{uint16, lev, "等级"} ,{uint32, face_id, "头像"} ,{uint32, avatar_bid, "头像框"} ,{uint8, ret, "结果(0:未打 1:胜利 2:失败)"} ,{array, tuple, ext, "额外参数", [ {uint8, ext_type, "类型(1:自定义头像时间 2:自定义头像"} ,{uint32, ext_val, "整数参数(类型1时值为自定义头像时间)"} ,{string, ext_str_val, "字符串参数(类型1时值为自定义头像)"} ]} ]} ]} ] } ,#rpc{ code = 27710 ,log_title = "获取8强信息" ,req_desc = "获取8强信息" ,req = [ {uint32, zone_id, "赛区"} ] ,reply = [ {uint32, zone_id, "赛区"} ,{array, peak_champion_32_pk, pos_list, "位置列表信息", [ {uint8, pos, "位置(1-8)"} ,{tuple, id, [ {uint32, rid, "角色ID"} ,{string, srv_id, "服务器ID"} ]} ,{string, name, "角色名"} ,{uint16, lev, "等级"} ,{uint32, face_id, "头像"} ,{uint32, avatar_bid, "头像框"} ,{uint8, ret, "结果(0:未打 1:胜利 2:失败)"} ,{array, tuple, ext, "额外参数", [ {uint8, ext_type, "类型(1:自定义头像时间 2:自定义头像"} ,{uint32, ext_val, "整数参数(类型1时值为自定义头像时间)"} ,{string, ext_str_val, "字符串参数(类型1时值为自定义头像)"} ]} ]} ] } ,#rpc{ code = 27711 ,log_title = "获取竞猜位置" ,req_desc = "获取竞猜位置" ,req = [] ,reply = [ {uint8, group, "组号(0-16 0:表示是4强竞猜)"} ,{uint8, pos, "位置(0-15 0:表示当前没有竞猜信息)"} ] } ,#rpc{ code = 27712 ,log_title = "获取指定位置对战信息" ,req_desc = "获取指定位置对战信息" ,req = [ {uint32, zone_id, "赛区"} ,{uint8, type, "1:晋级赛 2:64强"} ,{uint8, group, "组号(0-4 0:表示是4强竞猜)"} ,{uint8, pos, "位置(1/3/5/7/9/11/13../24)"} ] ,reply = [ {uint32, zone_id, "赛区"} ,{uint8, type, "1:晋级赛 2:64强 3:8强"} ,{rec, peak_champion_pk, peak_champion_pk, ?p_g_get(peak_champion_pk)} ] } ,#rpc{ code = 27713 ,log_title = "旧赛季排行榜信息(只有前8名数据)" ,req_desc = "旧赛季排行榜信息(只有前8名数据)" ,req = [ {uint32, zone_id, "赛区 (0:自己当前赛区)"} ,{uint32, period, "周期"} ] ,reply = [ {uint32, zone_id, "赛区"} ,{uint32, period, "周期"} ,{array, arena_peak_rank, arena_peak_rank, "排行", [ {uint16, rank, "排名"} ,{tuple, id, [ {uint32, rid, "角色ID"} ,{string, srv_id, "服务器ID"} ]} ,{string, name, "名字"} ,{uint32, face_id, "头像"} ,{uint32, avatar_bid, "头像框"} ,{uint32, face_update_time, "自定义头像时间"} ,{string, face_file, "自定义头像"} ]} ] } ,#rpc{ code = 27714 ,log_title = "本赛季排行榜信息" ,req_desc = "本赛季排行榜信息" ,req = [ {uint32, zone_id, "赛区(0:自己当前赛区)"} ,{uint32, start_num, "起始排名"} ,{uint32, end_num, "终止排名"} ] ,reply = [ {uint16, rank, "自己名次"} ,{uint32, worship, "点赞数量"} ,{uint32, power, "战力"} ,{uint32, score, "选拔赛积分"} ,{array, tuple, rank_list, "排行", [ {rec, arena_peak_rank, arena_peak_rank, [ {tuple, id, [ {uint32, rid, "角色ID"} ,{string, srv_id, "服务器ID"} ]} ,{string, name, "角色名"} ,{uint16, lev, "等级"} ,{uint32, face_id, "头像"} ,{uint8, sex, "性别"} ,{uint16, rank, "排名"} ,{uint16, score, "积分"} ,{uint32, power, "战力"} ,{uint32, avatar_bid, "头像框"} ,{uint32, face_update_time, "自定义头像时间"} ,{string, face_file, "自定义头像"} ]} ,{uint32, worship, "点赞数量"} ,{uint8, worship_status, "膜拜状态(0:可膜拜 1:不可膜拜)"} ]} ,{uint32, zone_id, "赛区"} ,{uint32, start_num, "起始排名"} ,{uint32, end_num, "终止排名"} ,{uint32, day_worship, "今日已点赞数量"} ] } ,#rpc{ code = 27715 ,log_title = "冠军信息弹窗" ,req_desc = "冠军信息弹窗" ,reply = [ {uint32, time, "时间"} ,{array, tuple, rank_list, "排行榜", [ {rec, arena_peak_champion_role, arena_peak_champion_role, [ {tuple, id, [ {uint32, rid, "角色ID"} ,{string, srv_id, "服务器ID"} ]} ,{string, name, "角色名"} ,{uint16, lev, "等级"} ,{uint32, face_id, "头像"} ,{uint8, sex, "性别"} ,{uint16, rank, "排名"} ,{uint32, face_update_time, "自定义头像时间"} ,{string, face_file, "自定义头像"} ]} ]} ] } ,#rpc{ code = 27716 ,log_title = "竞猜押注有变化(客户端收到后请求27707)" ,reply_desc = "竞猜押注有变化(客户端收到后请求27707)" ,reply = [ ] } ,#rpc{ code = 27720 ,log_title = "请求精英赛各个赛季战区信息" ,req_desc = "请求精英赛各个赛季战区信息" ,req = [ ] ,reply_desc = "请求精英赛各个赛季战区信息" ,reply = [ {array, tuple, zone_info, "战区信息", [ {uint32, period, "周期"} ,{uint32, max_zone_id, "最大战区id"} ,{uint32, self_zone_id, "自身所在战区id"} ]} ] } ,#rpc{ code = 27725 ,log_title = "设置阵法" ,req_desc = "设置阵法" ,req = [ {array, tuple, formations, "阵容", [ {uint8, order, "队伍序号"} ,{uint8, formation_type, "阵法类型"} ,{array, tuple, pos_info, "站位信息", [ {uint8, pos, "位置"} ,{uint32, id, "伙伴ID"} ]} ,{uint32, hallows_id, "使用的圣器id(没有传0)"} ]} ] ,reply_desc = "设置阵法" ,reply = [ {uint8, code, "结果(0:失败 1:成功)"} ,{string, msg, "结果信息"} ] } ,#rpc{ code = 27726 ,log_title = "请求阵法" ,req_desc = "请求阵法" ,req = [ ] ,reply_desc = "请求阵法" ,reply = [ {array, tuple, formations, "阵容", [ {uint8, order, "队伍序号"} ,{uint8, formation_type, "阵法类型"} ,{array, formation_pos, pos_info, "站位信息", [ {uint8, pos, "位置"} ,{uint32, id, "伙伴ID"} ]} ,{uint32, hallows_id, "使用的圣器id(没有传0)"} ]} ] } ,#rpc{ code = 27730 ,log_title = "请求红点信息" ,req_desc = "请求红点信息" ,req = [ ] ,reply_desc = "请求红点信息" ,reply = [ {array, tuple, point_info, "红点信息", [ {uint8, type, "红点类型(1:我的赛程 2:晋级赛红点/64强红点)"} ,{uint8, is_point, "是否点击过(0:今天没有点击过 1:今日已点)"} ]} ] } ,#rpc{ code = 27731 ,log_title = "点击红点" ,req_desc = "点击红点" ,req = [ {uint8, type, "红点类型(1:我的赛程 2:晋级赛红点/64强红点)"} ] ,reply_desc = "点击红点" ,reply = [ ] } ].