feat 协议

This commit is contained in:
2025-12-17 09:57:50 +08:00
parent 65bd1e5477
commit efa9f50d3e
11 changed files with 1999 additions and 81 deletions

View File

@@ -5,6 +5,7 @@ import "ss_common.proto";
service Scene {
rpc Enter(EnterReq) returns (EnterResp) {}
rpc Leave(LeaveReq) returns (LeaveResp) {}
rpc Action(stream ActionReq) returns (ActionResp) {}
}
@@ -17,13 +18,27 @@ message EnterReq {
message EnterResp {
int64 SceneSID = 1; // 场景服务ID
int64 UniqueNo = 2; // 副本唯一编号
int32 MessageID = 3; // 发送给客户端的消息ID
bytes Payload = 4; // 消息负载
}
message LeaveReq {
int32 UID = 1; // 用户ID
int64 GatewaySID = 2; // 网关服务ID
int32 InstanceID = 3; // 副本ID
int64 UniqueNo = 4; // 副本唯一编号
}
message LeaveResp {
}
message ActionReq {
int64 UniqueNo = 1; // 副本唯一编号
int32 UID = 2; // 用户ID
int32 Action = 3; // 动作ID
bytes Payload = 4; // 动作数据
int32 Action = 3; // 指令ID
sint32 DirX = 4; // 移动-X方向×1000 缩放)
sint32 DirY = 5; // 移动-Y方向×1000 缩放)
int32 SkillID = 6; // 攻击-技能ID
}
message ActionResp {