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() } }