From a5082f50e551e4730b2f15151a97cc71104b7695 Mon Sep 17 00:00:00 2001 From: by <123456@qq.com> Date: Thu, 4 Jul 2024 15:01:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AF=94=E8=B5=9B=E5=9C=BA=E5=BA=93=E5=AD=98?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/tournament.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/worldsrv/tournament.go b/worldsrv/tournament.go index d92dca2..e5e680b 100644 --- a/worldsrv/tournament.go +++ b/worldsrv/tournament.go @@ -532,7 +532,7 @@ func (this *Tournament) SignUp(tmId int32, p *Player) (bool, int32) { if this.IsMatching(p.SnId) || isWaiting { return false, int32(tournament.SignRaceCode_OPRC_Repeat) } - if this.GetMatchAwardNum(p.Platform, tmId) == 0 { + if this.GetMatchAwardNum(p.Platform, tmId) <= 0 { return false, int32(tournament.SignRaceCode_OPRC_NoAward) } // 扣报名费 @@ -1723,10 +1723,13 @@ func (this *Tournament) GetMatchAwardNum(platform string, id int32) int32 { if matchInfo != nil { for _, info := range matchInfo { if info.Id == id { - if info.AwardNum == -1 { - return -1 + if info.AwardNum == 9999 { + return 9999 } else { num = info.AwardNum - num + if num < 0 { + num = 0 + } } break }