消耗钻石比赛开始再统计

This commit is contained in:
sk 2024-07-08 16:52:32 +08:00
parent b9fbedee9e
commit 515de3a987
2 changed files with 14 additions and 4 deletions

View File

@ -1913,11 +1913,15 @@ func (this *Player) AddDiamond(num, add int64, gainWay int32, oper, remark strin
} else { } else {
this.Diamond += num this.Diamond += num
} }
switch gainWay {
case common.GainWay_MatchSignup: // 排除的
default:
TaskSubjectSingleton.Touch(common.TaskTypeCostDiamond, &TaskData{ TaskSubjectSingleton.Touch(common.TaskTypeCostDiamond, &TaskData{
SnId: this.SnId, SnId: this.SnId,
Num: -num, Num: -num,
}) })
} }
}
this.SendDiffData() this.SendDiffData()
if !this.IsRob { if !this.IsRob {

View File

@ -732,6 +732,12 @@ func (this *Tournament) Start(platform string, tmId int32) {
GameFreeID: tm.dbGameFree.GetId(), GameFreeID: tm.dbGameFree.GetId(),
Num: 1, Num: 1,
}) })
if matchInfo.GetSignupCostDiamond() > 0 {
TaskSubjectSingleton.Touch(common.TaskTypeCostDiamond, &TaskData{
SnId: v.SnId,
Num: matchInfo.GetSignupCostDiamond(),
})
}
} }
this.signupPlayers[platform][tmId].signup = make(map[int32]*TmPlayer) this.signupPlayers[platform][tmId].signup = make(map[int32]*TmPlayer)
} }