1
This commit is contained in:
parent
44e3126dc2
commit
6d65053204
@ -13,6 +13,7 @@ import (
|
||||
type Room interface {
|
||||
GetRoomState() int32
|
||||
OnPlayerOffline(Player)
|
||||
OnPlayerOnline(Player)
|
||||
}
|
||||
|
||||
type RoomMgr interface {
|
||||
|
@ -61,6 +61,9 @@ func (this *player) reBind(socket f5.WspCliConn) {
|
||||
}
|
||||
this.socket = socket
|
||||
_playerMgr.socketHash[this.socket] = this
|
||||
if this.room != nil {
|
||||
this.room.OnPlayerOnline(this)
|
||||
}
|
||||
}
|
||||
|
||||
func (this *player) GetAccountId() string {
|
||||
|
@ -180,6 +180,9 @@ func (this *room) fillMFCurrentRoom(pb *cs.MFCurrentRoom) {
|
||||
func (this *room) OnPlayerOffline(hum common.Player) {
|
||||
}
|
||||
|
||||
func (this *room) OnPlayerOnline(hum common.Player) {
|
||||
}
|
||||
|
||||
func (this *room) CMDisbandRoom(hdr *f5.MsgHdr, msg *cs.CMDisbandRoom) {
|
||||
hum := hdr.Context.(common.Player)
|
||||
rspMsg := &cs.SMDisbandRoom{}
|
||||
|
Loading…
x
Reference in New Issue
Block a user