From 41ddf303364791b2ccd420efd5cbd0394a4f4bcd Mon Sep 17 00:00:00 2001 From: by <123456@qq.com> Date: Sat, 12 Oct 2024 17:38:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A8=83=E5=A8=83=E6=9C=BA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine/action/action_server.go | 4 ++++ machine/machinedoll/command.go | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/machine/action/action_server.go b/machine/action/action_server.go index 92d3990..ede6787 100644 --- a/machine/action/action_server.go +++ b/machine/action/action_server.go @@ -181,6 +181,10 @@ func DollMachineGrabResult(conn *machinedoll.Conn, snid, id int32) { n, err := conn.Read(buf) if err != nil { logger.Logger.Error("Failed to read response from client:", err) + err := conn.Conn.Close() + if err != nil { + return + } return } // 将读取到的数据按照 221 进行分割 diff --git a/machine/machinedoll/command.go b/machine/machinedoll/command.go index bab7a18..3bb9bb2 100644 --- a/machine/machinedoll/command.go +++ b/machine/machinedoll/command.go @@ -383,7 +383,7 @@ var data = []byte{ 0x00, //1 几币几玩占用位 0x2D, //2 游戏时间 0x01, //3 出奖模式0 无概率 1 随机模式 2 固定模式 3 冠兴模式 - 0x0F, //4 出奖概率 + 0x0A, //4 出奖概率 0x00, //5 出奖概率占用位 0x00, //6 空中抓物 0关闭 1开启 0x00, //7 连续投币赠送 范围0~100 @@ -409,7 +409,7 @@ var data = []byte{ 0x06, //25 放线长度占用位 0x00, //26 礼品下放高度 0x00, //27 礼品下放高度占用位 - 0x14, //28 甩抓长度 + 0x00, //28 甩抓长度 0x00, //29 甩抓保护 0x78, //30 甩抓电压