Files

264 lines
12 KiB
Erlang
Raw Permalink Normal View History

2026-05-23 22:10:14 +08:00
%%----------------------------------------------------
%% 录像大厅
%%
%% @author whjing2011@gmail.com
%%----------------------------------------------------
-module(proto_199).
-export([info/0, cfg/0]).
-include("protocol.hrl").
info() -> {
"录像大厅"
,["replay_hall.hrl"]
}.
-spec cfg() -> [#rpc{}].
cfg() ->
[
#rpc{
code = 19901
,log_title = "获取个人录像记录"
,req_desc = "获取个人录像记录"
,req = [
{uint8, type, "类型(1:个人录像 99:收集)"}
]
,reply = [
{uint8, type, "类型"}
,{array, tuple, replay_list, "录像列表", ?p_g_set(replay, [
{string, name, "录像名称"}
,{int8, flag, "是否已点赞"}
,{int8, is_collect, "是否已收集"}
,{uint32, a_face_update_time, "自定义头像时间"}
,{string, a_face_file, "自定义头像"}
,{uint32, b_face_update_time, "自定义头像时间"}
,{string, b_face_file, "自定义头像"}
,{rec, replay_info, replay_info, [
{uint32, id, "录像ID"}
,{uint8, combat_type, "战斗类型"}
,{uint8, round, "回合"}
,{uint32, sec_type, "二级类型"}
,{tuple, a_rid, [
{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_power, "A角色战力"}
,{uint8, a_rank, "A角色排名"}
,{uint8, a_formation_type, "A角色阵法"}
,{uint8, a_camp_type, "A角色激活阵型"}
,{tuple, b_rid, [
{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_power, "B角色战力"}
,{uint8, b_rank, "B角色排名"}
,{uint8, b_formation_type, "B角色阵法"}
,{uint8, b_camp_type, "B角色激活阵型"}
,{uint8, ret, "结果(1:A胜 2:B胜 3:平)"}
,{uint32, like, "点赞数"}
,{uint32, share, "分享数"}
,{uint32, play, "播放数"}
,{uint32, time, "时间"}
,{array, replay_partner, a_plist, "A方伙伴数据", ?p_g_set(replay_partner, [
{uint32, id, "伙伴ID"}
,{uint8, pos, "位置"}
,{uint32, bid, "基础ID"}
,{uint16, lev, "等级"}
,{uint8, star, "星级"}
,{uint8, break_lev, "进阶次数"}
,{uint32, power, "战力"}
,{uint32, hp, "当前血量"}
,{uint32, hp_max, "血量上限"}
,{uint32, hurt, dps, "伤害量"}
,{uint32, behurt, be_hurt, "被伤害量"}
,{uint32, curt, cure, "治疗量"}
,{array, tuple, ext, "额外数据 (5:皮肤id) (11:共鸣前等级)", [
{uint32, key, "额外属性键"}
,{uint32, val, ""}
]}
])}
,{array, replay_partner, b_plist, "A方伙伴数据", ?p_g_get(replay_partner)}
%% @todo 跨服录像需要把服务器id传过去, 注意生成客户端协议数据时只存放要穿过去的字段
%% @todo 1:周冠军赛录像服务器数据
,{array, tuple, ext, "额外数据", [
{uint32, key, "额外属性键 2左边古树等级 3左边精灵数据 4右边古树等级 5右边精灵数据 6左边公会突破技能增加的战力 7右边公会突破技能增加的战力"}
,{uint32, val, ""}
,{string, str, "字符串型数据"}
,{array, tuple, ext_list, "额外数据列表数值", [
{uint32, ext_list_key, "额外属性键"}
,{uint32, ext_list_val, ""}
]}
]}
]}
])}
]
}
,#rpc{
code = 19902
,log_title = "获取公共录像记录"
,req_desc = "获取公共录像记录"
,req = [
{uint8, type, "类型(1:竞技 2:冠军 3:PK 4:公会战)"}
,{uint32, cond_type, "条件类型"}
,{uint32, start, "开始位置(1-n)"}
,{uint8, num, "数据量(1-100)"}
]
,reply = [
{uint8, type, "类型"}
,{uint32, cond_type, "条件类型"}
,{uint32, start, "开始位置(1-n)"}
,{uint8, num, "数据量(1-100)"}
,{uint32, len, "总数量长度"}
,{array, tuple, replay_list, "录像列表", ?p_g_get(replay)}
]
}
,#rpc{
code = 19903
,log_title = "点赞"
,req_desc = "点赞"
,req = [
{uint32, id, "录像ID"}
,{string, srv_id, "服务器ID"}
,{uint8, combat_type, "战斗类型"}
]
,reply = [
{uint8, code, "状态码, 0:失败,1:成功"}
,{string, msg, "附加信息"}
,{uint32, id, "录像ID"}
]
}
,#rpc{
code = 19904
,log_title = "收集"
,req_desc = "收集"
,req = [
{uint32, id, "录像ID"}
,{uint8, type, "收集类型(0:取消收集 1:收集)"}
,{string, srv_id, "服务器ID"}
,{uint8, combat_type, "战斗类型"}
]
,reply = [
{uint8, code, "状态码, 0:失败,1:成功"}
,{string, msg, "附加信息"}
,{uint32, id, "录像ID"}
,{uint8, type, "收集类型(0:取消收集 1:收集)"}
]
}
,#rpc{
code = 19905
,log_title = "分享"
,req_desc = "分享"
,req = [
{uint32, id, "录像ID"}
,{uint16, channel, "频道;1:世界;2:场景;4:帮派;8;队伍;16:传闻;32:顶部传闻;64:系统;128:顶部系统;256:系统帮派;512:系统组队"}
,{string, srv_id, "服务器ID"}
,{uint8, combat_type, "战斗类型"}
]
,reply = [
{uint8, code, "状态码, 0:失败,1:成功"}
,{string, msg, "附加信息"}
]
}
,#rpc{
code = 19906
,log_title = "角色基本信息"
,req_desc = "角色基本信息"
,req = [
]
,reply = [
{uint8, like, "今天点赞次数"}
]
}
,#rpc{
code = 19907
,log_title = "获取伙伴信息数据"
,req_desc = "获取伙伴信息数据"
,req = [
{uint32, replay_id, "录像ID"}
,{uint32, partner_id, "伙伴ID"}
,{uint8, type, "类型(1:A 2:B)"}
,{string, srv_id, "服务器ID"}
,{uint8, combat_type, "战斗类型"}
]
,reply = [
{uint32, replay_id, "录像ID"}
,{uint32, partner_id, "伙伴ID"}
,{uint8, type, "类型(1:A 2:B)"}
,{rec, rec, replay_partner, [
{uint8, pos, "位置"}
,{uint32, bid, "基础ID"}
,{uint16, lev, "等级"}
,{uint8, star, "星级"}
,{uint8, break_lev, "进阶次数"}
,{uint32, power, "战力"}
,{uint32, hp, now_hp, "当前血量"}
,{uint32, hp_max, hp, "血量上限"}
,{uint32, atk, "攻击"}
,{uint32, def, "防御"}
,{uint32, speed, "速度"}
,{uint32, crit_rate, "暴击"}
,{uint32, crit_ratio, "暴伤"}
,{uint32, hit_magic, "控制"}
,{uint32, dodge_magic, "控制"}
,{uint32, hurt, dps, "伤害量"}
,{uint32, behurt, "被伤害量"}
,{uint32, curt, cure, "治疗量"}
,{array, tuple, skills, "伙伴技能", [
{uint8, pos, "序号"}
,{uint32, skill_bid, "技能bid"}
]}
,{array, tuple, eqms, "伙伴装备", [
{uint32, id, "ID"}
,{uint32, base_id, "基本bid"}
,{uint32, type, "类型"}
]}
,{array, tuple, artifacts, "神器", [
{uint32, id, id, "神器id"}
,{uint32, base_id, base_id, "神器基础id"}
,{uint8, artifact_pos, "穿戴位置 (1:副神器 2:主神器)"}
,{uint32, enchant, enchant, "精炼等级"}
,{array, tuple, attr, "精炼属性", [
{uint32, attr_id, "属性id"}
,{uint32, attr_val, "属性值"}
]}
,{array, tuple, extra_attr, "附加属性(神器:重铸未保存的属性)", [
{uint32, attr_id, "属性id"}
,{uint32, attr_val, "属性值"}
]}
,{array, tuple, extra, "附加属性(1:神器技能1 2:神器技能2)", [
{uint32, extra_k, "附加属性id"}
,{uint32, extra_v, "附加属性值"}
]}
]}
,{array, tuple, ext, "额外数据(5:皮肤id) (11:共鸣前等级)", [
{uint32, key, "额外属性键"}
,{uint32, val, ""}
]}
]}
]
}
,#rpc{
code = 19908
,log_title = "点击查看聊天分享"
,req_desc = "点击查看聊天分享"
,req = [
{string, hall_srv_id, "大厅服务器ID"}
,{uint32, replay_id, "录像ID"}
,{string, srv_id, "服务器ID"}
,{uint8, type, "类型"}
,{uint16, channel, "频道;1:世界;2:场景;4:帮派;8;队伍;16:传闻;32:顶部传闻;64:系统;128:顶部系统;256:系统帮派;512:系统组队"}
]
,reply = [
{uint8, type, "类型"}
,{uint16, channel, "频道;1:世界;2:场景;4:帮派;8;队伍;16:传闻;32:顶部传闻;64:系统;128:顶部系统;256:系统帮派;512:系统组队"}
,{tuple, replay_list, ?p_g_get(replay)}
]
}
].