From a125f5f9591ec3c84ead576a7bfa8a1feb34fb4d Mon Sep 17 00:00:00 2001 From: "DESKTOP-45ANQ2C\\unis" <179233648@qq.com> Date: Thu, 10 Oct 2024 10:31:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A8=83=E5=A8=83=E6=9C=BA=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gamesrv/clawdoll/action_clawdoll.go | 2 -- gamesrv/clawdoll/scenepolicy_clawdoll.go | 10 ++++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gamesrv/clawdoll/action_clawdoll.go b/gamesrv/clawdoll/action_clawdoll.go index b1ccc03..3da5a08 100644 --- a/gamesrv/clawdoll/action_clawdoll.go +++ b/gamesrv/clawdoll/action_clawdoll.go @@ -119,8 +119,6 @@ func MSDollMachineoCoinResultHandler(session *netlib.Session, packetId int, data playerEx.IsWin = false } - playerEx.SendPlayerGameBilled(int32(sceneEx.RoundId)) - logger.Logger.Tracef("ClawDoll StatePlayGame OnPlayerOp Grab response, SnId= %v", msg.Snid) s.ChangeSceneState(rule.ClawDollSceneStateBilled) diff --git a/gamesrv/clawdoll/scenepolicy_clawdoll.go b/gamesrv/clawdoll/scenepolicy_clawdoll.go index becf327..145bd9a 100644 --- a/gamesrv/clawdoll/scenepolicy_clawdoll.go +++ b/gamesrv/clawdoll/scenepolicy_clawdoll.go @@ -929,6 +929,16 @@ func (this *StateWaitPayCoin) OnEnter(s *base.Scene) { func (this *StateWaitPayCoin) OnLeave(s *base.Scene) { logger.Logger.Trace("(this *StateWaitPayCoin) OnLeave, sceneid=", s.GetSceneId()) this.BaseState.OnLeave(s) + + sceneEx, ok := s.ExtraData.(*SceneEx) + if !ok { + return + } + + playingEx := sceneEx.GetPlayingEx() + if playingEx != nil { + playingEx.SendPlayerGameBilled(int32(sceneEx.RoundId)) + } } func (this *StateWaitPayCoin) OnTick(s *base.Scene) {