diff --git a/server/hallserver/player/player.go b/server/hallserver/player/player.go index 9ee32aac..63afbe98 100644 --- a/server/hallserver/player/player.go +++ b/server/hallserver/player/player.go @@ -11,13 +11,15 @@ import ( type player struct { cs.MsgHandlerImpl socket f5.WspCliConn + room common.Room accountId string sessionId string + zoneId int32 + nodeId int32 name string avatarUrl string heroId string ping int32 - room common.Room } func (this *player) GetAccountId() string { @@ -42,6 +44,8 @@ func (this *player) init(req *pendingLoginRequest, name string, avatarUrl string this.socket = req.hdr.GetSocket() this.accountId = req.msg.GetAccountId() this.sessionId = req.msg.GetSessionId() + this.zoneId = req.msg.GetZoneId() + this.nodeId = req.msg.GetNodeId() this.name = name this.avatarUrl = avatarUrl this.heroId = heroId @@ -83,11 +87,11 @@ func (this *player) GetTeamUuid() string { } func (this *player) GetZoneId() int32 { - return 0 + return this.zoneId } func (this *player) GetNodeId() int32 { - return 0 + return this.nodeId } func (this *player) GetSessionId() string { diff --git a/server/hallserver/proto/cs_proto.proto b/server/hallserver/proto/cs_proto.proto index a4c1921e..d29b4af1 100644 --- a/server/hallserver/proto/cs_proto.proto +++ b/server/hallserver/proto/cs_proto.proto @@ -96,11 +96,12 @@ message MFRoom optional string room_id = 1; //房间号 optional int32 map_id = 2; //地图id optional int32 zone_id = 3; //区id - optional int32 has_passwd = 4; //是否有密码 - optional int32 team_num = 5; //队伍数 - optional int32 player_num = 6; //玩家数 - optional int32 team_max_num = 7; //最大队伍数 - optional int32 player_max_num = 8; //最大玩家数 + optional int32 node_id = 4; //节点id + optional int32 has_passwd = 5; //是否有密码 + optional int32 team_num = 6; //队伍数 + optional int32 player_num = 7; //玩家数 + optional int32 team_max_num = 8; //最大队伍数 + optional int32 player_max_num = 9; //最大玩家数 optional MFMember owner = 20; //房主 } @@ -150,6 +151,7 @@ message CMLogin optional int32 proto_version = 5; //协议版本号Constant_e.ProtoVersion optional string session_id = 20; //账号id optional int32 zone_id = 21; //国家Id + optional int32 node_id = 22; //节点id } //登录回复 @@ -183,7 +185,9 @@ message SMReconnect message CMCreateRoom { optional int32 map_id = 1; //地图id - optional string passwd = 2; //密码,空:无密码 + optional int32 zone_id = 2; //区id + optional int32 node_id = 3; //节点id + optional string passwd = 4; //密码,空:无密码 } message SMCreateRoom