From 43a04acdff37dd53d4f65b4aaf7a1038f5a2db23 Mon Sep 17 00:00:00 2001 From: "DESKTOP-45ANQ2C\\unis" <121212121@qq.com> Date: Fri, 18 Oct 2024 17:43:32 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=A8=83=E5=A8=83=E6=9C=BA=E6=8A=93?= =?UTF-8?q?=E5=8F=96=E6=A6=82=E7=8E=87=E5=85=AC=E5=BC=8F=E3=80=91=20https:?= =?UTF-8?q?//www.tapd.cn/31044302/prong/stories/view/1131044302001001302?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gamesrv/clawdoll/player_clawdoll.go | 2 ++ gamesrv/clawdoll/scene_clawdoll.go | 4 ++++ gamesrv/clawdoll/scenepolicy_clawdoll.go | 5 ++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gamesrv/clawdoll/player_clawdoll.go b/gamesrv/clawdoll/player_clawdoll.go index b30445f..43f8561 100644 --- a/gamesrv/clawdoll/player_clawdoll.go +++ b/gamesrv/clawdoll/player_clawdoll.go @@ -117,6 +117,8 @@ func (this *PlayerEx) CostPlayCoin() bool { GameFreeId: int64(sceneEx.GetGameFreeId()), }) + sceneEx.PayCoinCount++ + logger.Logger.Tracef("Clawdoll (*PlayerEx) CostPlayCoin, items = %v", items) return true } diff --git a/gamesrv/clawdoll/scene_clawdoll.go b/gamesrv/clawdoll/scene_clawdoll.go index 49adc78..1c60d81 100644 --- a/gamesrv/clawdoll/scene_clawdoll.go +++ b/gamesrv/clawdoll/scene_clawdoll.go @@ -428,6 +428,10 @@ func (this *SceneEx) TimeOutPlayGrab() bool { playerEx := this.players[this.playingSnid] if playerEx != nil { grapType := this.GetPlayGrabType(playerEx) + if grapType == rule.ClawStrong { + this.PayCoinCount = 0 + } + this.OnPlayerSMGrabOp(this.playingSnid, int32(this.machineId), grapType) } diff --git a/gamesrv/clawdoll/scenepolicy_clawdoll.go b/gamesrv/clawdoll/scenepolicy_clawdoll.go index c685d62..188dab5 100644 --- a/gamesrv/clawdoll/scenepolicy_clawdoll.go +++ b/gamesrv/clawdoll/scenepolicy_clawdoll.go @@ -684,6 +684,9 @@ func (this *PlayGame) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, para } grapType := sceneEx.GetPlayGrabType(playerEx) + if grapType == rule.ClawStrong { + sceneEx.PayCoinCount = 0 + } logger.Logger.Trace("ClawDoll StatePlayGame OnPlayerOp Grab-----SnId:", p.SnId, " grapType: ", grapType) //1-弱力抓 2 -强力抓 @@ -840,7 +843,7 @@ func (this *StateBilled) OnEnter(s *base.Scene) { } playerEx.lastIsWin = playerEx.IsWin - sceneEx.PayCoinCount++ + playerEx.ReStartGame() } }