Merge branch 'develop' of git.pogorockgames.com:mango-games/server/game into develop

This commit is contained in:
sk 2024-07-04 11:12:23 +08:00
commit 9379613ae8
1 changed files with 5 additions and 5 deletions

View File

@ -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 {