From 515de3a9878c1253360e5217fbfcaf68ed98f50f Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Mon, 8 Jul 2024 16:52:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E8=80=97=E9=92=BB=E7=9F=B3=E6=AF=94?= =?UTF-8?q?=E8=B5=9B=E5=BC=80=E5=A7=8B=E5=86=8D=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/player.go | 12 ++++++++---- worldsrv/tournament.go | 6 ++++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/worldsrv/player.go b/worldsrv/player.go index 0483c9a..fe78a2d 100644 --- a/worldsrv/player.go +++ b/worldsrv/player.go @@ -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() diff --git a/worldsrv/tournament.go b/worldsrv/tournament.go index 0cdc71e..2177750 100644 --- a/worldsrv/tournament.go +++ b/worldsrv/tournament.go @@ -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) }