diff --git a/server/matchserver/team/team.go b/server/matchserver/team/team.go index 8c21db78..33c477a8 100644 --- a/server/matchserver/team/team.go +++ b/server/matchserver/team/team.go @@ -383,7 +383,7 @@ func (this *team) genNextCopyTeam() { newId := q5.ToString(this.zoneId) + "_" + q5.ToString(this.nodeId) + "_" + q5.ToString(nextCopyIdx) + "_"; - this.nextTeamUuid = strings.Replace(this.GetTeamUuid(), oldId, newId, 0) + this.nextTeamUuid = strings.Replace(this.GetTeamUuid(), oldId, newId, 1) if this.nextTeamUuid == this.GetTeamUuid() { panic("genNextCopyTeam error1") return diff --git a/server/matchserver/team/teammgr.go b/server/matchserver/team/teammgr.go index e300a067..900f6a29 100644 --- a/server/matchserver/team/teammgr.go +++ b/server/matchserver/team/teammgr.go @@ -24,7 +24,7 @@ func (this *teamMgr) UnInit() { func (this *teamMgr) CreateTeam(hum common.Player, msg *cs.CMLogin, mapInfo* common.MapInfoRsp) common.Team { var copyIdx int32 = 0 - teamUuid := this.genTeamUuid(copyIdx, hum.GetZoneId(), hum.GetNodeId()) + teamUuid := this.genTeamUuid(hum.GetZoneId(), hum.GetNodeId(), copyIdx) team := newTeam() team.init(copyIdx, hum.GetZoneId(), hum.GetNodeId(), teamUuid, hum, mapInfo) this.teamUuidHash[team.teamUuid] = team