From 9b5dff5f96cd2efc5b0ff532b1b46a704a01d6cb Mon Sep 17 00:00:00 2001 From: by <123456@qq.com> Date: Sat, 7 Sep 2024 10:22:55 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=B8=8A=E5=88=86=E4=B8=8D=E8=B5=B0?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E9=9A=8A=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine/action/action_server.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/machine/action/action_server.go b/machine/action/action_server.go index ea70d6b..520fbfe 100644 --- a/machine/action/action_server.go +++ b/machine/action/action_server.go @@ -71,7 +71,7 @@ func processConnMessageQueue(queue *ConnMessageQueue) { // 移动 func SMDollMachinePerateHandler(session *netlib.Session, packetId int, data interface{}) error { - logger.Logger.Tracef("SMDollMachinePerateHandler %v", data) + fmt.Println("SMDollMachinePerateHandler %v", data) msg, ok := data.(*machine.SMDollMachineoPerate) if !ok { return nil @@ -121,13 +121,14 @@ func SMDollMachinePerateHandler(session *netlib.Session, packetId int, data inte Process(conn, f1, f2) case 5: //投币 - f1 := []func(){ - func() { machinedoll.Coin(conn) }, - } - f2 := []func(){ - func() {}, - } - Process(conn, f1, f2) + /* f1 := []func(){ + func() { machinedoll.Coin(conn) }, + } + f2 := []func(){ + func() {}, + } + Process(conn, f1, f2)*/ + machinedoll.Coin(conn) go DollMachineGrabResult(session, conn, msg.Snid, msg.GetId()) } return nil From 759c98971975909a80a1dcb293b0b7dabcfcc478 Mon Sep 17 00:00:00 2001 From: by <123456@qq.com> Date: Sat, 7 Sep 2024 10:43:36 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=8E=B7=E5=8F=96token?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gamesrv/clawdoll/action_clawdoll.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gamesrv/clawdoll/action_clawdoll.go b/gamesrv/clawdoll/action_clawdoll.go index e77acb9..0abe0a0 100644 --- a/gamesrv/clawdoll/action_clawdoll.go +++ b/gamesrv/clawdoll/action_clawdoll.go @@ -9,6 +9,7 @@ import ( "mongo.games.com/game/protocol/machine" "mongo.games.com/goserver/core/logger" "mongo.games.com/goserver/core/netlib" + "strconv" ) type CSPlayerOpPacketFactory struct { @@ -136,7 +137,7 @@ func (h *CSGetTokenHandler) Process(s *netlib.Session, packetid int, data interf logger.Logger.Tracef("获取娃娃机 appId = %v, serverSecret = %v, streamId = %v", machineInfo.AppId, machineInfo.ServerSecret, machineInfo.StreamId) //生成token - token, err := token04.GenerateToken04(uint32(machineInfo.AppId), string(p.SnId), machineInfo.ServerSecret, 7200, "") + token, err := token04.GenerateToken04(uint32(machineInfo.AppId), strconv.Itoa(int(p.SnId)), machineInfo.ServerSecret, 7200, "") if err != nil { logger.Logger.Error(err) return err