From b28218b7533143507eeafbeff809471069d0a87c Mon Sep 17 00:00:00 2001 From: by <123456@qq.com> Date: Thu, 4 Jul 2024 10:47:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AF=94=E8=B5=9B=E5=9C=BA=E6=AF=8F=E6=97=A5?= =?UTF-8?q?=E5=BA=93=E5=AD=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/tournament.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/worldsrv/tournament.go b/worldsrv/tournament.go index ea7676e..d92dca2 100644 --- a/worldsrv/tournament.go +++ b/worldsrv/tournament.go @@ -1158,7 +1158,7 @@ func (this *Tournament) sendPromotionInfo(mc *PlayerMatchContext, sortId int64, if this.MatchAwardNum[mc.p.Platform] == nil { this.MatchAwardNum[mc.p.Platform] = make(map[int32]int32) } - this.MatchAwardNum[mc.p.Platform][mc.tm.gmd.GameFreeId] += 1 + this.MatchAwardNum[mc.p.Platform][mc.tm.gmd.Id] += 1 } } } @@ -1394,7 +1394,7 @@ func (this *Tournament) GetSCTMInfosPack(platform, channelName string) *tourname if matchInfo != nil { for id, info := range matchInfo { if info.MatchSwitch == 1 && !this.IsOutTime(info) && common.InMatchChannel(info.OnChannelName, channelName) { - awardNum := this.GetMatchAwardNum(platform, info.GameFreeId) + awardNum := this.GetMatchAwardNum(platform, info.Id) tMInfo := &tournament.TMInfo{ Id: proto.Int32(id), GameFreeId: info.GameFreeId, @@ -1714,15 +1714,15 @@ func (this *Tournament) OnHourTimer() { } } -func (this *Tournament) GetMatchAwardNum(platform string, gameFreeId int32) int32 { +func (this *Tournament) GetMatchAwardNum(platform string, id int32) int32 { var num int32 if this.MatchAwardNum != nil && this.MatchAwardNum[platform] != nil { - num = this.MatchAwardNum[platform][gameFreeId] + num = this.MatchAwardNum[platform][id] } matchInfo := this.GetAllMatchInfo(platform) if matchInfo != nil { for _, info := range matchInfo { - if info.GameFreeId == gameFreeId { + if info.Id == id { if info.AwardNum == -1 { return -1 } else {