This commit is contained in:
aozhiwei 2024-03-19 20:34:12 +08:00
parent 3f8ef69198
commit 9d8d00fe89
2 changed files with 2 additions and 2 deletions

View File

@ -383,7 +383,7 @@ func (this *team) genNextCopyTeam() {
newId := q5.ToString(this.zoneId) + "_" + newId := q5.ToString(this.zoneId) + "_" +
q5.ToString(this.nodeId) + "_" + q5.ToString(this.nodeId) + "_" +
q5.ToString(nextCopyIdx) + "_"; 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() { if this.nextTeamUuid == this.GetTeamUuid() {
panic("genNextCopyTeam error1") panic("genNextCopyTeam error1")
return return

View File

@ -24,7 +24,7 @@ func (this *teamMgr) UnInit() {
func (this *teamMgr) CreateTeam(hum common.Player, msg *cs.CMLogin, mapInfo* common.MapInfoRsp) common.Team { func (this *teamMgr) CreateTeam(hum common.Player, msg *cs.CMLogin, mapInfo* common.MapInfoRsp) common.Team {
var copyIdx int32 = 0 var copyIdx int32 = 0
teamUuid := this.genTeamUuid(copyIdx, hum.GetZoneId(), hum.GetNodeId()) teamUuid := this.genTeamUuid(hum.GetZoneId(), hum.GetNodeId(), copyIdx)
team := newTeam() team := newTeam()
team.init(copyIdx, hum.GetZoneId(), hum.GetNodeId(), teamUuid, hum, mapInfo) team.init(copyIdx, hum.GetZoneId(), hum.GetNodeId(), teamUuid, hum, mapInfo)
this.teamUuidHash[team.teamUuid] = team this.teamUuidHash[team.teamUuid] = team