This commit is contained in:
aozhiwei 2023-09-15 22:08:52 +08:00
parent 2ccf8fab2c
commit a39d2c3047
2 changed files with 17 additions and 9 deletions

View File

@ -11,13 +11,15 @@ import (
type player struct { type player struct {
cs.MsgHandlerImpl cs.MsgHandlerImpl
socket f5.WspCliConn socket f5.WspCliConn
room common.Room
accountId string accountId string
sessionId string sessionId string
zoneId int32
nodeId int32
name string name string
avatarUrl string avatarUrl string
heroId string heroId string
ping int32 ping int32
room common.Room
} }
func (this *player) GetAccountId() string { 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.socket = req.hdr.GetSocket()
this.accountId = req.msg.GetAccountId() this.accountId = req.msg.GetAccountId()
this.sessionId = req.msg.GetSessionId() this.sessionId = req.msg.GetSessionId()
this.zoneId = req.msg.GetZoneId()
this.nodeId = req.msg.GetNodeId()
this.name = name this.name = name
this.avatarUrl = avatarUrl this.avatarUrl = avatarUrl
this.heroId = heroId this.heroId = heroId
@ -83,11 +87,11 @@ func (this *player) GetTeamUuid() string {
} }
func (this *player) GetZoneId() int32 { func (this *player) GetZoneId() int32 {
return 0 return this.zoneId
} }
func (this *player) GetNodeId() int32 { func (this *player) GetNodeId() int32 {
return 0 return this.nodeId
} }
func (this *player) GetSessionId() string { func (this *player) GetSessionId() string {

View File

@ -96,11 +96,12 @@ message MFRoom
optional string room_id = 1; // optional string room_id = 1; //
optional int32 map_id = 2; //id optional int32 map_id = 2; //id
optional int32 zone_id = 3; //id optional int32 zone_id = 3; //id
optional int32 has_passwd = 4; // optional int32 node_id = 4; //id
optional int32 team_num = 5; // optional int32 has_passwd = 5; //
optional int32 player_num = 6; // optional int32 team_num = 6; //
optional int32 team_max_num = 7; // optional int32 player_num = 7; //
optional int32 player_max_num = 8; // optional int32 team_max_num = 8; //
optional int32 player_max_num = 9; //
optional MFMember owner = 20; // optional MFMember owner = 20; //
} }
@ -150,6 +151,7 @@ message CMLogin
optional int32 proto_version = 5; //Constant_e.ProtoVersion optional int32 proto_version = 5; //Constant_e.ProtoVersion
optional string session_id = 20; //id optional string session_id = 20; //id
optional int32 zone_id = 21; //Id optional int32 zone_id = 21; //Id
optional int32 node_id = 22; //id
} }
// //
@ -183,7 +185,9 @@ message SMReconnect
message CMCreateRoom message CMCreateRoom
{ {
optional int32 map_id = 1; //id 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 message SMCreateRoom