88 lines
3.1 KiB
Protocol Buffer
88 lines
3.1 KiB
Protocol Buffer
// 该文件由工具自动生成,不要手动修改该文件
|
|
|
|
package project;
|
|
|
|
import "proto_type.proto" ;
|
|
|
|
|
|
// 排行榜基础信息
|
|
message p_rank_info {
|
|
required int64 rank_index = 1; // 排名(可以考虑按顺序下发/前端自行排序获取)
|
|
optional int32 rank_time = 2; // 上榜时间
|
|
repeated int64 rank_data = 3; // 排行榜数据,int64的数组,数组各个数据的意义业务自行定义
|
|
optional p_role_prop role_info = 4; // 玩家简要信息
|
|
repeated p_v args = 5; // 自定义参数
|
|
}
|
|
|
|
// 请求排行榜信息:协议号:10_1(c2s)
|
|
message rank_info_c2s {
|
|
required int64 rank_type = 1; // 排行榜类型
|
|
optional int32 page = 2; // 第几页,默认第一页
|
|
optional int32 size = 3; // 每页显示多少数据
|
|
}
|
|
|
|
// 请求排行榜信息:协议号:10_1(s2c)
|
|
message rank_info_s2c {
|
|
required int64 rank_type = 1; // 排行榜类型
|
|
optional int32 page = 2; // 第几页,默认第一页
|
|
optional p_rank_info my_rank = 3; // 我的信息
|
|
repeated p_rank_info rank_info = 4; // 排行榜信息
|
|
}
|
|
|
|
// 请求指定对象排行榜信息:协议号:10_2(c2s)
|
|
message rank_obj_rank_c2s {
|
|
required int64 rank_type = 1; // 排行榜类型
|
|
required int64 obj_id = 2; // 对象id
|
|
}
|
|
|
|
// 请求指定对象排行榜信息:协议号:10_2(s2c)
|
|
message rank_obj_rank_s2c {
|
|
required int64 rank_type = 1; // 排行榜类型
|
|
optional p_rank_info obj_rank = 2; // 对象信息
|
|
}
|
|
|
|
// 请求历史排行榜信息:协议号:10_3(c2s)
|
|
message rank_history_c2s {
|
|
required int64 rank_type = 1; // 排行榜类型
|
|
required int32 cycle_type = 2; // 周期类型 1-每日;2-每周;3-每月
|
|
optional int32 page = 3; // 第几页,默认第一页
|
|
optional int32 size = 4; // 每页显示多少数据
|
|
}
|
|
|
|
// 请求历史排行榜信息:协议号:10_3(s2c)
|
|
message rank_history_s2c {
|
|
required int64 rank_type = 1; // 排行榜类型
|
|
required int32 cycle_type = 2; // 周期类型 1-每日;2-每周;3-每月
|
|
optional int32 page = 3; // 第几页,默认第一页
|
|
optional p_rank_info my_rank = 4; // 我的信息
|
|
repeated p_rank_info rank_info = 5; // 排行榜信息
|
|
}
|
|
|
|
// 请求指定对象排行榜信息:协议号:10_4(c2s)
|
|
message rank_history_obj_rank_c2s {
|
|
required int64 rank_type = 1; // 排行榜类型
|
|
required int32 cycle_type = 2; // 周期类型 1-每日;2-每周;3-每月
|
|
required int64 obj_id = 3; // 对象id
|
|
}
|
|
|
|
// 请求指定对象排行榜信息:协议号:10_4(s2c)
|
|
message rank_history_obj_rank_s2c {
|
|
required int64 rank_type = 1; // 排行榜类型
|
|
required int32 cycle_type = 2; // 周期类型 1-每日;2-每周;3-每月
|
|
optional p_rank_info obj_rank = 3; // 对象信息
|
|
}
|
|
|
|
// 请求指定对象一段范围内的排名玩家:协议号:10_5(c2s)
|
|
message rank_range_c2s {
|
|
required int64 rank_type = 1; // 排行榜类型
|
|
required int64 obj_id = 2; // 对象id
|
|
required int32 range = 3; // 范围,向上和向下各取多少
|
|
}
|
|
|
|
// 请求指定对象一段范围内的排名玩家:协议号:10_5(s2c)
|
|
message rank_range_s2c {
|
|
optional int64 rank_type = 1; // 排行榜类型
|
|
optional int64 obj_id = 2; // 对象id
|
|
repeated p_rank_info rank_info = 3; // 排行榜信息
|
|
}
|