添加移动响应

This commit is contained in:
kxdd 2024-08-14 14:09:05 +08:00
parent 49b0c6cc00
commit 1fff8b2ebb
2 changed files with 10 additions and 1 deletions

View File

@ -529,7 +529,7 @@ func (this *PlayGame) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, para
case rule.ClawDollPlayerOpGo: case rule.ClawDollPlayerOpGo:
pack := &machine.SMDollMachineGrab{ pack := &machine.SMDollMachineGrab{
Snid: proto.Int32(playerEx.SnId), Snid: proto.Int32(p.SnId),
Id: proto.Int32(int32(sceneEx.machineId)), Id: proto.Int32(int32(sceneEx.machineId)),
TypeId: proto.Int32(int32(1)), TypeId: proto.Int32(int32(1)),
} }
@ -537,6 +537,14 @@ func (this *PlayGame) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, para
sceneEx.SendToMachine(int(machine.DollMachinePacketID_PACKET_SMDollMachineGrab), pack) sceneEx.SendToMachine(int(machine.DollMachinePacketID_PACKET_SMDollMachineGrab), pack)
case rule.ClawDollPlayerOpMove: case rule.ClawDollPlayerOpMove:
// 1-前 2-后 3-左 4-右 5-投币
pack := &machine.SMDollMachineoPerate{
Snid: proto.Int32(p.SnId),
Id: proto.Int32(int32(sceneEx.machineId)),
Perate: proto.Int32(int32(params[0])),
}
sceneEx.SendToMachine(int(machine.DollMachinePacketID_PACKET_SMDollMachinePerate), pack)
} }
return false return false

View File

@ -19,6 +19,7 @@ import (
// game // game
_ "mongo.games.com/game/gamesrv/chess" _ "mongo.games.com/game/gamesrv/chess"
_ "mongo.games.com/game/gamesrv/clawdoll"
_ "mongo.games.com/game/gamesrv/fishing" _ "mongo.games.com/game/gamesrv/fishing"
_ "mongo.games.com/game/gamesrv/smallrocket" _ "mongo.games.com/game/gamesrv/smallrocket"
_ "mongo.games.com/game/gamesrv/thirteen" _ "mongo.games.com/game/gamesrv/thirteen"