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 {