This commit is contained in:
aozhiwei 2024-03-12 11:56:52 +08:00
parent ee1e393288
commit 25eca38433
2 changed files with 3 additions and 0 deletions

View File

@ -18,6 +18,7 @@ type Team interface {
OnPlayerOffline(Player) OnPlayerOffline(Player)
OnPlayerOnline(Player) OnPlayerOnline(Player)
IsCopy() bool IsCopy() bool
SendUpdateNotify()
} }
type TeamMgr interface { type TeamMgr interface {

View File

@ -185,6 +185,7 @@ func (this *playerMgr) apiAuthCb(hdr *f5.MsgHdr, msg *cs.CMLogin, rsp f5.HttpCli
rspMsg.TeamUuid = proto.String(team.GetTeamUuid()) rspMsg.TeamUuid = proto.String(team.GetTeamUuid())
rspMsg.ServerInfo = proto.String(mt.Table.MatchCluster.GetServerInfo()) rspMsg.ServerInfo = proto.String(mt.Table.MatchCluster.GetServerInfo())
GetWspListener().SendProxyMsg(hdr.Conn, hdr.SocketHandle, &rspMsg) GetWspListener().SendProxyMsg(hdr.Conn, hdr.SocketHandle, &rspMsg)
team.SendUpdateNotify()
} else if msg.GetJoinTeamParam() != nil { } else if msg.GetJoinTeamParam() != nil {
team := GetTeamMgr().GetTeamByUuid(msg.GetJoinTeamParam().GetTeamUuid()) team := GetTeamMgr().GetTeamByUuid(msg.GetJoinTeamParam().GetTeamUuid())
if team == nil { if team == nil {
@ -225,6 +226,7 @@ func (this *playerMgr) apiAuthCb(hdr *f5.MsgHdr, msg *cs.CMLogin, rsp f5.HttpCli
rspMsg.TeamUuid = proto.String(team.GetTeamUuid()) rspMsg.TeamUuid = proto.String(team.GetTeamUuid())
rspMsg.ServerInfo = proto.String(mt.Table.MatchCluster.GetServerInfo()) rspMsg.ServerInfo = proto.String(mt.Table.MatchCluster.GetServerInfo())
GetWspListener().SendProxyMsg(hdr.Conn, hdr.SocketHandle, &rspMsg) GetWspListener().SendProxyMsg(hdr.Conn, hdr.SocketHandle, &rspMsg)
team.SendUpdateNotify()
} else { } else {
panic("CMLogin Param error") panic("CMLogin Param error")
} }