添加proto_versin

This commit is contained in:
aozhiwei 2019-07-13 14:38:26 +08:00
parent ab0afb3fa5
commit 8c6cd43ecf
3 changed files with 7 additions and 3 deletions

View File

@ -22,7 +22,6 @@ class Player : public Human
public: public:
int team_mode = 0; int team_mode = 0;
int player_count = 0;
bool auto_fill = false; bool auto_fill = false;
bool use_touch = false; bool use_touch = false;
long long create_tick = 0; long long create_tick = 0;

View File

@ -48,7 +48,6 @@ Player* PlayerMgr::CreatePlayerByCMJoin(long ip_saddr, int socket, const cs::CMJ
hum->health = 0; hum->health = 0;
hum->team_uuid = msg.team_uuid(); hum->team_uuid = msg.team_uuid();
hum->team_mode = msg.team_mode(); hum->team_mode = msg.team_mode();
hum->player_count = msg.player_count();
hum->auto_fill = msg.auto_fill(); hum->auto_fill = msg.auto_fill();
hum->use_touch = msg.use_touch(); hum->use_touch = msg.use_touch();
hum->avatar_url = msg.avatar_url(); hum->avatar_url = msg.avatar_url();

View File

@ -47,6 +47,12 @@ package cs;
protobuf反射得到字段名和字段id的对应关系做到自动化判断 protobuf反射得到字段名和字段id的对应关系做到自动化判断
*/ */
//
enum Constant_e
{
ProtoVersion = 2019071501; //
}
// //
message CMPing message CMPing
{ {
@ -548,8 +554,8 @@ message CMJoin
optional string team_uuid = 2; //id () optional string team_uuid = 2; //id ()
optional string account_id = 3; //id account_id optional string account_id = 3; //id account_id
optional string session_id = 4; //session_id optional string session_id = 4; //session_id
optional int32 proto_version = 5; //Constant_e.ProtoVersion
optional int32 team_mode = 20; // 0: 1: optional int32 team_mode = 20; // 0: 1:
optional int32 player_count = 5; //(1)
optional bool auto_fill = 6; // optional bool auto_fill = 6; //
optional int32 bot = 7; // optional int32 bot = 7; //
optional string name = 8; // optional string name = 8; //