ProtoTools/proto/external.proto
2020-10-22 15:52:53 +08:00

62 lines
2.2 KiB
Protocol Buffer
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.junyou.common.protocol;
import "as3options.proto";
import "external-common.proto";
//登录
message Login_C2S{
option (as3.m_package) = "huaqiangu.login";
option (as3.m_cmd) = 2000;
option (as3.m_cmd) = 2001;
required string platformAccount=1;//平台用户账号
required string roleCreateGlobalServerId=2;//玩家角色创建的全局服务器id
required bool chenmi=3;//该用户是否需要开启防沉迷
required string sign=4;//验证字符串 md5 以及时间戳,拼在一起
required bool weiduan=5;//是否使用登录器登录true为用登录器登录false为没有用登录器登录的
optional string parameter=6;//服务器需要的其他参数
}
//登录成功
message LoginSuccess_S2C{
option (as3.m_package) = "huaqiangu.login";
required int32 retStatus=1;
optional ServerInfoVO serverInfo=2;
optional ChooseRoleVO roleVO=3;//数据为空 标示没有角色,客户端发送创建角色指令
optional int64 chenmiTime=4;//防沉迷时间
optional string clientIp=5;//客户端IP
}
//登录失败
message LoginFail_S2C{
option (as3.m_package) = "huaqiangu.login";
required int32 retStatus=1;
required int32 msgCode=2;
repeated string parameter=3;//code相关参数
}
//创建角色并进入游戏
message CreateRole_C2S{
option (as3.m_package) = "huaqiangu.login";
required string name=1;//角色名字
required int32 configId=2;//角色配置ID
required bool autoCreate=3;//true:自动创号玩家false:正常玩家,默认是false:正常玩家
}
//创建角色并进入游戏成功
message CreateRoleSuccess_S2C{
option (as3.m_package) = "huaqiangu.login";
required int32 retStatus=1;
optional ChooseRoleVO roleVO=2;
}
//创建角色并进入游戏失败
message CreateRoleFail_S2C{
option (as3.m_package) = "huaqiangu.login";
required int32 retStatus=1;
optional int32 msgCode=2;//错误码
}
//服务端主动断开(需要状态)
message KickRole_S2C{
option (as3.m_package) = "huaqiangu.server";
required int32 retStatus=1;
optional string parameter=2;//参数
}
//服务器端通知指定时间开始停机
message ServerStopNotice_S2C{
option (as3.m_package) = "huaqiangu.server";
required int64 stopTime=1;//开始停机时间戳,给的时间戳会小于真实开始的时间
}