This commit is contained in:
aozhiwei 2023-09-15 22:27:13 +08:00
parent 080ffaa9d3
commit faa7533e87
2 changed files with 8 additions and 15 deletions

View File

@ -28,7 +28,6 @@ type Player interface {
GetAvatarUrl() string GetAvatarUrl() string
GetHeroId() string GetHeroId() string
GetPing() int32 GetPing() int32
GetTeamUuid() string
GetZoneId() int32 GetZoneId() int32
GetNodeId() int32 GetNodeId() int32
SendMsg(proto.Message) SendMsg(proto.Message)

View File

@ -14,7 +14,6 @@ type player struct {
room common.Room room common.Room
accountId string accountId string
sessionId string sessionId string
teamUuid string
zoneId int32 zoneId int32
nodeId int32 nodeId int32
name string name string
@ -23,10 +22,6 @@ type player struct {
ping int32 ping int32
} }
func (this *player) GetAccountId() string {
return this.accountId
}
func (this *player) SendMsg(rspMsg proto.Message) { func (this *player) SendMsg(rspMsg proto.Message) {
if this.socket.IsValid() { if this.socket.IsValid() {
GetWspListener().SendProxyMsg(this.socket.Conn, this.socket.SocketHandle, rspMsg) GetWspListener().SendProxyMsg(this.socket.Conn, this.socket.SocketHandle, rspMsg)
@ -45,7 +40,6 @@ 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.teamUuid = req.msg.GetTeamUuid()
this.zoneId = req.msg.GetZoneId() this.zoneId = req.msg.GetZoneId()
this.nodeId = req.msg.GetNodeId() this.nodeId = req.msg.GetNodeId()
this.name = name this.name = name
@ -68,6 +62,14 @@ func (this *player) reBind(socket f5.WspCliConn) {
_playerMgr.socketHash[this.socket] = this _playerMgr.socketHash[this.socket] = this
} }
func (this *player) GetAccountId() string {
return this.accountId
}
func (this *player) GetSessionId() string {
return this.sessionId
}
func (this *player) GetName() string { func (this *player) GetName() string {
return this.name return this.name
} }
@ -84,10 +86,6 @@ func (this *player) GetPing() int32 {
return this.ping return this.ping
} }
func (this *player) GetTeamUuid() string {
return this.teamUuid
}
func (this *player) GetZoneId() int32 { func (this *player) GetZoneId() int32 {
return this.zoneId return this.zoneId
} }
@ -96,10 +94,6 @@ func (this *player) GetNodeId() int32 {
return this.nodeId return this.nodeId
} }
func (this *player) GetSessionId() string {
return this.sessionId
}
func (this *player) IsOnline() bool { func (this *player) IsOnline() bool {
return this.socket.IsValid() return this.socket.IsValid()
} }