mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-02-04 14:22:26 +08:00
玩家管理模块接入redis,已完整实现好友、多人世界的跨服交互功能
This commit is contained in:
@@ -361,14 +361,14 @@ func (k *KcpConnectManager) closeKcpConn(session *Session, enetType uint32) {
|
||||
EventId: KcpConnCloseNotify,
|
||||
}
|
||||
// 通知GS玩家下线
|
||||
gameMsg := new(mq.GameMsg)
|
||||
gameMsg.UserId = session.userId
|
||||
connCtrlMsg := new(mq.ConnCtrlMsg)
|
||||
connCtrlMsg.UserId = session.userId
|
||||
k.messageQueue.SendToGs(session.gsServerAppId, &mq.NetMsg{
|
||||
MsgType: mq.MsgTypeGame,
|
||||
EventId: mq.UserOfflineNotify,
|
||||
GameMsg: gameMsg,
|
||||
MsgType: mq.MsgTypeConnCtrl,
|
||||
EventId: mq.UserOfflineNotify,
|
||||
ConnCtrlMsg: connCtrlMsg,
|
||||
})
|
||||
logger.Info("send to gs user offline, ConvId: %v, UserId: %v", convId, gameMsg.UserId)
|
||||
logger.Info("send to gs user offline, ConvId: %v, UserId: %v", convId, connCtrlMsg.UserId)
|
||||
k.destroySessionChan <- session
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user