diff --git a/worldsrv/tournament.go b/worldsrv/tournament.go index 425a989..55a5831 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) } // 扣报名费 @@ -1725,10 +1725,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 }