From 1fff8b2ebbd63db125f053336e5ac16a18b46b15 Mon Sep 17 00:00:00 2001 From: kxdd <88655@163.com> Date: Wed, 14 Aug 2024 14:09:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=A7=BB=E5=8A=A8=E5=93=8D?= =?UTF-8?q?=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gamesrv/clawdoll/scenepolicy_clawdoll.go | 10 +++++++++- gamesrv/main.go | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gamesrv/clawdoll/scenepolicy_clawdoll.go b/gamesrv/clawdoll/scenepolicy_clawdoll.go index 0ef2a83..89cf7c2 100644 --- a/gamesrv/clawdoll/scenepolicy_clawdoll.go +++ b/gamesrv/clawdoll/scenepolicy_clawdoll.go @@ -529,7 +529,7 @@ func (this *PlayGame) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, para case rule.ClawDollPlayerOpGo: pack := &machine.SMDollMachineGrab{ - Snid: proto.Int32(playerEx.SnId), + Snid: proto.Int32(p.SnId), Id: proto.Int32(int32(sceneEx.machineId)), 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) 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 diff --git a/gamesrv/main.go b/gamesrv/main.go index 78d6f35..391ee70 100644 --- a/gamesrv/main.go +++ b/gamesrv/main.go @@ -19,6 +19,7 @@ import ( // game _ "mongo.games.com/game/gamesrv/chess" + _ "mongo.games.com/game/gamesrv/clawdoll" _ "mongo.games.com/game/gamesrv/fishing" _ "mongo.games.com/game/gamesrv/smallrocket" _ "mongo.games.com/game/gamesrv/thirteen"