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

528 lines
20 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 liufenglin 240039421@qq.com
%%----------------------------------------------------
-module(proto_290).
-export([info/0, cfg/0]).
-include("protocol.hrl").
info() -> {
"开学副本"
,["common.hrl", "arena_team.hrl", "combat.hrl", "holiday_arena_team.hrl"]
}.
-spec cfg() -> [#rpc{}].
cfg() -> [
#rpc{
code = 29000
,log_title = "请求队伍信息"
,req_desc = "请求队伍信息"
,req = [
]
,reply_desc = "队伍信息"
,reply = [
{uint32, end_time, "赛季结束时间"}
,{uint16, state, "状态(0:未开启 1:进行中)"}
,{uint16, count, "剩余挑战次数"}
,{uint16, buy_count, "当前已购买次数"}
,{array, holiday_arena_team_member, team_members, "队员信息", ?p_g_set(holiday_arena_team_member, [
{tuple, id, [
{uint32, rid, "id"}
,{string, sid, "服务器ID"}
]}
,{string, name, "名字"}
,{uint32, face_id, "头像"}
,{uint32, power, "战力"}
,{uint32, avatar_bid, "头像框"}
,{uint32, lev, "等级"}
,{uint16, pos, "位置"}
,{uint8, is_leader, "是否队长"}
,{uint32, rank, "排名"}
,{uint32, score, "积分"}
,{uint32, score_lev, "段位"}
,{uint32, face_update_time, "自定义头像时间"}
,{string, face_file, "自定义头像"}
,{uint8, is_online, "是否在线"}
])}
,{array, tuple, award_list, "奖励列表", [
{uint32, award_id, "奖励id"}
,{uint8, status, "领取状态(0:未达成 1:可领取 2:已领取)"}
]}
,{uint16, team_count, "队友剩余挑战次数(没有队友时为0"}
]
}
,#rpc{
code = 29001
,log_title = "搜索指定玩家"
,req_desc = "搜索指定玩家"
,req = [
{string, name, "角色名"}
]
,reply_desc = "搜索指定玩家"
,reply = [
{array, holiday_arena_team_member, team_members, "成员数据", ?p_g_get(holiday_arena_team_member)}
]
}
,#rpc{
code = 29002
,log_title = "邀请入队"
,req_desc = "邀请入队"
,req = [
{uint32, rid, "角色id"}
,{string, srv_id, "角色服务器ID"}
]
,reply_desc = "邀请入队"
,reply = [
{uint8, code, "结果状态(0:失败 1:成功)"}
,{string, msg, "结果信息"}
,{uint32, rid, "角色id"}
,{string, srv_id, "角色服务器ID"}
]
}
,#rpc{
code = 29003
,log_title = "获取邀请列表"
,req_desc = "获取邀请列表"
,req = [
]
,reply_desc = "获取邀请列表"
,reply = [
{array, holiday_arena_team_member, team_members, "邀请列表", ?p_g_get(holiday_arena_team_member)}
]
}
,#rpc{
code = 29004
,log_title = "回应邀请入队信息"
,req_desc = "回应邀请入队信息"
,req = [
{uint32, rid, "角色id"}
,{string, srv_id, "角色服务器ID"}
,{uint8, type, "0:拒绝 1:同意"}
]
,reply_desc = "回应邀请入队信息"
,reply = [
{uint8, code, "结果状态(0:失败 1:成功)"}
,{string, msg, "结果信息"}
]
}
,#rpc{
code = 29005
,log_title = "一键清除邀请列表"
,req_desc = "一键清除邀请列表"
,req = []
,reply_desc = "一键清除邀请列表"
,reply = [
{uint8, code, "结果状态(0:失败 1:成功)"}
,{string, msg, "结果信息"}
]
}
,#rpc{
code = 29006
,log_title = "退队"
,req_desc = "退队"
,req = [
]
,reply_desc = "退队"
,reply = [
{uint8, code, "结果状态(0:否 1:是)"}
,{string, msg, "结果信息"}
]
}
,#rpc{
code = 29007
,log_title = "移交队长"
,req_desc = "移交队长"
,req = [
{uint32, rid, "角色id"}
,{string, srv_id, "角色服务器ID"}
]
,reply_desc = "移交队长"
,reply = [
{uint8, code, "结果状态(0:否 1:是)"}
,{string, msg, "结果信息"}
]
}
,#rpc{
code = 29008
,log_title = "获取推荐玩家列表"
,req_desc = "获取推荐玩家列表"
,req = [
]
,reply_desc = "获取推荐玩家列表"
,reply = [
{array, holiday_arena_team_member, team_members, "邀请列表", ?p_g_get(holiday_arena_team_member)}
]
}
,#rpc{
code = 29009
,log_title = "查看好友列表"
,req_desc = "查看好友列表"
,req = []
,reply_desc = "查看好友列表"
,reply = [
{array, holiday_arena_team_member, team_members, "邀请列表", ?p_g_get(holiday_arena_team_member)}
]
}
,#rpc{
code = 29010
,log_title = "获取已申请列表"
,req_desc = "获取已申请列表"
,req = []
,reply_desc = "获取已申请列表"
,reply = [
{array, single, invite_list, "已申请列表", [
{tuple, id, [
{uint32, rid, "id"}
,{string, sid, "服务器ID"}
]}
]}
]
}
,#rpc{
code = 29016
,log_title = "匹配对手信息"
,req_desc = "匹配对手信息"
,req = []
,reply_desc = "匹配对手信息"
,reply = [
{uint8, code, "结果状态(0:否 1:是)"}
,{string, msg, "结果信息"}
,{array, holiday_arena_team_defense_role, atk_team_members, "队员信息", ?p_g_set(holiday_arena_team_defense_role, [
{tuple, id, [
{uint32, rid, "id"}
,{string, sid, "服务器ID"}
]}
,{string, name, "名字"}
,{uint32, face_id, "头像"}
,{uint32, power, "战力"}
,{uint32, avatar_bid, "头像框"}
,{uint32, lev, "等级"}
,{uint16, pos, "位置"}
,{uint8, is_leader, "是否队长"}
,{uint32, rank, "排名"}
,{uint32, score, "积分"}
,{uint32, score_lev, "段位"}
,{uint32, face_update_time, "自定义头像时间"}
,{string, face_file, "自定义头像"}
,{uint32, formation_type, "阵法"}
,{uint32, hallows_id, "神器id"}
,{uint32, hallows_look_id, "神器幻化"}
,{uint32, sprite_lev, "精灵古树等级"}
,{array, tuple, sprites, "精灵", [
{uint8, pos, "位置"}
,{uint32, item_bid, "精灵bid(0:未布置)"}
]}
,{array, holiday_arena_team_partners_info, partner_infos, "布阵伙伴数据", [
{uint8, pos, pos, "位置"}
,{uint32, bid, bid, "BID"}
,{uint16, lev, lev, "等级"}
,{uint8, star, star, "星级"}
,{uint32, use_skin, use_skin, "使用的皮肤"}
,{uint32, resonate_lev, resonate_lev, "共鸣前的等级"}
]}
])}
,{array, holiday_arena_team_defense_role, def_team_members, "对手列表列表", ?p_g_get(holiday_arena_team_defense_role)}
,{uint8, ref_count, "当前刷新次数"}
,{uint32, end_time, "过期时间"}
,{uint8, is_enter, "是否确认对手"}
]
}
,#rpc{
code = 29017
,log_title = "刷新对手"
,req_desc = "刷新对手"
,req = []
,reply_desc = "刷新对手"
,reply = [
{uint8, code, "结果状态(0:否 1:是)"}
,{string, msg, "结果信息"}
]
}
,#rpc{
code = 29018
,log_title = "确认对手"
,req_desc = "确认对手"
,req = []
,reply_desc = "确认对手"
,reply = [
]
}
,#rpc{
code = 29019
,log_title = "发起战斗"
,req_desc = "发起战斗"
,req = [
{array, tuple, pos_info, "出站顺序", [
{tuple, id, [
{uint32, rid, "id"}
,{string, sid, "服务器ID"}
]}
,{uint16, pos, "位置"}
]}
]
,reply_desc = "发起战斗"
,reply = [
{uint8, code, "结果状态(0:否 1:是)"}
,{string, msg, "结果信息"}
]
}
,#rpc{
code = 29020
,log_title = "战斗结算"
,req_desc = "战斗结算"
,req = []
,reply_desc = "战斗结算"
,reply = [
{uint8, result, "战斗结果 1 胜利 2:失败"}
,{uint32, win_count, "胜利次数"}
,{uint32, lose_count, "失败次数"}
,{int32, score_lev, "战斗前等级"}
,{int32, new_score_lev, "战斗后等级"}
,{int32, score, "战斗结束前积分"}
,{int32, new_score, "战斗结束后积分"}
,{int32, rank, "战斗前排名"}
,{int32, new_rank, "战斗结束后排名"}
,{array, tuple, all_hurt_statistics, "伤害统计", [
{uint8, type, "第几次战斗"}
,{uint8, a_round, "攻击方队伍编号"}
,{uint8, b_round, "防守方队伍编号"}
,{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(11:共鸣前等级)"}
,{uint32, val, ""}
]}
,{uint32, be_hurt, be_hurt, "英雄承受伤害"}
]}
]}
,{uint32, replay_id, "录像id"}
,{string, a_name, "a方名字"}
,{string, b_name, "b方名字"}
,{uint8, ret, "进攻结果 1:胜利 2:失败"}
]}
]
}
,#rpc{
code = 29021
,log_title = "推送自身布阵变更"
,req_desc = "推送自身布阵变更"
,req = []
,reply_desc = "推送自身布阵变更"
,reply = [
{rec, atk_team_members, holiday_arena_team_defense_role, ?p_g_get(holiday_arena_team_defense_role)}
]
}
,#rpc{
code = 29022
,log_title = "缓存出站顺序"
,req_desc = "缓存出站顺序"
,req = [
{array, tuple, pos_info, "出站顺序", [
{tuple, id, [
{uint32, rid, "id"}
,{string, sid, "服务器ID"}
]}
,{uint16, pos, "位置"}
]}
]
,reply_desc = "缓存出站顺序"
,reply = [
]
}
,#rpc{
code = 29025
,log_title = "获取排行榜"
,req_desc = "获取排行榜"
,req = [
{uint32, start_num, "起始排名"}
,{uint32, end_num, "结束排名"}
]
,reply_desc = "获取排行榜"
,reply = [
{uint32, rank, "自身排名"}
,{array, holiday_arena_team_member, team_members, "排行数据", ?p_g_get(holiday_arena_team_member)}
]
}
,#rpc{
code = 29026
,log_title = "日志数据"
,req_desc = "日志数据"
,req = []
,reply_desc = "日志数据"
,reply = [
{array, holiday_arena_team_log, holiday_arena_team_log, "日志数据", [
{uint32, id, id, "日志ID"}
,{uint8, is_atk, is_atk, "是否进攻方"}
,{tuple, atk_id, [
{uint32, rid, "id"}
,{string, srv_id, "服务器ID"}
]}
,{string, atk_name, atk_name, "进攻方名字"}
,{array, holiday_arena_team_log_face, atk_face, "进攻方头像列表", ?p_g_set(holiday_arena_team_log_face, [
{uint8, pos, "位置"}
,{tuple, id, [
{uint32, rid, "id"}
,{string, srv_id, "服务器ID"}
]}
,{uint32, face_id, "头像"}
,{uint32, avatar_bid, "头像"}
,{uint32, is_leader, "是否队长"}
,{uint16, lev, "等级"}
,{uint32, face_update_time, "自定义头像时间"}
,{string, face_file, "自定义头像"}
])}
,{uint32, atk_ole_rank, atk_ole_rank, "进攻方战斗前排名"}
,{uint32, atk_rank, atk_rank, "进攻方战斗后排名"}
,{uint32, atk_ole_score, atk_ole_score, "进攻方战斗前积分"}
,{uint32, atk_score, atk_score, "进攻方战斗后积分"}
,{tuple, def_id, [
{uint32, def_rid, "id"}
,{string, def_srv_id, "服务器ID"}
]}
,{string, def_name, def_name, "防守方名字"}
,{array, holiday_arena_team_log_face, def_face, "防守方头像列表", ?p_g_get(holiday_arena_team_log_face)}
,{uint32, def_ole_rank, def_ole_rank, "进攻方战斗前排名"}
,{uint32, def_rank, def_rank, "进攻方战斗后排名"}
,{uint32, def_ole_score, def_ole_score, "进攻方战斗前积分"}
,{uint32, def_score, def_score, "进攻方战斗后积分"}
,{uint8, ret, ret, "进攻结果 1:胜利 2:失败"}
,{uint8, win_count, win_count, "胜利次数"}
,{uint8, lose_count, lose_count, "失败次数"}
,{uint32, time, time, "时间"}
,{uint32, atk_power, atk_power, "进攻方战力"}
,{uint32, def_power, def_power, "防守方战力"}
]}
]
}
,#rpc{
code = 29027
,log_title = "日志详情"
,req_desc = "日志详情"
,req = [
{uint32, id, "日志ID"}
]
,reply_desc = "日志详情"
,reply = [
{uint32, id, "日志ID"}
,{array, tuple, replay_infos, "录像基础数据信息", [
{uint8, order, order, "第几次战斗"}
,{rec, holiday_arena_team_log_info, holiday_arena_team_log_info, [
{uint32, id, id, "录像ID"}
,{uint8, round, round, "回合数"}
,{uint8, ret, ret, "结果 1:胜利 2:失败"}
,{uint32, time, time, "时间"}
,{tuple, a_id, [
{uint32, rid, "id"}
,{string, srv_id, "服务器ID"}
]}
,{uint32, a_power, a_power, "A方战力"}
,{uint32, a_formation_type, a_formation_type, "A方阵法类型"}
,{uint8, a_order, a_order, "A队伍编号"}
,{uint8, a_end_hp, a_end_hp, "A队伍剩余血量百分比"}
,{uint16, a_sprite_lev, a_sprite_lev, "精灵等级"}
,{array, tuple, a_sprites, "布置的精灵", [
{uint8, pos, "位置"}
,{uint32, item_bid, "精灵bid(0:未布置)"}
]}
,{tuple, b_id, [
{uint32, b_rid, "id"}
,{string, b_srv_id, "服务器ID"}
]}
,{uint32, b_power, b_power, "B方战力"}
,{uint32, b_formation_type, b_formation_type, "B方阵法类型"}
,{uint8, b_order, b_order, "A队伍编号"}
,{uint8, b_end_hp, b_end_hp, "A队伍剩余血量百分比"}
,{uint16, b_sprite_lev, b_sprite_lev, "精灵等级"}
,{array, tuple, b_sprites, "布置的精灵", [
{uint8, pos, "位置"}
,{uint32, item_bid, "精灵bid(0:未布置)"}
]}
,{array, holiday_arena_team_log_partner, a_plist, "A方伙伴", ?p_g_set(holiday_arena_team_log_partner, [
{uint8, pos, pos, "位置"}
,{uint32, id, id, "id"}
,{uint32, bid, bid, "BID"}
,{uint16, lev, lev, "等级"}
,{uint8, star, star, "星级"}
,{uint32, power, power, "战力"}
,{uint32, skin_id, skin_id, "皮肤id"}
,{uint32, resonate_lev, resonate_lev, "共鸣前的等级"}
,{uint32, hurt, hurt, "英雄伤害"}
,{uint32, curt, curt, "英雄治疗量"}
,{uint32, be_hurt, be_hurt, "英雄承受伤害"}
])}
,{array, holiday_arena_team_log_partner, b_plist, "B方伙伴", ?p_g_get(holiday_arena_team_log_partner)}
,{string, a_name, a_name, "a方名字"}
,{string, b_name, b_name, "b方名字"}
]}
]}
]
}
,#rpc{
code = 29028
,log_title = "请求日志红点情况"
,req_desc = "请求日志红点情况"
,req = []
,reply_desc = "请求日志红点情况"
,reply = [
{uint8, point, "日志红点情况"}
]
}
,#rpc{
code = 29030
,log_title = "购买挑战次数"
,req_desc = "购买挑战次数"
,req = []
,reply_desc = "购买挑战次数"
,reply = [
{uint8, code, "结果状态(0:否 1:是)"}
,{string, msg, "结果信息"}
,{uint16, count, "剩余挑战次数"}
,{uint16, buy_count, "当前已购买次数"}
]
}
,#rpc{
code = 29031
,log_title = "领取段位奖励"
,req_desc = "领取段位奖励"
,req = [
{uint32, id, "奖励id"}
]
,reply_desc = "领取段位奖励"
,reply = [
{uint8, code, "结果状态(0:否 1:是)"}
,{string, msg, "结果信息"}
,{uint32, id, "奖励id"}
,{array, tuple, award_list, "奖励列表", [
{uint32, award_id, "奖励id"}
,{uint8, status, "领取状态(0:未达成 1:可领取 2:已领取)"}
]}
]
}
,#rpc{
code = 29035
,log_title = "进入场景"
,req_desc = "进入场景"
,req = []
,reply_desc = "进入场景"
,reply = []
}
].