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) {