Compare commits
No commits in common. "ae4ab17075adf1e9a1af74ae15d910d8ea58966f" and "db82eabb7c9fa8ff8a47fcbe4462cbb387f3b4e4" have entirely different histories.
ae4ab17075
...
db82eabb7c
|
@ -33,7 +33,7 @@ func (this *PlayerEx) CanOp(sceneEx *SceneEx) bool {
|
|||
|
||||
func (this *PlayerEx) CanPayCoin() bool {
|
||||
|
||||
return true
|
||||
return false
|
||||
}
|
||||
|
||||
// 游戏新一局 设置数据
|
||||
|
|
|
@ -445,29 +445,9 @@ func (this *StateStart) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, pa
|
|||
return true
|
||||
}
|
||||
|
||||
sceneEx, ok := s.ExtraData.(*SceneEx)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
playerEx, ok := p.ExtraData.(*PlayerEx)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
|
||||
switch opcode {
|
||||
case rule.ClawDollPlayerOpPayCoin:
|
||||
if !playerEx.CanPayCoin() {
|
||||
return false
|
||||
}
|
||||
|
||||
// 1-前 2-后 3-左 4-右 5-投币
|
||||
pack := &machine.SMDollMachineoPerate{
|
||||
Snid: proto.Int32(p.SnId),
|
||||
Id: proto.Int32(int32(sceneEx.machineId)),
|
||||
Perate: proto.Int32(int32(5)),
|
||||
}
|
||||
|
||||
sceneEx.SendToMachine(int(machine.DollMachinePacketID_PACKET_SMDollMachinePerate), pack)
|
||||
}
|
||||
|
||||
return false
|
||||
|
@ -544,23 +524,14 @@ func (this *PlayGame) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, para
|
|||
if !playerEx.CanPayCoin() {
|
||||
return false
|
||||
}
|
||||
sceneEx.OnPlayerSCOp(p, opcode, clawdoll.OpResultCode_OPRC_Success, params)
|
||||
|
||||
// 1-前 2-后 3-左 4-右 5-投币
|
||||
pack := &machine.SMDollMachineoPerate{
|
||||
Snid: proto.Int32(p.SnId),
|
||||
Id: proto.Int32(int32(sceneEx.machineId)),
|
||||
Perate: proto.Int32(int32(5)),
|
||||
}
|
||||
|
||||
sceneEx.SendToMachine(int(machine.DollMachinePacketID_PACKET_SMDollMachinePerate), pack)
|
||||
|
||||
//sceneEx.OnPlayerSCOp(p, opcode, clawdoll.OpResultCode_OPRC_Success, params)
|
||||
case rule.ClawDollPlayerOpGo:
|
||||
|
||||
pack := &machine.SMDollMachineGrab{
|
||||
Snid: proto.Int32(p.SnId),
|
||||
Id: proto.Int32(int32(sceneEx.machineId)),
|
||||
TypeId: proto.Int32(int32(2)),
|
||||
TypeId: proto.Int32(int32(1)),
|
||||
}
|
||||
|
||||
sceneEx.SendToMachine(int(machine.DollMachinePacketID_PACKET_SMDollMachineGrab), pack)
|
||||
|
|
Loading…
Reference in New Issue