Compare commits
2 Commits
b46db9b36b
...
13042959c9
Author | SHA1 | Date |
---|---|---|
|
13042959c9 | |
|
7991a8044d |
|
@ -78,9 +78,19 @@ func MSDollMachineoCoinResultHandler(session *netlib.Session, packetId int, data
|
|||
logger.Logger.Tracef("上分成功!!!!!!!!!!!!snid = ", msg.Snid)
|
||||
//发送向前移动指令
|
||||
sceneEx.OnPlayerSMPerateOp(p.SnId, int32(sceneEx.machineId), rule.ButtonFront)
|
||||
|
||||
s.ChangeSceneState(rule.ClawDollSceneStateStart)
|
||||
sceneEx.SetPlayingState(int32(rule.ClawDollSceneStateStart))
|
||||
|
||||
ClawdollBroadcastRoomState(s)
|
||||
ClawdollSendPlayerInfo(s)
|
||||
|
||||
ClawdollBroadcastPlayingInfo(s)
|
||||
|
||||
} else {
|
||||
logger.Logger.Tracef("上分失败!!!!!!!!!!!!snid = ", msg.Snid)
|
||||
}
|
||||
|
||||
case 2:
|
||||
if msg.Result == 1 {
|
||||
// 获得娃娃卡
|
||||
|
|
|
@ -531,13 +531,6 @@ func (this *StateWait) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, par
|
|||
|
||||
if sceneEx.CanStart() {
|
||||
sceneEx.playingSnid = playerEx.SnId
|
||||
s.ChangeSceneState(rule.ClawDollSceneStateStart)
|
||||
sceneEx.SetPlayingState(int32(rule.ClawDollSceneStateStart))
|
||||
|
||||
ClawdollBroadcastRoomState(s)
|
||||
ClawdollSendPlayerInfo(s)
|
||||
|
||||
ClawdollBroadcastPlayingInfo(s)
|
||||
|
||||
sceneEx.OnPlayerSCOp(p, opcode, clawdoll.OpResultCode_OPRC_Success, params)
|
||||
}
|
||||
|
@ -886,6 +879,26 @@ func (this *StateWaitPayCoin) OnPlayerOp(s *base.Scene, p *base.Player, opcode i
|
|||
func (this *StateWaitPayCoin) OnEnter(s *base.Scene) {
|
||||
logger.Logger.Trace("(this *StateWaitPayCoin) OnEnter, sceneid=", s.GetSceneId())
|
||||
this.BaseState.OnEnter(s)
|
||||
|
||||
sceneEx, ok := s.ExtraData.(*SceneEx)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
playerEx := sceneEx.GetPlayingEx()
|
||||
if playerEx != nil {
|
||||
pack := &clawdoll.SCCLAWDOLLRoundGameBilled{
|
||||
RoundId: proto.Int32(int32(sceneEx.RoundId)),
|
||||
ClowResult: proto.Int32(0),
|
||||
Award: proto.Int64(playerEx.gainCoin),
|
||||
Balance: proto.Int64(playerEx.Coin),
|
||||
}
|
||||
|
||||
// logger.Logger.Trace("SCSmallRocketRoundGameBilled is pack: ", pack)
|
||||
proto.SetDefaults(pack)
|
||||
|
||||
playerEx.SendToClient(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_GAMEBILLED), pack)
|
||||
}
|
||||
}
|
||||
|
||||
func (this *StateWaitPayCoin) OnLeave(s *base.Scene) {
|
||||
|
|
Loading…
Reference in New Issue