From 992ccb280e5eb9e2a5f115a048e7244ec7505175 Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Wed, 19 Jun 2024 21:01:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AF=94=E8=B5=9B=E5=9C=BA=E5=BC=80=E8=B5=9B?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/tournament.go | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) 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)