diff --git a/worldsrv/tournament.go b/worldsrv/tournament.go index 31ce55b..e9d6fde 100644 --- a/worldsrv/tournament.go +++ b/worldsrv/tournament.go @@ -1394,11 +1394,29 @@ func (this *Tournament) GetSCTMInfosPack(platform, channelName string) *tourname tMInfo.MatchTimeWeek = append(tMInfo.MatchTimeWeek, week) } } - if info.MatchTimeStamp != nil && len(info.MatchTimeStamp) > 0 { - for _, stamp := range info.MatchTimeStamp { - tMInfo.MatchTimeStamp = append(tMInfo.MatchTimeStamp, stamp) + + if info.MatchType == MatchTypeChampion { + week := this.getWeekDay() + for _, v := range info.MatchTimeWeek { + if v == int32(week) { + if info.MatchTimeStamp != nil && len(info.MatchTimeStamp) > 0 { + for _, stamp := range info.MatchTimeStamp { + tMInfo.MatchTimeStamp = append(tMInfo.MatchTimeStamp, stamp) + } + } + } + } + if len(tMInfo.MatchTimeStamp) == 0 { + tMInfo.MatchTimeStamp = []int64{time.Now().AddDate(0, 0, 2).Unix(), time.Now().AddDate(0, 0, 3).Unix()} + } + } else { + if info.MatchTimeStamp != nil && len(info.MatchTimeStamp) > 0 { + for _, stamp := range info.MatchTimeStamp { + tMInfo.MatchTimeStamp = append(tMInfo.MatchTimeStamp, stamp) + } } } + if info.MatchPromotion != nil { for _, mp := range info.MatchPromotion { tMInfo.MatchPromotion = append(tMInfo.MatchPromotion, mp)