60 lines
1.2 KiB
Protocol Buffer
60 lines
1.2 KiB
Protocol Buffer
syntax = "proto3";
|
|
package Fantasy.Network.Message;
|
|
|
|
|
|
// 协议分为:
|
|
// ProtoBuf:可以在Outer和Inner文件里使用。
|
|
// MemoryPack:可以在Outer和Inner文件里使用。
|
|
// Bson:仅支持在Inner文件里使用。
|
|
// 使用方式:
|
|
// 在message协议上方添加// Protocol+空格+协议名字
|
|
// 例如:// Protocol ProtoBuf 或 // Protocol MemoryPack
|
|
message C2A_LoginRequest // IRequest,A2C_LoginResponse
|
|
{
|
|
string Username = 1;
|
|
string Password = 2;
|
|
int32 LoginType = 3; //登录方式
|
|
int32 Region = 4; //登录地区,如果是注册,则必须传入
|
|
}
|
|
message A2C_LoginResponse // IResponse
|
|
{
|
|
string ToKen = 1;
|
|
}
|
|
|
|
/// 客户端登录到Gate服务器
|
|
message C2G_LoginRequest // IRequest,G2C_LoginResponse
|
|
{
|
|
string ToKen = 1;
|
|
}
|
|
message G2C_LoginResponse // IResponse
|
|
{
|
|
int64 RoleId = 1;
|
|
}
|
|
|
|
|
|
|
|
/// 通知客户端重复登录
|
|
message G2C_RepeatLogin // IMessage
|
|
{
|
|
|
|
}
|
|
|
|
|
|
/// 通知客户端切换地图
|
|
message G2C_ChangeMap // IMessage
|
|
{
|
|
int32 MapId = 1; //地图id
|
|
int32 Node = 2; //站位节点
|
|
}
|
|
|
|
|
|
message C2Game_GetRoleInfoRequest // ICustomRouteRequest,Game2C_GetRoleInfoResponse,GameRoute
|
|
{
|
|
|
|
}
|
|
|
|
message Game2C_GetRoleInfoResponse // ICustomRouteResponse
|
|
{
|
|
RoleInfo RoleInfo = 1; //账号信息
|
|
int64 RoomId = 2; //所在房间
|
|
} |