娃娃机修改
This commit is contained in:
parent
9cdc0f24c7
commit
8514f22fc6
|
|
@ -2,7 +2,6 @@ package clawdoll
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"mongo.games.com/game/common"
|
"mongo.games.com/game/common"
|
||||||
rule "mongo.games.com/game/gamerule/clawdoll"
|
|
||||||
"mongo.games.com/game/gamesrv/base"
|
"mongo.games.com/game/gamesrv/base"
|
||||||
"mongo.games.com/game/protocol/clawdoll"
|
"mongo.games.com/game/protocol/clawdoll"
|
||||||
"mongo.games.com/game/protocol/machine"
|
"mongo.games.com/game/protocol/machine"
|
||||||
|
|
@ -60,15 +59,6 @@ func MSDollMachineoCoinResultHandler(session *netlib.Session, packetId int, data
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
scene := p.GetScene()
|
|
||||||
if scene == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
sceneEx, ok := scene.ExtraData.(*SceneEx)
|
|
||||||
if !ok {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
switch msg.TypeId {
|
switch msg.TypeId {
|
||||||
case 1:
|
case 1:
|
||||||
if msg.Result == 1 {
|
if msg.Result == 1 {
|
||||||
|
|
@ -82,13 +72,6 @@ func MSDollMachineoCoinResultHandler(session *netlib.Session, packetId int, data
|
||||||
} else {
|
} else {
|
||||||
logger.Logger.Tracef("下抓失败!!!!!!!!!!!!snid = ", msg.Snid)
|
logger.Logger.Tracef("下抓失败!!!!!!!!!!!!snid = ", msg.Snid)
|
||||||
}
|
}
|
||||||
|
|
||||||
scene.ChangeSceneState(rule.ClawDollSceneStateBilled)
|
|
||||||
|
|
||||||
sceneEx.SetPlayingState(int32(rule.ClawDollSceneStateBilled))
|
|
||||||
|
|
||||||
ClawdollBroadcastRoomState(scene)
|
|
||||||
ClawdollSendPlayerInfo(scene)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
|
||||||
|
|
@ -311,7 +311,7 @@ func (this *SceneEx) GetPlayGrabType(player *PlayerEx) int32 {
|
||||||
return rule.ClawWeak
|
return rule.ClawWeak
|
||||||
}
|
}
|
||||||
|
|
||||||
if this.RoundId%100 == 0 && this.RoundId != 0 {
|
if this.RoundId/2 == 0 && this.RoundId != 0 {
|
||||||
return rule.ClawStrong
|
return rule.ClawStrong
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -371,7 +371,11 @@ func (this *SceneEx) SetPlayingState(state int32) {
|
||||||
// 时间到 系统开始下抓
|
// 时间到 系统开始下抓
|
||||||
func (this *SceneEx) TimeOutPlayGrab() bool {
|
func (this *SceneEx) TimeOutPlayGrab() bool {
|
||||||
|
|
||||||
this.OnPlayerSMGrabOp(this.playingSnid, int32(this.machineId), rule.ClawWeak)
|
playerEx := this.players[this.playingSnid]
|
||||||
|
if playerEx != nil {
|
||||||
|
grapType := this.GetPlayGrabType(playerEx)
|
||||||
|
this.OnPlayerSMGrabOp(this.playingSnid, int32(this.machineId), grapType)
|
||||||
|
}
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -668,6 +668,12 @@ func (this *PlayGame) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, para
|
||||||
//1-弱力抓 2 -强力抓
|
//1-弱力抓 2 -强力抓
|
||||||
sceneEx.OnPlayerSMGrabOp(p.SnId, int32(sceneEx.machineId), grapType)
|
sceneEx.OnPlayerSMGrabOp(p.SnId, int32(sceneEx.machineId), grapType)
|
||||||
|
|
||||||
|
s.ChangeSceneState(rule.ClawDollSceneStateBilled)
|
||||||
|
sceneEx.SetPlayingState(int32(rule.ClawDollSceneStateBilled))
|
||||||
|
|
||||||
|
ClawdollBroadcastRoomState(s)
|
||||||
|
ClawdollSendPlayerInfo(s)
|
||||||
|
|
||||||
case rule.ClawDollPlayerOpMove:
|
case rule.ClawDollPlayerOpMove:
|
||||||
|
|
||||||
if !sceneEx.CheckMoveOp(playerEx) {
|
if !sceneEx.CheckMoveOp(playerEx) {
|
||||||
|
|
@ -698,6 +704,11 @@ func (this *PlayGame) OnTick(s *base.Scene) {
|
||||||
logger.Logger.Trace("PlayGame OnTick TimeOutPlayGrab SnId", sceneEx.playingSnid, " machineId:", sceneEx.machineId)
|
logger.Logger.Trace("PlayGame OnTick TimeOutPlayGrab SnId", sceneEx.playingSnid, " machineId:", sceneEx.machineId)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
s.ChangeSceneState(rule.ClawDollSceneStateBilled)
|
||||||
|
sceneEx.SetPlayingState(int32(rule.ClawDollSceneStateBilled))
|
||||||
|
|
||||||
|
ClawdollBroadcastRoomState(s)
|
||||||
|
ClawdollSendPlayerInfo(s)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue