初始化提交
This commit is contained in:
37
Proto/ServerClient/sources/action.proto
Normal file
37
Proto/ServerClient/sources/action.proto
Normal file
@@ -0,0 +1,37 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option go_package = "common/proto/sc/sc_pb";
|
||||
import "sc_common.proto";
|
||||
|
||||
// MESSAGE_ID_ENTER_INSTANCE
|
||||
message C2S_EnterInstance {
|
||||
int32 InstanceID = 1;
|
||||
}
|
||||
message S2C_EnterInstance {
|
||||
PositionInfo Info = 1;
|
||||
}
|
||||
|
||||
// MESSAGE_ID_ACTION
|
||||
enum ActionID {
|
||||
ACTION_ID_INVALID = 0;
|
||||
ACTION_ID_MOVE = 1; // 移动
|
||||
ACTION_ID_ATTACK = 2; // 攻击
|
||||
}
|
||||
message C2S_Action {
|
||||
uint32 Sequence = 1; // 指令序号
|
||||
int64 Timestamp = 2; // 时间戳(毫秒)
|
||||
ActionID Action = 3; // 指令ID
|
||||
sint32 DirX = 4; // 移动-X方向(×100 缩放)
|
||||
sint32 DirY = 5; // 移动-Y方向(×100 缩放)
|
||||
int32 SkillID = 6; // 攻击-技能ID
|
||||
}
|
||||
|
||||
// MESSAGE_ID_POSITION
|
||||
message PositionInfo {
|
||||
int64 USN = 1;
|
||||
sint32 X = 2;
|
||||
sint32 Y = 3;
|
||||
}
|
||||
message S2C_Position {
|
||||
repeated PositionInfo Info = 1;
|
||||
}
|
||||
19
Proto/ServerClient/sources/define.proto
Normal file
19
Proto/ServerClient/sources/define.proto
Normal file
@@ -0,0 +1,19 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option go_package = "common/proto/sc/sc_pb";
|
||||
import "sc_common.proto";
|
||||
|
||||
enum MessageID {
|
||||
MESSAGE_ID_INVALID = 0;
|
||||
MESSAGE_ID_KICK_OUT = 1; // 服务器踢人
|
||||
MESSAGE_ID_QUEUE_UP = 2; // 排队中
|
||||
MESSAGE_ID_LOGIN_SUCCESS = 3; // 登录成功
|
||||
MESSAGE_ID_ENTER_INSTANCE = 101; // 进入副本
|
||||
MESSAGE_ID_ACTION = 102; // 指令
|
||||
MESSAGE_ID_POSITION = 103; // 位置更新
|
||||
}
|
||||
|
||||
message Message {
|
||||
MessageID ID = 1;
|
||||
bytes Payload = 2;
|
||||
}
|
||||
3
Proto/ServerClient/sources/sc_common.proto
Normal file
3
Proto/ServerClient/sources/sc_common.proto
Normal file
@@ -0,0 +1,3 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option go_package = "common/proto/sc/sc_common";
|
||||
27
Proto/ServerClient/sources/service.proto
Normal file
27
Proto/ServerClient/sources/service.proto
Normal file
@@ -0,0 +1,27 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option go_package = "common/proto/sc/sc_pb";
|
||||
import "sc_common.proto";
|
||||
|
||||
// MESSAGE_ID_KICK_OUT
|
||||
enum KickOutID {
|
||||
KICK_OUT_ID_INVALID = 0;
|
||||
KICK_OUT_ID_DUPLICATE_LOGIN = 1; // 重复登录
|
||||
KICK_OUT_ID_SERVER_BUSY = 2; // 服务器繁忙
|
||||
KICK_OUT_ID_SERVER_CLOSE = 3; // 服务器关闭
|
||||
KICK_OUT_ID_QUEUE_UP_FULL = 4; // 排队上限
|
||||
KICK_OUT_ID_TOKEN_INVALID = 5; // Token无效
|
||||
}
|
||||
message S2C_KickOut {
|
||||
KickOutID ID = 1;
|
||||
}
|
||||
|
||||
// MESSAGE_ID_QUEUE_UP
|
||||
message S2C_QueueUp {
|
||||
int32 QueueUpCount = 1; // 排队人数
|
||||
}
|
||||
|
||||
// MESSAGE_ID_LOGIN_SUCCESS
|
||||
message S2C_LoginSuccess {
|
||||
int32 InstanceID = 1; // 副本ID
|
||||
}
|
||||
Reference in New Issue
Block a user