Compare commits
2 Commits
49bd65a05c
...
76d95282ca
Author | SHA1 | Date |
---|---|---|
|
76d95282ca | |
|
a5082f50e5 |
|
@ -532,7 +532,7 @@ func (this *Tournament) SignUp(tmId int32, p *Player) (bool, int32) {
|
||||||
if this.IsMatching(p.SnId) || isWaiting {
|
if this.IsMatching(p.SnId) || isWaiting {
|
||||||
return false, int32(tournament.SignRaceCode_OPRC_Repeat)
|
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)
|
return false, int32(tournament.SignRaceCode_OPRC_NoAward)
|
||||||
}
|
}
|
||||||
// 扣报名费
|
// 扣报名费
|
||||||
|
@ -1725,10 +1725,13 @@ func (this *Tournament) GetMatchAwardNum(platform string, id int32) int32 {
|
||||||
if matchInfo != nil {
|
if matchInfo != nil {
|
||||||
for _, info := range matchInfo {
|
for _, info := range matchInfo {
|
||||||
if info.Id == id {
|
if info.Id == id {
|
||||||
if info.AwardNum == -1 {
|
if info.AwardNum == 9999 {
|
||||||
return -1
|
return 9999
|
||||||
} else {
|
} else {
|
||||||
num = info.AwardNum - num
|
num = info.AwardNum - num
|
||||||
|
if num < 0 {
|
||||||
|
num = 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue