From 5549033895c0546c5489ef3a2afc2b4168781a3b Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Sat, 20 Apr 2024 15:34:57 +0800 Subject: [PATCH] 1 --- server/matchserver/team/team.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/server/matchserver/team/team.go b/server/matchserver/team/team.go index bbe7b980..a26bc927 100644 --- a/server/matchserver/team/team.go +++ b/server/matchserver/team/team.go @@ -635,12 +635,19 @@ func (this *team) checkMemberState() { func(rsp f5.HttpCliResponse) { sending = false if rsp.GetErr() == nil && rsp.JsonParseOk() { + dirty := false for _, u := range rspObj.Users { m := this.GetMemberByAccountId(u.AccountId) if m != nil { + if m.IsBattling() != (u.Battling != 0) { + dirty = true + } m.SetBattling(u.Battling != 0) } } + if dirty { + this.SendUpdateNotify() + } } }) } @@ -653,6 +660,15 @@ func (this *team) checkMemberState() { } } +func (this *team) genAccountIdParam() string { + param := "" + this.traverseMembers( + func (m common.Player) bool { + return true + }) + return param +} + func (this *team) hasOnlinePlayer() bool { has := false this.traverseMembers(