消耗钻石比赛开始再统计

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,10 +1913,14 @@ func (this *Player) AddDiamond(num, add int64, gainWay int32, oper, remark strin
} else {
this.Diamond += num
}
TaskSubjectSingleton.Touch(common.TaskTypeCostDiamond, &TaskData{
SnId: this.SnId,
Num: -num,
})
switch gainWay {
case common.GainWay_MatchSignup: // 排除的
default:
TaskSubjectSingleton.Touch(common.TaskTypeCostDiamond, &TaskData{
SnId: this.SnId,
Num: -num,
})
}
}
this.SendDiffData()

View File

@ -732,6 +732,12 @@ func (this *Tournament) Start(platform string, tmId int32) {
GameFreeID: tm.dbGameFree.GetId(),
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)
}