rebar3 服务器

This commit is contained in:
lwt
2026-05-19 11:30:21 +08:00
parent aeb18acee0
commit 03fd2da480
5187 changed files with 3670646 additions and 0 deletions
@@ -0,0 +1,127 @@
// 该文件由工具自动生成,不要手动修改该文件
package project;
// 活动信息
message p_activity_info {
optional int64 cid = 1; // 活动配置id
optional int64 id = 2; // 活动唯一id
optional int64 status = 3; // 活动状态(0-未开启 1-开始)
optional int64 start_time = 4; // 活动开始时间
optional int64 end_time = 5; // 活动结束时间
optional bool reservation = 6; // 是否预约
repeated int64 duration_time_list = 7; // 活动每个阶段持续的时长(秒)
}
// 活动信息
message p_dynamic_activity_info {
required int32 cid = 1; // 动态活动配置id
optional int64 arg = 2; // 动态活动 扩展参数
}
// 活动道具统计奖励信息
message p_activity_item_reward {
optional int64 grid_id = 1; // 格子id
optional int64 is_got = 2; // 领取状态1-已领取0-未领取
}
// 请求活动列表:协议号:3_1(c2s)
message activity_infos_c2s {
}
// 请求活动列表:协议号:3_1(s2c)
message activity_infos_s2c {
repeated p_activity_info activity_infos = 1; //
repeated p_dynamic_activity_info dynamic_list = 2; //
}
// 更新活动数据:协议号:3_2(s2c)
message activity_update_s2c {
required p_activity_info activity_info = 1; // 更新活动数据
}
// 关闭活动:协议号:3_3(s2c)
message activity_close_s2c {
optional int32 cid = 1; // 活动配置id
}
// 更新动态活动数据:协议号:3_4(s2c)
message activity_update_dynamic_s2c {
required p_dynamic_activity_info activity_info = 1; // 动态活动配置id
}
// 关闭动态活动:协议号:3_5(s2c)
message activity_close_dynamic_s2c {
optional int32 cid = 1; // 动态活动配置id
}
// 活动道具累计奖励领取信息:协议号:3_6(c2s)
message activity_act_acc_info_c2s {
required int64 item_cid = 1; // 道具配表id
required int64 type = 2; // 统计类型,1-获得 2-消耗
required int64 act_cid = 3; // 活动配置id
}
// 活动道具累计奖励领取信息:协议号:3_6(s2c)
message activity_act_acc_info_s2c {
required int64 item_cid = 1; // 道具配表id
required int64 type = 2; // 统计类型,1-获得 2-消耗
required int64 num = 3; // 数量
required int64 act_cid = 4; // 活动配置id
repeated p_activity_item_reward grids = 5; // 格子列表
}
// 领取道具累计奖励:协议号:3_7(c2s)
message activity_get_act_acc_reward_c2s {
required int64 item_cid = 1; // 道具配表id
required int64 type = 2; // 统计类型,1-获得 2-消耗
required int64 act_cid = 3; // 活动配置id
required int64 grid_id = 4; // 格子id
}
// 领取道具累计奖励:协议号:3_7(s2c)
message activity_get_act_acc_reward_s2c {
required int64 item_cid = 1; // 道具配表id
required int64 type = 2; // 统计类型,1-获得 2-消耗
required int64 act_cid = 3; // 活动配置id
required int64 grid_id = 4; // 格子id
}
// 设置活动托管:协议号:3_8(c2s)
message activity_set_up_hosting_c2s {
required int32 activity_cid = 1; // 活动配置ID
}
// 设置活动托管:协议号:3_8(s2c)
message activity_set_up_hosting_s2c {
optional int32 activity_cid = 1; // 活动配置ID
}
// 取消活动托管:协议号:3_9(c2s)
message activity_cancel_hosting_c2s {
required int32 activity_cid = 1; // 活动配置ID
}
// 取消活动托管:协议号:3_9(s2c)
message activity_cancel_hosting_s2c {
optional int32 activity_cid = 1; // 活动配置ID
}
// 客户端处理是否接管活动:协议号:3_10(c2s)
message activity_online_hosting_c2s {
required int32 activity_cid = 1; // 活动配置ID
required bool is_client_hosting = 2; // 是否客户端接管
}
// 客户端处理是否接管活动:协议号:3_10(s2c)
message activity_online_hosting_s2c {
optional int32 activity_cid = 1; // 活动配置ID
optional bool is_client_hosting = 2; // 是否客户端接管
}
// 通知客户端接管活动:协议号:3_90(s2c)
message activity_online_hosting_notify_s2c {
optional int32 activity_cid = 1; // 活动配置ID
}
@@ -0,0 +1,64 @@
// 该文件由工具自动生成,不要手动修改该文件
package project;
// 艾露猫信息
message p_airu_cat_info {
required int64 id = 1; // 唯一id
required int64 cid = 2; // 配表id
required int32 level = 3; // 等级
required int32 star = 4; // 星级
}
// 艾露猫信息:协议号:21_1(c2s)
message airu_cat_info_c2s {
}
// 艾露猫信息:协议号:21_1(s2c)
message airu_cat_info_s2c {
repeated p_airu_cat_info list = 1; // 艾露猫信息列表
}
// 艾露猫激活:协议号:21_2(c2s)
message airu_cat_active_c2s {
required int64 cid = 1; // 配表id
}
// 艾露猫激活:协议号:21_2(s2c)
message airu_cat_active_s2c {
optional p_airu_cat_info info = 1; // 艾露猫信息
}
// 艾露猫重复激活:协议号:21_3(c2s)
message airu_cat_reactive_c2s {
required int64 cid = 1; // 配表id
}
// 艾露猫重复激活:协议号:21_3(s2c)
message airu_cat_reactive_s2c {
}
// 艾露猫升级:协议号:21_4(c2s)
message airu_cat_up_level_c2s {
required int64 id = 1; // 唯一id
}
// 艾露猫升级:协议号:21_4(s2c)
message airu_cat_up_level_s2c {
}
// 艾露猫升星:协议号:21_5(c2s)
message airu_cat_up_star_c2s {
required int64 id = 1; // 唯一id
}
// 艾露猫升星:协议号:21_5(s2c)
message airu_cat_up_star_s2c {
}
// 更新艾露猫信息:协议号:21_6(s2c)
message airu_cat_update_s2c {
required p_airu_cat_info info = 1; // 艾露猫信息
}
@@ -0,0 +1,81 @@
// 该文件由工具自动生成,不要手动修改该文件
package project;
// 建筑信息
message p_building_info {
required int64 id = 1; // 建筑唯一id
required int64 cid = 2; // 建筑cid
required int64 plot_cid = 3; // 建筑地块cid
required int64 level = 4; // 建筑等级
required int64 ts = 5; // 建筑升级时间戳
}
// 建造队列信息
message p_building_queue_info {
required int64 id = 1; // 队列唯一id
required int32 building_id = 2; // 正在占用的建筑id,0表示未占用
}
// 建筑信息:协议号:19_1(c2s)
message building_info_c2s {
}
// 建筑信息:协议号:19_1(s2c)
message building_info_s2c {
repeated p_building_info building_list = 1; // 建筑信息列表
repeated p_building_queue_info queue_list = 2; // 建筑信息列表
}
// 建筑建造:协议号:19_2(c2s)
message building_create_c2s {
required int64 cid = 1; // 建筑cid
required int64 plot_cid = 2; // 地块cid
required int32 type = 3; // 建造类型:1-普通建造;2-立即建造
}
// 建筑建造:协议号:19_2(s2c)
message building_create_s2c {
}
// 建筑升级:协议号:19_3(c2s)
message building_upgrade_c2s {
required int64 id = 1; // 建筑唯一id
required int32 type = 2; // 建造类型:1-普通建造;2-立即升级
}
// 建筑升级:协议号:19_3(s2c)
message building_upgrade_s2c {
}
// 确认建筑升级完成:协议号:19_4(c2s)
message building_confirm_c2s {
required int64 id = 1; // 建筑唯一id
}
// 确认建筑升级完成:协议号:19_4(s2c)
message building_confirm_s2c {
}
// 建筑加速:协议号:19_5(c2s)
message building_accelerate_c2s {
required int64 id = 1; // 建筑唯一id
required int32 type = 2; // 加速类型:1-货币加速
required int32 times = 3; // 加速次数
}
// 建筑加速:协议号:19_5(s2c)
message building_accelerate_s2c {
}
// 建筑更新:协议号:19_7(s2c)
message building_update_building_s2c {
required p_building_info info = 1; // 建筑唯一id
}
// 建筑队列:协议号:19_8(s2c)
message building_update_queue_s2c {
required p_building_queue_info info = 1; // 建筑唯一id
}
@@ -0,0 +1,16 @@
// 该文件由工具自动生成,不要手动修改该文件
package project;
// 作弊指令:协议号:4_1(c2s)
message cheat_cmd_c2s {
required int32 id = 1; // 类型id
required int32 op = 2; // 操作id
optional string args = 3; // 参数
}
// 作弊指令:协议号:4_1(s2c)
message cheat_cmd_s2c {
}
@@ -0,0 +1,58 @@
// 该文件由工具自动生成,不要手动修改该文件
package project;
import "proto_type.proto" ;
// 获取所有客户端信息:协议号:5_1(c2s)
message client_save_get_list_c2s {
repeated string key_list = 1; // key列表
}
// 获取所有客户端信息:协议号:5_1(s2c)
message client_save_get_list_s2c {
repeated p_skv kv_list = 1; // key对应的值列表
}
// 获取客户端信息:协议号:5_2(c2s)
message client_save_get_c2s {
required string key = 1; // key
}
// 获取客户端信息:协议号:5_2(s2c)
message client_save_get_s2c {
optional p_skv value = 1; // key对应的值
}
// 设置客户端信息:协议号:5_3(c2s)
message client_save_set_c2s {
required string key = 1; //
required string value = 2; //
}
// 设置客户端信息:协议号:5_3(s2c)
message client_save_set_s2c {
optional string key = 1; //
}
// 删除客户端信息:协议号:5_4(c2s)
message client_save_delete_c2s {
required string key = 1; //
}
// 删除客户端信息:协议号:5_4(s2c)
message client_save_delete_s2c {
optional string key = 1; //
}
// 设置引导数据:协议号:5_5(c2s)
message client_save_set_guide_c2s {
required string key = 1; //
required string value = 2; //
}
// 设置引导数据:协议号:5_5(s2c)
message client_save_set_guide_s2c {
optional string key = 1; //
}
@@ -0,0 +1,56 @@
// 该文件由工具自动生成,不要手动修改该文件
package project;
import "proto_type.proto" ;
// 赚速信息
message p_earning_speed {
optional int32 obj_type = 1; // 载体类型 1-建筑 2-...
optional int64 obj_uid = 2; // 载体唯一id
optional int32 speed_cid = 3; // 赚速配表id
optional p_scientific_number number = 4; // 当前存储在载体上待获取的累计数量
optional p_scientific_number speed_value = 5; // 赚速
optional int32 last_add_time = 6; // 最后一次增加累计计数的时间,客户可以根据该值开始模拟每秒加数量
optional p_scientific_number storage_limit = 7; // 载体能存储的最大数量
optional int32 settle_type = 8; // 结算类型 1-实时结算 2-储存后手动结算
}
// 请求赚速列表:协议号:16_1(c2s)
message earning_speed_list_c2s {
}
// 请求赚速列表:协议号:16_1(s2c)
message earning_speed_list_s2c {
repeated p_earning_speed list = 1; // 赚速列表
}
// 结算赚速载体累计的数量:协议号:16_2(c2s)
message earning_speed_settlement_c2s {
required int32 obj_type = 1; // 载体类型 1-建筑 2-...
required int64 obj_uid = 2; // 载体唯一id
}
// 结算赚速载体累计的数量:协议号:16_2(s2c)
message earning_speed_settlement_s2c {
optional int32 obj_type = 1; // 载体类型 1-建筑 2-...
optional int64 obj_uid = 2; // 载体唯一id
optional int32 last_add_time = 3; // 最后一次增加累计计数的时间,客户可以根据该值开始模拟每秒加数量
}
// 新增赚速信息通知:协议号:16_90(s2c)
message earning_speed_add_notify_s2c {
optional p_earning_speed info = 1; // 更新的赚速列表
}
// 更新赚速列表通知:协议号:16_91(s2c)
message earning_speed_update_list_notify_s2c {
repeated p_earning_speed list = 1; // 更新的赚速列表
}
// 更新赚速列表通知:协议号:16_92(s2c)
message earning_speed_delete_notify_s2c {
required int32 obj_type = 1; // 载体类型 1-建筑 2-...
required int64 obj_uid = 2; // 载体唯一id
}
@@ -0,0 +1,68 @@
// 该文件由工具自动生成,不要手动修改该文件
package project;
import "proto_type.proto" ;
// 产业信息
message p_industry_info {
required int64 id = 1; // 产业唯一id
required int64 cid = 2; // 产业cid
optional int64 building_id = 3; // 建筑唯一id
optional int64 building_cid = 4; // 建筑cid
required int32 hire_num = 5; // 雇佣猫工数量
repeated p_kv delegation_list = 6; // 委派的艾露猫列表:k-位置;v-艾露猫唯一id
}
// 产业信息:协议号:20_1(c2s)
message industry_info_c2s {
}
// 产业信息:协议号:20_1(s2c)
message industry_info_s2c {
repeated p_industry_info list = 1; // 产业信息列表
}
// 雇佣猫工:协议号:20_2(c2s)
message industry_hire_c2s {
required int64 id = 1; // 产业唯一id
required int32 num = 2; // 雇佣数
}
// 雇佣猫工:协议号:20_2(s2c)
message industry_hire_s2c {
optional int64 id = 1; // 产业唯一id
optional int32 num = 2; // 雇佣数
}
// 委派艾露猫:协议号:20_3(c2s)
message industry_delegate_c2s {
required int64 id = 1; // 产业唯一id
required int64 cat_id = 2; // 艾露猫唯一id
required int32 pos = 3; // 位置
}
// 委派艾露猫:协议号:20_3(s2c)
message industry_delegate_s2c {
optional int64 id = 1; // 产业唯一id
optional int64 cat_id = 2; // 艾露猫唯一id
optional int32 pos = 3; // 位置
}
// 取消委派艾露猫:协议号:20_4(c2s)
message industry_cancel_delegate_c2s {
required int64 id = 1; // 产业唯一id
required int64 cat_id = 2; // 艾露猫唯一id
}
// 取消委派艾露猫:协议号:20_4(s2c)
message industry_cancel_delegate_s2c {
optional int64 id = 1; // 产业唯一id
optional int64 cat_id = 2; // 艾露猫唯一id
}
// 更新产业信息:协议号:20_5(s2c)
message industry_update_s2c {
repeated p_industry_info list = 1; // 产业信息列表
}
@@ -0,0 +1,146 @@
// 该文件由工具自动生成,不要手动修改该文件
package project;
import "proto_type.proto" ;
// 获得/失去道具时展示的列表信息
message p_item_show {
optional int64 item_cid = 1; // 道具配表id
optional int64 number = 2; // 道具数量
optional int64 expired_time = 3; // 道具失效时间
optional bool bind = 4; // 是否绑定
optional int64 item_id = 5; // 道具唯一id,道具不可堆叠时才有值
}
// 使用道具参数
message p_item_use {
optional int64 item_id = 1; // 道具唯一id
optional int64 number = 2; // 道具数量
repeated int64 options = 3; // 可选参数
}
// 出售道具参数
message p_item_sell {
optional int64 item_id = 1; // 道具唯一id
optional int64 number = 2; // 道具数量
}
// 分解道具参数
message p_item_decompose {
optional int64 item_id = 1; // 道具唯一id
optional int64 number = 2; // 道具数量
}
// 服务端自动分解道具参数
message p_item_decompose_auto {
optional int64 item_cid = 1; // 道具配置id
optional int64 number = 2; // 道具数量
}
// 道具列表:协议号:9_1(c2s)
message item_info_c2s {
}
// 道具列表:协议号:9_1(s2c)
message item_info_s2c {
repeated p_item list = 1; // 道具列表
}
// 使用道具:协议号:9_2(c2s)
message item_use_by_id_c2s {
repeated p_item_use list = 1; // 使用的道具列表
}
// 使用道具:协议号:9_2(s2c)
message item_use_by_id_s2c {
}
// 获取道具统计信息:协议号:9_3(c2s)
message item_get_statistics_c2s {
required int64 item_cid = 1; // 道具配表id
required int64 type = 2; // 统计类型,1-获得 2-消耗
optional int64 act_cid = 3; // 活动id
}
// 获取道具统计信息:协议号:9_3(s2c)
message item_get_statistics_s2c {
required int64 item_cid = 1; // 道具配表id
required int64 type = 2; // 统计类型,1-获得 2-消耗
required int64 day = 3; // 每日
required int64 week = 4; // 每周
required int64 month = 5; // 每月
required int64 all = 6; // 总共
optional int64 act_cid = 7; // 活动id
}
// 合成道具:协议号:9_4(c2s)
message item_synthesize_c2s {
required int64 synthesize_cid = 1; // 道具合成配表id
required int32 number = 2; // 合成数量
}
// 合成道具:协议号:9_4(s2c)
message item_synthesize_s2c {
optional int64 synthesize_cid = 1; // 道具合成配表id
optional int32 number = 2; // 合成数量
}
// 出售道具:协议号:9_5(c2s)
message item_sell_by_id_c2s {
repeated p_item_sell list = 1; // 出售的道具列表
}
// 出售道具:协议号:9_5(s2c)
message item_sell_by_id_s2c {
repeated p_item_sell list = 1; // 出售的道具列表
}
// 分解道具:协议号:9_6(c2s)
message item_decompose_by_id_c2s {
repeated p_item_decompose list = 1; // 分解的道具列表
}
// 分解道具:协议号:9_6(s2c)
message item_decompose_by_id_s2c {
repeated p_item_decompose list = 1; // 分解的道具列表
}
// 推送新增道具:协议号:9_90(s2c)
message item_add_s2c {
repeated p_item list = 1; // 道具列表
}
// 推送更新道具:协议号:9_91(s2c)
message item_update_s2c {
repeated p_item list = 1; // 道具列表
}
// 推送删除道具:协议号:9_92(s2c)
message item_delete_s2c {
repeated int64 list = 1; // 道具唯一id列表
}
// 恭喜获得:协议号:9_93(s2c)
message item_gain_show_s2c {
optional int32 source = 1; // 来源
repeated p_item_show list = 2; // 获得的道具信息
optional int64 uid = 3; // 唯一id标识,用于标识多个该协议是否是关联产生的,客户端可以做拼接显示
}
// 失去道具展示:协议号:9_94(s2c)
message item_lose_show_s2c {
optional int32 dest = 1; // 去向
repeated p_item_show list = 2; // 失去的道具信息
}
// 超上限的道具,不能再获得:协议号:9_95(s2c)
message item_limit_s2c {
repeated int64 list = 1; // 道具配置id列表
}
// 自动分解通知:协议号:9_96(s2c)
message item_auto_decompose_notify_s2c {
repeated p_item_decompose_auto list = 1; // 自动分解道具列表
}
@@ -0,0 +1,89 @@
// 该文件由工具自动生成,不要手动修改该文件
package project;
// 登陆的机器信息
message p_machine_info {
required string device = 1; // 登录设备端 android ios web pc
optional string device_name = 2; // 设备名称 三星GT-S5830
optional string did = 3; // 设备id android-IMEI码 IOS-IDFA PC-MAC地址
optional string game_version = 4; // 游戏版本号 1.0.21.10
optional string os = 5; // 手机操作系统 android ios
optional string os_version = 6; // 手机操作系统版本号 2.3.4
optional string screen = 7; // 手机分辨率 480*800
optional string nm = 8; // 联网方式 3G WIFI
optional string mno = 9; // 移动网络运营商 中国移动 中国联通
optional string country = 10; // 国家
required int64 share_server_id = 11; // 分享者的服务器id
required int64 share_id = 12; // 分享者的玩家id
}
// 登陆校验:协议号:1_1(c2s)
message login_auth_c2s {
required string fn_game_id = 1; // 蜂鸟游戏id,前端传送
required string fn_platform = 2; // 蜂鸟平台id,登陆服http请求返回
required string fn_uid = 3; // 蜂鸟账号id,登陆服http请求返回
required string fn_name = 4; // 蜂鸟账号名,登陆服http请求返回
required string fn_ext = 5; // 蜂鸟账号名,登陆服http请求返回
required string token = 6; // 游戏内部token, 登陆服http请求返回
required int32 account_type = 7; // 游戏内部账号类型,登陆服http请求返回
required int32 server_time = 8; // 游戏内部时间戳,登陆服http请求返回
required int32 server_id = 9; // 选择登陆的服务器id
required string client_ip = 10; // 客户端ip
required p_machine_info machine_info = 11; // 设备信息,T后台要求的设备信息
optional string global_data = 12; // 全服通用数据
}
// 登陆校验:协议号:1_1(s2c)
message login_auth_s2c {
optional int64 role_id = 1; // 最近登录的角色,压测机器人用到的
optional string ban_reason = 2; // 封禁原因
optional int64 ban_endtime = 3; // 封禁结束时间
optional int32 is_choose_prof = 4; // 是否玩家自行选择职业 0-否 1-是
optional int32 prof = 5; // 玩家创角面板的随机职业
}
// 创建角色:协议号:1_2(c2s)
message login_create_role_c2s {
optional string name = 1; // 名字
required int32 sex = 2; // 性别 (1-男 2-女)
optional int32 model = 3; // 模型id
optional bool first_role = 4; // 是否账号在游戏的首个角色
optional int32 prof = 5; // 职业id
}
// 创建角色:协议号:1_2(s2c)
message login_create_role_s2c {
optional int64 role_id = 1; // 创角成功的角色id
optional string name = 2; // 名字
optional int32 sex = 3; // 性别 (1-男 2-女)
optional int32 prof = 4; // 职业id
}
// 登陆角色:协议号:1_3(c2s)
message login_login_role_c2s {
required int64 role_id = 1; //
}
// 登陆角色:协议号:1_3(s2c)
message login_login_role_s2c {
optional int64 role_id = 1; // 登陆成功的角色id
optional int64 server_time = 2; // 服务器时间
optional string ban_reason = 3; // 封禁原因
optional int64 ban_endtime = 4; // 封禁结束时间
}
// 掉线重连(需要服务端补发掉线期间协议):协议号:1_4(c2s)
message login_reconnect_c2s {
required int64 role_id = 1; // 角色id
required int32 client_mid = 2; // 客户端序列号
required int32 server_mid = 3; // 服务端序列号
required string token = 4; // 登陆校验时用的token
}
// 掉线重连(需要服务端补发掉线期间协议):协议号:1_4(s2c)
message login_reconnect_s2c {
optional int64 role_id = 1; // 重连成功的角色id
}
@@ -0,0 +1,108 @@
// 该文件由工具自动生成,不要手动修改该文件
package project;
import "proto_type.proto" ;
// 邮件简要信息
message p_mail_simple_info {
optional uint64 id = 1; // 邮件ID
optional string title = 2; // 非配置邮件的标题
optional uint64 cfg_id = 3; // 配置id
optional uint64 global_type = 4; // 公共邮件类型
optional uint64 global_id = 5; // 邮件公共id
repeated p_skv title_args = 6; // 标题参数列表
repeated p_skv sender_name_args = 7; // 发送人参数列表
optional uint32 title_num = 8; // 标题序号0-不需要显示1以上加到标题最后
optional uint64 sex = 9; // 性别
optional uint64 sender_id = 10; // 发送者id
optional string sender_name = 11; // 非配置邮件的发送者名
optional uint64 send_time = 12; // 发送时间
optional uint32 is_read = 13; // 是否已经读取(1已读,0未读)
optional uint32 extract_status = 14; // 附件状态(2有附件已领取,1有附件未领取,0没有)
optional uint64 expired_time = 15; // 过期时间
}
// 邮件附加信息
message p_mail_extend_info {
optional uint64 id = 1; // 邮件ID
optional string content = 2; // 非配置邮件的内容
optional uint64 cfg_id = 3; // 配置id
repeated p_skv content_args = 4; // 内容参数列表
repeated p_item attachments = 5; // 附件
optional string addition = 6; // 额外数据,特殊逻辑
}
// 错误码
message p_mail_code_info {
optional uint64 mail_id = 1; // 邮件ID
optional uint64 code = 2; // 错误码
}
// 请求邮件基本信息:协议号:6_1(c2s)
message mail_simple_info_c2s {
}
// 请求邮件基本信息:协议号:6_1(s2c)
message mail_simple_info_s2c {
repeated p_mail_simple_info infos = 1; // 前端展示的所有邮件
}
// 通知新增邮件:协议号:6_2(s2c)
message mail_add_s2c {
repeated p_mail_simple_info info = 1; // 简要内容
}
// 一键已读:协议号:6_3(c2s)
message mail_one_key_read_c2s {
repeated uint64 ids = 1; // 邮件ID列表
}
// 一键已读:协议号:6_3(s2c)
message mail_one_key_read_s2c {
repeated uint64 ids = 1; // 邮件ID列表
}
// 请求阅读邮件(单个邮件则返回详细内容):协议号:6_4(c2s)
message mail_read_c2s {
required uint64 id = 1; // 邮件ID
}
// 请求阅读邮件(单个邮件则返回详细内容):协议号:6_4(s2c)
message mail_read_s2c {
optional p_mail_extend_info info = 1; // 具体内容
}
// 请求领取附件(包括一键领取):协议号:6_5(c2s)
message mail_get_attachment_c2s {
repeated uint64 ids = 1; // 邮件ID列表
}
// 请求领取附件(包括一键领取):协议号:6_5(s2c)
message mail_get_attachment_s2c {
repeated uint64 ids = 1; // 邮件ID列表
optional uint64 code = 2; // 飘字错误码
repeated p_mail_code_info code_list = 3; // 不飘字错误码列表(前端不使用)
}
// 删除邮件(包括一键删除):协议号:6_6(c2s)
message mail_delete_c2s {
repeated uint64 ids = 1; // 邮件ID列表
}
// 删除邮件(包括一键删除):协议号:6_6(s2c)
message mail_delete_s2c {
repeated uint64 ids = 1; // 邮件ID列表
}
// 主界面红点:协议号:6_7(s2c)
message mail_main_red_s2c {
optional int64 red = 1; // 红点数量
}
// 删除公共邮件:协议号:6_8(s2c)
message mail_delete_global_s2c {
required uint64 global_type = 1; // 公共邮件类型
required uint64 global_id = 2; // 邮件公共id
}
@@ -0,0 +1,68 @@
// 该文件由工具自动生成,不要手动修改该文件
package project;
// 返回服务端登录就绪协议:协议号:7_1(s2c)
message misc_game_start_s2c {
}
// 请求开服时间:协议号:7_2(c2s)
message misc_open_time_c2s {
}
// 请求开服时间:协议号:7_2(s2c)
message misc_open_time_s2c {
required int64 open_time = 1; //
}
// 请求心跳协议:协议号:7_3(c2s)
message misc_heartbeat_c2s {
}
// 请求心跳协议:协议号:7_3(s2c)
message misc_heartbeat_s2c {
required int64 server_time = 1; // 服务器当前时间戳,单位到毫秒
}
// 下发刷天协议(新的一天开始):协议号:7_4(s2c)
message misc_new_day_s2c {
required int32 is_new_week = 1; // 是否新的一周:0-否;1-是
required int32 is_new_month = 2; // 是否新的一个月:0-否;1-是
}
// 广播系统:协议号:7_5(s2c)
message misc_broadcast_s2c {
required int32 id = 1; // 广播ID(对应配置表)
repeated string args = 2; // 参数(都是字符串,如有数字由服务端转)
}
// 计算ping值:协议号:7_6(c2s)
message misc_ping_c2s {
required int64 client_time = 1; //
}
// 计算ping值:协议号:7_6(s2c)
message misc_ping_s2c {
required int64 client_time = 1; //
}
// 兑换激活码:协议号:7_7(c2s)
message misc_act_code_c2s {
required string code = 1; //
}
// 兑换激活码:协议号:7_7(s2c)
message misc_act_code_s2c {
required string code = 1; //
}
// 自定义协议:协议号:7_8(c2s)
message misc_custom_c2s {
}
// 自定义协议:协议号:7_8(s2c)
message misc_custom_s2c {
required string custom_string = 1; // 自定义字符串,需要发什么字符串由客户端决定
}
@@ -0,0 +1,62 @@
// 该文件由工具自动生成,不要手动修改该文件
package project;
import "proto_type.proto" ;
// 功能开启信息:协议号:8_1(c2s)
message open_func_all_c2s {
}
// 功能开启信息:协议号:8_1(s2c)
message open_func_all_s2c {
repeated uint32 pre_list = 1; // 已预开启的配置表id列表
repeated p_kv list = 2; // 已开启的功能配置表id列表
repeated uint32 preview_list = 3; // 已领取的预告奖励
}
// 新增的功能开启——当有更新的时候推送:协议号:8_2(s2c)
message open_func_update_list_s2c {
repeated uint32 open_list = 1; // 新增的功能开启配置表id列表
repeated uint32 close_list = 2; // 关闭的功能开启配置表id列表
}
// 请求玩家功能是否开启:协议号:8_3(c2s)
message open_func_role_info_c2s {
repeated uint64 role_list = 1; // 玩家id列表
required uint32 open_id = 2; // 新增的功能开启配置表id列表
}
// 请求玩家功能是否开启:协议号:8_3(s2c)
message open_func_role_info_s2c {
repeated uint64 open_role_list = 1; // 开启的玩家列表
repeated uint64 close_role_list = 2; // 未开启的玩家列表
required uint32 open_id = 3; // 新增的功能开启配置表id列表
}
// 领取预告奖励:协议号:8_4(c2s)
message open_func_preview_receive_c2s {
required uint32 open_id = 1; // 功能id
}
// 领取预告奖励:协议号:8_4(s2c)
message open_func_preview_receive_s2c {
optional uint32 open_id = 1; // 功能id
}
// 弹窗:协议号:8_5(c2s)
message open_func_pop_up_c2s {
required uint32 open_id = 1; // 功能id
}
// 弹窗:协议号:8_5(s2c)
message open_func_pop_up_s2c {
optional uint32 open_id = 1; // 功能id
}
// 新增的功能预开启——当有更新的时候推送:协议号:8_12(s2c)
message open_func_pre_update_list_s2c {
repeated uint32 open_list = 1; // 新增的预开启配置表id列表
repeated uint32 close_list = 2; // 关闭的预开启配置表id列表
}
@@ -0,0 +1,45 @@
// 该文件由工具自动生成,不要手动修改该文件
package project;
// 猫舍信息
message p_house {
optional int64 house_id = 1; // 猫舍唯一id
optional int64 house_cid = 2; // 猫舍配置id
optional int64 num = 3; // 猫入住数量
}
// 登陆信息:协议号:18_1(c2s)
message population_info_c2s {
}
// 登陆信息:协议号:18_1(s2c)
message population_info_s2c {
repeated p_house list = 1; // 猫舍信息列表
optional int64 cost_num = 2; // 已使用生效猫口
}
// 点击派发猫饭:协议号:18_2(c2s)
message population_kick_food_c2s {
}
// 点击派发猫饭:协议号:18_2(s2c)
message population_kick_food_s2c {
}
// 进猫舍:协议号:18_3(c2s)
message population_enter_house_c2s {
required int64 house_id = 1; // 猫舍唯一id
}
// 进猫舍:协议号:18_3(s2c)
message population_enter_house_s2c {
repeated p_house list = 1; // 更新的猫舍信息列表
}
// 更新已使用生效猫口数:协议号:18_4(s2c)
message population_up_cost_num_s2c {
optional int64 cost_num = 1; // 已使用生效猫口
}
@@ -0,0 +1,96 @@
// 该文件由工具自动生成,不要手动修改该文件
package project;
// 整型key-value结构
message p_kv {
required int64 k = 1; //
required int64 v = 2; //
}
// 字符串key-value结构
message p_skv {
required string k = 1; //
required string v = 2; //
}
// 复合参数结构
message p_v {
optional int64 int_v = 1; // 数值
optional string str_v = 2; // 字符串
optional float float_v = 3; // 浮点
}
// 整型和字符串复合结构
message p_vs {
optional int64 int_v = 1; // 数值
optional string str_v = 2; // 字符串
}
// 整型key-浮点value结构
message p_kf {
required int64 k = 1; //
required float v = 2; //
}
// 整型key-浮点value结构
message p_kvsf {
required int64 k = 1; //
optional int64 int_v = 2; // 数值
optional string str_v = 3; // 字符串
optional float float_v = 4; // 浮点数
}
// 自定义属性信息,property表定义宏,方便后续增加角色属性不用加字段
message p_prop {
required int64 key = 1; //
optional int64 val_int = 2; //
optional string val_str = 3; //
repeated int64 val_int_list = 4; //
repeated string val_str_list = 5; //
repeated p_kv list = 6; //
}
// 头像综合信息
message p_role_head {
optional int64 head_id = 1; // 头像配置id
optional string head_url = 2; // 头像url
optional int64 frame_id = 3; // 头像框配置id
optional int64 sex = 4; // 性别
}
// 玩家自定义属性信息
message p_role_prop {
required int64 role_id = 1; // 玩家id
repeated p_prop prop_list = 2; // 自定义属性列表
}
// 位置
message p_pos {
required int32 x = 1; // x坐标
required int32 y = 2; // y坐标
}
// 道具信息
message p_item {
required int64 item_id = 1; // 道具唯一id
required int64 item_cid = 2; // 道具配表id
required int64 number = 3; // 道具数量
required int64 expired_time = 4; // 道具失效时间
repeated p_item_extra item_extra = 5; // 道具扩展信息
optional bool bind = 6; // 是否绑定
}
// 道具扩展信息
message p_item_extra {
required string key = 1; // 额外属性的key
required p_v value = 2; // 额外属性的value
}
// 科学计数法数值 number * 10^exponent
message p_scientific_number {
required float number = 1; // 数值
required int32 exponent = 2; // 指数
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,87 @@
// 该文件由工具自动生成,不要手动修改该文件
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; // 排行榜信息
}
@@ -0,0 +1,34 @@
// 该文件由工具自动生成,不要手动修改该文件
package project;
// 村庄评级信息:协议号:22_1(c2s)
message rating_info_c2s {
}
// 村庄评级信息:协议号:22_1(s2c)
message rating_info_s2c {
optional int32 rating_cid = 1; // 村庄评级配置id
optional int64 reward_time = 2; // 最后一次领取每日奖励的时间,前端根据该时间判断是否奖励可领
}
// 评级提升:协议号:22_2(c2s)
message rating_upgrade_c2s {
}
// 评级提升:协议号:22_2(s2c)
message rating_upgrade_s2c {
optional int32 rating_cid = 1; // 村庄评级配置id
optional int64 reward_time = 2; // 最后一次领取每日奖励的时间,前端根据该时间判断是否奖励可领
}
// 领取每日奖励:协议号:22_3(c2s)
message rating_daily_reward_c2s {
}
// 领取每日奖励:协议号:22_3(s2c)
message rating_daily_reward_s2c {
optional int64 reward_time = 1; // 最后一次领取每日奖励的时间,前端根据该时间判断是否奖励可领
}
@@ -0,0 +1,34 @@
// 该文件由工具自动生成,不要手动修改该文件
package project;
// 累充档位奖励信息
message p_recharge_acc_grid {
required int64 cid = 1; // 档位id
required int64 is_got = 2; // 领取情况1-已领取
}
// 请求累充信息:协议号:13_1(c2s)
message recharge_acc_info_c2s {
required int64 act_cid = 1; // 活动cid
}
// 请求累充信息:协议号:13_1(s2c)
message recharge_acc_info_s2c {
required int64 act_cid = 1; // 活动cid
required int64 amount = 2; // 累充金额
repeated p_recharge_acc_grid list = 3; // 累充信息列表
}
// 领取累充:协议号:13_2(c2s)
message recharge_acc_get_c2s {
required int64 act_cid = 1; // 活动cid
}
// 领取累充:协议号:13_2(s2c)
message recharge_acc_get_s2c {
required int64 act_cid = 1; // 活动cid
repeated int64 cid = 2; // 档位id
}
@@ -0,0 +1,107 @@
// 该文件由工具自动生成,不要手动修改该文件
package project;
import "proto_type.proto" ;
// 请求玩家信息:协议号:2_1(c2s)
message role_info_c2s {
required int64 role_id = 1; // 角色id
}
// 请求玩家信息:协议号:2_1(s2c)
message role_info_s2c {
optional int64 role_id = 1; // 角色id
repeated p_prop prop_list = 2; // 自定义属性列表
}
// 玩家属性更新:协议号:2_2(s2c)
message role_update_attr_s2c {
optional int64 role_id = 1; // 角色id
repeated p_prop prop_list = 2; // 更新属性信息列表
}
// 踢玩家下线:协议号:2_3(s2c)
message role_kick_out_s2c {
optional string key = 1; // 语言表对应key,如果有该值,则reason没意义
optional string reason = 2; // 踢出原因
}
// 服务器维护:协议号:2_4(s2c)
message role_server_maintenance_s2c {
required int32 kick_out_time = 1; // 玩家t下线的时间
}
// 获取自定义属性:协议号:2_5(c2s)
message role_get_prop_c2s {
required int64 role_id = 1; // 玩家id
required int32 key = 2; // 自定义属性列key
}
// 获取自定义属性:协议号:2_5(s2c)
message role_get_prop_s2c {
optional int64 role_id = 1; // 玩家id
optional p_prop prop = 2; // 自定义属性列
}
// 获取自定义属性列表:协议号:2_6(c2s)
message role_get_prop_list_c2s {
required int64 role_id = 1; // 玩家id
repeated int64 key_list = 2; // 自定义属性列key表
}
// 获取自定义属性列表:协议号:2_6(s2c)
message role_get_prop_list_s2c {
optional int64 role_id = 1; // 玩家id
repeated p_prop prop_list = 2; // 自定义属性列表
}
// 角色改名:协议号:2_7(c2s)
message role_rename_c2s {
required string name = 1; // 修改后名字
}
// 角色改名:协议号:2_7(s2c)
message role_rename_s2c {
optional string name = 1; // 修改后名字
}
// 修改性别:协议号:2_8(c2s)
message role_set_sex_c2s {
required uint32 sex = 1; // 性别:1-男;2-女
}
// 修改性别:协议号:2_8(s2c)
message role_set_sex_s2c {
optional uint32 sex = 1; // 性别
}
// 头衔提升:协议号:2_9(c2s)
message role_title_up_c2s {
}
// 头衔提升:协议号:2_9(s2c)
message role_title_up_s2c {
optional uint32 title_cid = 1; // 头衔配表id
}
// 修改职业:协议号:2_10(c2s)
message role_set_prof_c2s {
required uint32 prof = 1; // 职业 0-无 1-剑客 2-法师 3-射手
}
// 修改职业:协议号:2_10(s2c)
message role_set_prof_s2c {
optional uint32 prof = 1; // 职业 0-无 1-剑客 2-法师 3-射手
}
// 开始引导:协议号:2_11(s2c)
message role_guide_start_s2c {
optional int64 guide_id = 1; // 引导配置id
}
// 引导结束:协议号:2_12(s2c)
message role_guide_finish_s2c {
optional int64 guide_id = 1; // 引导配置id
}
@@ -0,0 +1,59 @@
// 该文件由工具自动生成,不要手动修改该文件
package project;
// 头像、头像框、聊天气泡
message p_role_decorate_info {
required int64 decorate_id = 1; // 配置Id
required int32 type = 2; // 类型:1-头像;2-头像框;3-聊天气泡
required int64 item_cid = 3; // 相应道具的配置Id
required int64 expired_time = 4; // 过期时间,0-表示永久
optional int64 custom_head_id = 5; // 自定义头像id
optional int64 rcc_status = 6; // 风控审核状态
optional string head_url = 7; // 自定义头像url
required int32 flag = 8; // 0-未穿戴;1-已穿戴
}
// 信息:协议号:17_1(c2s)
message role_decorate_info_c2s {
}
// 信息:协议号:17_1(s2c)
message role_decorate_info_s2c {
repeated p_role_decorate_info list = 1; // 列表
required int64 upload_vx_head_cnt = 2; // 今日同步微信头像次数
optional int64 pre_custom_head_id = 3; // 预穿戴自定义头像id
}
// 更新信息:协议号:17_2(s2c)
message role_decorate_update_s2c {
required p_role_decorate_info info = 1; // 信息
required int64 upload_vx_head_cnt = 2; // 今日同步微信头像次数
}
// 删除:协议号:17_3(s2c)
message role_decorate_delete_s2c {
required int64 decorate_id = 1; // 配置Id
required int64 custom_head_id = 2; // 自定义头像id
}
// 穿戴:协议号:17_4(c2s)
message role_decorate_put_on_c2s {
required int64 decorate_id = 1; // 配置Id
required int64 custom_head_id = 2; // 头像id
}
// 穿戴:协议号:17_4(s2c)
message role_decorate_put_on_s2c {
}
// 上传自定义头像url, 目前默认微信头像,后续加type:协议号:17_5(c2s)
message role_decorate_upload_custom_head_c2s {
required string url = 1; // 头像url
}
// 上传自定义头像url, 目前默认微信头像,后续加type:协议号:17_5(s2c)
message role_decorate_upload_custom_head_s2c {
}
@@ -0,0 +1,15 @@
// 该文件由工具自动生成,不要手动修改该文件
package project;
// 每日杀怪掉落鲜肉数量:协议号:15_1(c2s)
message role_reward_kill_mon_drop_c2s {
}
// 每日杀怪掉落鲜肉数量:协议号:15_1(s2c)
message role_reward_kill_mon_drop_s2c {
required int64 cnt = 1; // 数量
required int64 max = 2; // 数量上限
}
@@ -0,0 +1,27 @@
// 该文件由工具自动生成,不要手动修改该文件
package project;
import "proto_type.proto" ;
// 设置:协议号:11_1(c2s)
message setting_info_c2s {
}
// 设置:协议号:11_1(s2c)
message setting_info_s2c {
repeated p_kv settings = 1; // 设置列表
}
// 切换按钮:协议号:11_2(c2s)
message setting_switch_c2s {
optional int64 id = 1; // 设置id
optional int32 status = 2; // 状态1-打开0-关闭
}
// 切换按钮:协议号:11_2(s2c)
message setting_switch_s2c {
optional int64 id = 1; // 设置id
optional int32 status = 2; // 状态1-打开0-关闭
}
@@ -0,0 +1,112 @@
// 该文件由工具自动生成,不要手动修改该文件
package project;
// 分天奖励
message p_day_reward {
optional int64 day = 1; // 天
optional int64 is_got = 2; // 1-已领取0-未领取
}
// 商品购买信息
message p_shop_goods {
required int64 goods_cid = 1; // 商品配置id
required int64 buy_count = 2; // 购买次数 每日限购指的每日购买次数,其他以此类推
optional int64 last_buy_time = 3; // 最后购买时间(用于有购买cd的商品)
optional int32 goods_discount = 4; // 商品折扣,几折就传几(目前仅用于典礼商店)
repeated int64 reward_ids = 5; // 物品组id
optional int64 extract_time = 6; // 领取时间,通行证类使用
optional int64 expired_time = 7; // 过期时间
optional int64 bowl_num = 8; // 聚宝盆累计获得抽奖券数
repeated p_day_reward day_rewards = 9; // 分天奖励信息列表
}
// 请求玩家商品购买信息:协议号:12_1(c2s)
message shop_info_c2s {
}
// 请求玩家商品购买信息:协议号:12_1(s2c)
message shop_info_s2c {
optional int64 is_update = 1; // 是否更新部分1-是
repeated p_shop_goods list = 2; // 商品购买信息列表,指返回有购买过的商品
}
// 请求购买商品:协议号:12_2(c2s)
message shop_buy_c2s {
required int64 goods_cid = 1; // 商品配置id
required int32 number = 2; // 商品配置id
}
// 请求购买商品:协议号:12_2(s2c)
message shop_buy_s2c {
optional int32 code = 1; // 0-表示需要发起蜂鸟充值 1-表示服务器已经用代币等完成充值 / 购买非充值道具直接看p_shop_goods
optional string callback_info = 2; // 发起蜂鸟充值,callback_info字段的值
optional int32 server_id = 3; // 服务器id
optional p_shop_goods shop_goods = 4; // 商品购买信息
}
// 保存自选商品:协议号:12_3(c2s)
message shop_save_custom_goods_c2s {
required int64 goods_cid = 1; // 商品配置id
repeated int64 reward_ids = 2; // 物品组id
}
// 保存自选商品:协议号:12_3(s2c)
message shop_save_custom_goods_s2c {
optional int64 goods_cid = 1; // 商品配置id
repeated int64 reward_ids = 2; // 物品组id
}
// 获取通行证类奖励:协议号:12_4(c2s)
message shop_get_passport_reward_c2s {
required int64 goods_cid = 1; // 商品配置id
}
// 获取通行证类奖励:协议号:12_4(s2c)
message shop_get_passport_reward_s2c {
optional int64 goods_cid = 1; // 商品配置id
optional int64 extract_time = 2; // 领取时间
}
// 手动刷新典礼商店商品折扣:协议号:12_5(c2s)
message shop_refresh_discount_c2s {
}
// 手动刷新典礼商店商品折扣:协议号:12_5(s2c)
message shop_refresh_discount_s2c {
optional int64 next_refresh_time = 1; // 下次刷新时间戳
repeated p_shop_goods list = 2; // 典礼商店商品购买信息列表
}
// 手动刷新典礼商店商品折扣时间:协议号:12_6(c2s)
message shop_refresh_discount_time_c2s {
}
// 手动刷新典礼商店商品折扣时间:协议号:12_6(s2c)
message shop_refresh_discount_time_s2c {
optional int64 refresh_time = 1; // 刷新时间戳
}
// 推送礼包:协议号:12_7(c2s)
message shop_push_gift_c2s {
required int64 gift_id = 1; // 礼包id
}
// 推送礼包:协议号:12_7(s2c)
message shop_push_gift_s2c {
required int64 gift_id = 1; // 礼包id
}
// 分天领取奖励:协议号:12_8(c2s)
message shop_day_get_c2s {
required int64 goods_cid = 1; // 商品配置id
required int64 day = 2; // 天
}
// 分天领取奖励:协议号:12_8(s2c)
message shop_day_get_s2c {
required int64 goods_cid = 1; // 商品配置id
required int64 day = 2; // 天
}
+536
View File
@@ -0,0 +1,536 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt "
xmlns:user="whatever ">
<!-- 对type的处理 -->
<xsl:template match="type" name="type">
<xsl:param name="section_id"/>
<xsl:if test="count(.) > 0">
<div class="type">
<h3>类型:
<xsl:value-of select="@name"/> (<xsl:value-of select="@desc"/>)
<xsl:if test="$section_id > 0">
<a class="backToIndex" target="_self">
<xsl:attribute name="href">#<xsl:value-of select="$section_id"/>
</xsl:attribute>回分类头部
</a>
</xsl:if>
<a class="backToIndex" href="#index" target="_self">回目录</a>
</h3>
<table cellspacing="0">
<tr>
<th width="80px">类型</th>
<th width="80px">注解</th>
<th width="80px">名称</th>
<th>描述</th>
</tr>
<xsl:for-each select="*">
<tr>
<td>
<xsl:if test="substring(@t,0,3) = 'p_'">
<a>
<xsl:attribute name="href">#<xsl:value-of select="@t"/>
</xsl:attribute>
<xsl:value-of select="@t"/>
</a>
</xsl:if>
<xsl:if test="substring(@t,0,3) != 'p_'">
<xsl:value-of select="@t"/>
</xsl:if>
</td>
<xsl:if test="name(.) = 'r'">
<td>必填</td>
</xsl:if>
<xsl:if test="name(.) = 'o'">
<td>可选</td>
</xsl:if>
<xsl:if test="name(.) = 'loop'">
<td>循环</td>
</xsl:if>
<td>
<xsl:value-of select="@name"/>
</td>
<td>
<xsl:value-of select="@desc"/>
</td>
</tr>
</xsl:for-each>
</table>
</div>
</xsl:if>
</xsl:template>
<!-- 对msg.c2s的处理 -->
<xsl:template match="c2s" name="msg_c2s">
<xsl:param name="sectionName"/>
<xsl:param name="subsectionName"/>
<div class="msg_c2s">
<h1>C->S:(<xsl:value-of select="$sectionName"/>_<xsl:value-of select="$subsectionName"/>_c2s)
</h1>
<table cellspacing="0">
<tr>
<th width="80px">类型</th>
<th width="80px">注解</th>
<th width="80px">名称</th>
<th>描述</th>
</tr>
<!-- 判断是否包含字段 -->
<xsl:choose>
<xsl:when test="count(./*) = 0">
<tr>
<td colspan="4">无字段</td>
</tr>
</xsl:when>
<xsl:otherwise>
<xsl:for-each select="*">
<tr>
<td>
<xsl:if test="substring(@t,0,3) = 'p_'">
<a>
<xsl:attribute name="href">#<xsl:value-of select="@t"/>
</xsl:attribute>
<xsl:value-of select="@t"/>
</a>
</xsl:if>
<xsl:if test="substring(@t,0,3) != 'p_'">
<xsl:value-of select="@t"/>
</xsl:if>
</td>
<xsl:if test="name(.) = 'r'">
<td>必填</td>
</xsl:if>
<xsl:if test="name(.) = 'o'">
<td>可选</td>
</xsl:if>
<xsl:if test="name(.) = 'loop'">
<td>循环</td>
</xsl:if>
<td>
<xsl:value-of select="@name"/>
</td>
<td>
<xsl:value-of select="@desc"/>
</td>
</tr>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
</table>
<br/>
</div>
</xsl:template>
<!-- 对msg.s2c的处理 -->
<xsl:template match="s2c" name="msg_s2c">
<xsl:param name="sectionName"/>
<xsl:param name="subsectionName"/>
<div class="msg_s2c">
<h1>S->C:(<xsl:value-of select="$sectionName"/>_<xsl:value-of select="$subsectionName"/>_s2c)
</h1>
<br/>
<table cellspacing="0">
<tr>
<th width="80px">类型</th>
<th width="80px">注解</th>
<th width="80px">名称</th>
<th>描述</th>
</tr>
<!-- 判断是否包含字段 -->
<xsl:choose>
<xsl:when test="count(./*) = 0">
<tr>
<td colspan="4">无字段</td>
</tr>
</xsl:when>
<xsl:otherwise>
<xsl:for-each select="*">
<tr>
<td>
<xsl:if test="substring(@t,0,3) = 'p_'">
<a>
<xsl:attribute name="href">#<xsl:value-of select="@t"/>
</xsl:attribute>
<xsl:value-of select="@t"/>
</a>
</xsl:if>
<xsl:if test="substring(@t,0,3) != 'p_'">
<xsl:value-of select="@t"/>
</xsl:if>
</td>
<xsl:if test="name(.) = 'r'">
<td>必填</td>
</xsl:if>
<xsl:if test="name(.) = 'o'">
<td>可选</td>
</xsl:if>
<xsl:if test="name(.) = 'loop'">
<td>循环</td>
</xsl:if>
<td>
<xsl:value-of select="@name"/>
</td>
<td>
<xsl:value-of select="@desc"/>
</td>
</tr>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
</table>
</div>
</xsl:template>
<!-- 匹配整个xml -->
<xsl:template match="/">
<html>
<style type="text/css">
.type {
margin:10px;
}
.type table{
border:1px solid #99ccff;
}
.type td{
padding:3px;
border-bottom:1px solid #99ccff;
border-right:1px solid #99ccff;
border-left:1px solid #99ccff;
}
.type th{
padding:4px;
background-color:#99ccff;
}
.msg {
margin:20px 5px 10px;
}
.msg .id{
color:#208822;
font-weight:bold;
margin-right:8px;
}
.msg .desc{
font-weight:bold;
margin-right:8px;
}
.msg_c2s {
margin-top:3px;
margin-left:10px;
}
.msg_c2s h1{
font-size:15px;
font-weight:bold;
color:#339900;
}
.msg_c2s table{
border:1px solid #66cc00;
}
.msg_c2s td{
padding:3px;
border-bottom:1px solid #66cc00;
border-right:1px solid #66cc00;
border-left:1px solid #66cc00;
}
.msg_c2s th{
padding:4px;
background-color:#66cc00;
}
.msg_s2c {
margin-top:3px;
margin-left:10px;
}
.msg_s2c h1{
font-size:15px;
font-weight:bold;
color:#ff6600;
margin:0;
padding:0;
}
.msg_s2c table{
border:1px solid #ff9900;
}
.msg_s2c td{
padding:3px;
border-bottom:1px solid #ff9900;
border-right:1px solid #ff9900;
border-left:1px solid #ff9900;
}
.msg_s2c th{
padding:4px;
background-color:#ff9900;
}
.loopTd td{
padding:2px;
padding-left:20px;
color:#990033;
}
.backToIndex{
margin-left:30px;
text-decoration:none;
color:#208822;font-weight:bold;margin-right:8px; border:1px solid #666633;
}
.index_title{
text-decoration:none;
padding:0px;
margin:1px; margin-top:3px;
font-size:16px;font-weight:bold;
color:#700023;font-weight:bold;margin-right:8px;
}
.index_item{
padding:0px; padding-left:20px;
margin:1px;
}
.index_item a{
text-decoration:none;
font-size:12px;
color:#3a54a3;font-weight:normal;margin-right:8px;
}
.index_item span{
color:#503e53;font-weight:normal;margin-left:5px;
}
</style>
<body>
<h1>协议文档</h1>
<h2>协议说明</h2>
<div>
<p>
[c2s]=>
[2字节包长]+[2字节Uiq(自增序列)65535之后,变为100 ]+[1字节SectionId]+[1字节MethodId]+[body数据]
<br/>
[s2c]=>
[2字节包长]+[1字节SectionId]+[1字节MethodId]+[1字节Zip,1表示进行了压缩,0表示没有压缩]+[body数据]
<br/>
所有数据采用big-endian(网络字节序号)
</p>
<p>
可以使用的基本类型
<br/>
int32:
<br/>
uint32:
<br/>
int64:
<br/>
uint64:
<br/>
double:
<br/>
string:
<br/>
bool:
<br/>
bytes:
<br/>
loop节点表示里面内容进行循环(protobuff 中的repeated类型)
<br/>
</p>
<p>
对于请求(c2s)的应答(s2c),直接将请求中的序列号返回。对于服务器主动
推送的数据的,序列号为0
</p>
<p>
section 表明消息分类,type属性为此类消息的标识
<br/>
msg 为具体的一个消息,包含c2s(请求)和s2c(应答),有些消息包含一个请求一个 应答,有的消息没有请求只有应答(服务器推送)。
<br/>
c2s为请求,id为消息id,&lt;f&gt;为对应的字段。
<br/>
s2c为应答,id为消息id,&lt;f&gt;定义同c2s。
</p>
<p>
<b>定义协议时推荐字段顺序(从上到下):</b>
<ol>
<li>基本类型(int, string)</li>
<li>自定义类型</li>
<li>loop</li>
</ol>
这样效率会比较高!
</p>
<p>
<b>属性id映射表</b>
<ul>
<li>1 - 体质</li>
</ul>
</p>
</div>
<a name="index"/>
<!--目录处理 -->
<div style="background-color:#eeeeee; width:600px; padding:10px; padding-left:20px;">
<h2>目录</h2>
<!--自定义结构-->
<a class="index_title" target="_self">
自定义结构
</a>
<xsl:for-each select="protocol/custom_type/type">
<xsl:variable name="struct_name" select="@name">
</xsl:variable>
<p class="index_item">
<a>
<xsl:attribute name="href">#<xsl:value-of select="$struct_name"/>
</xsl:attribute>
自定义结构:[
<xsl:value-of select="@desc"/>]
<span>
----------------[<xsl:value-of select="$struct_name"/>]
</span>
</a>
</p>
</xsl:for-each>
<xsl:for-each select="protocol/section">
<a class="index_title" target="_self">
<xsl:attribute name="href">#<xsl:value-of select="@id"/>
</xsl:attribute>
<xsl:value-of select="@desc"/>
分类Id:<xsl:value-of select="@id"/>
</a>
<xsl:variable name="section_id" select="@id">
</xsl:variable>
<!-- 显示自定义结构 -->
<xsl:for-each select="type">
<xsl:variable name="struct_name" select="@name">
</xsl:variable>
<p class="index_item">
<a>
<xsl:attribute name="href">#<xsl:value-of select="$struct_name"/>
</xsl:attribute>
自定义结构:[
<xsl:value-of select="@desc"/>]
<span>
----------------[<xsl:value-of select="$struct_name"/>]
</span>
</a>
</p>
</xsl:for-each>
<!-- 显示消息 -->
<xsl:for-each select="msg">
<xsl:variable name="sub_id" select="@id">
</xsl:variable>
<p class="index_item">
<a>
<xsl:attribute name="href">#<xsl:value-of select="$section_id * 1000 + $sub_id"/>
</xsl:attribute>
(<xsl:value-of select="$section_id"/>-<xsl:value-of select="@id"/>)
<xsl:value-of select="@desc"/>
<span>
----------------[<xsl:value-of select="$section_id * 1000 + $sub_id"/>]
</span>
</a>
</p>
</xsl:for-each>
</xsl:for-each>
</div>
<!--关于自定义协议 -->
<xsl:for-each select="protocol/custom_type/type">
<xsl:variable name="struct_name" select="@name"></xsl:variable>
<a>
<xsl:attribute name="name">
<xsl:value-of select="$struct_name"/>
</xsl:attribute>
<xsl:attribute name="id">
<xsl:value-of select="$struct_name"/>
</xsl:attribute>
</a>
<xsl:call-template name="type">
<xsl:with-param name="section_id">0</xsl:with-param>
</xsl:call-template>
</xsl:for-each>
<!--关于各个协议部分 -->
<xsl:for-each select="protocol/section">
<a>
<xsl:attribute name="name">
<xsl:value-of select="@id"/>
</xsl:attribute>
<xsl:attribute name="id">
<xsl:value-of select="@id"/>
</xsl:attribute>
</a>
<h2>
<xsl:value-of select="@desc"/>
分类Id:<xsl:value-of select="@id"/>(<xsl:value-of select="@name"/>)
</h2>
<xsl:variable name="section_id" select="@id"></xsl:variable>
<xsl:variable name="sectionName" select="@name"></xsl:variable>
<xsl:for-each select="*">
<xsl:choose>
<!-- 自定义协议 -->
<xsl:when test="name(.) = 'type'">
<xsl:variable name="struct_name" select="@name"></xsl:variable>
<a>
<xsl:attribute name="name">
<xsl:value-of select="$struct_name"/>
</xsl:attribute>
<xsl:attribute name="id">
<xsl:value-of select="$struct_name"/>
</xsl:attribute>
</a>
<xsl:call-template name="type">
<xsl:with-param name="section_id"><xsl:value-of select="$section_id"/></xsl:with-param>
</xsl:call-template>
</xsl:when>
<!-- 消息定义 -->
<xsl:when test="name(.) = 'msg'">
<xsl:variable name="sub_id" select="@id"></xsl:variable>
<xsl:variable name="subsectionName" select="@name"></xsl:variable>
<a>
<xsl:attribute name="name">
<xsl:value-of select="$section_id * 1000 + $sub_id"/>
</xsl:attribute>
<xsl:attribute name="id">
<xsl:value-of select="$section_id * 1000 + $sub_id"/>
</xsl:attribute>
</a>
<div class="msg">ID:
<span class="id">(<xsl:value-of select="$section_id"/>-<xsl:value-of select="@id"/>)
</span>
<span class="id">(<xsl:value-of select="@name"/>)
</span>
<span class="desc">
<xsl:value-of select="@desc"/>
</span>
<a class="backToIndex" target="_self">
<xsl:attribute name="href">#<xsl:value-of select="$section_id"/>
</xsl:attribute>
回分类头部
</a>
<a class="backToIndex" href="#index" target="_self">回目录</a>
<xsl:for-each select="*">
<xsl:choose>
<!-- 处理c2s -->
<xsl:when test="name(.) ='c2s'">
<xsl:call-template name="msg_c2s">
<xsl:with-param name="sectionName" select="$sectionName"/>
<xsl:with-param name="subsectionName" select="$subsectionName"/>
</xsl:call-template>
</xsl:when>
<!-- 处理s2c -->
<xsl:when test="name(.) ='s2c'">
<xsl:call-template name="msg_s2c">
<xsl:with-param name="sectionName" select="$sectionName"/>
<xsl:with-param name="subsectionName" select="$subsectionName"/>
</xsl:call-template>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</div>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
@@ -0,0 +1,30 @@
// 该文件由工具自动生成,不要手动修改该文件
package project;
import "proto_type.proto" ;
// 跑马灯信息
message p_ticker {
required int64 ticker_id = 1; // 跑马灯唯一id
required int64 ticker_cid = 2; // 跑马灯配置id
repeated p_skv args = 3; // 参数
repeated p_ticker_period period = 4; // 跑马灯周期
}
// 格位信息
message p_ticker_period {
required int64 start_time = 1; // 开始时间
required int64 end_time = 2; // 结束时间
}
// 请求信息:协议号:14_1(c2s)
message ticker_info_c2s {
}
// 请求信息:协议号:14_1(s2c)
message ticker_info_s2c {
required int64 is_all = 1; // 1-全推0-推更新
repeated p_ticker list = 2; // 数据列表
}