From 1a14a35da9b9f6be1d5d7cbecbae2eb38bb82509 Mon Sep 17 00:00:00 2001 From: by <123456@qq.com> Date: Mon, 9 Sep 2024 09:29:51 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=B8=8B=E6=8A=93=E4=B8=8D=E8=B5=B0?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E9=98=9F=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machine/action/action_server.go | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/machine/action/action_server.go b/machine/action/action_server.go index 2eb245c..a1b1a54 100644 --- a/machine/action/action_server.go +++ b/machine/action/action_server.go @@ -141,18 +141,20 @@ func SMDollMachineGrabHandler(session *netlib.Session, packetId int, data interf switch msg.GetTypeId() { case 1: //弱抓 - f1 := []func(){ - func() { machinedoll.WeakGrab(conn) }, - } - f2 := []func(){} - Process(conn, f1, f2) + /* f1 := []func(){ + func() { machinedoll.WeakGrab(conn) }, + } + f2 := []func(){} + Process(conn, f1, f2)*/ + machinedoll.WeakGrab(conn) case 2: //强力抓 - f1 := []func(){ - func() { machinedoll.Grab(conn) }, - } - f2 := []func(){} - Process(conn, f1, f2) + /* f1 := []func(){ + func() { machinedoll.Grab(conn) }, + } + f2 := []func(){} + Process(conn, f1, f2)*/ + machinedoll.Grab(conn) } return nil } From 18f67b7d2213e957d3dde847f64b2c79c1ad3d89 Mon Sep 17 00:00:00 2001 From: by <123456@qq.com> Date: Mon, 9 Sep 2024 09:45:15 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=B1=8F=E8=94=BD=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=90=91=E5=89=8D=E8=B5=B0=E4=B8=80=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gamesrv/clawdoll/action_clawdoll.go | 2 +- machine/action/action_server.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gamesrv/clawdoll/action_clawdoll.go b/gamesrv/clawdoll/action_clawdoll.go index 6b4800f..d1f2194 100644 --- a/gamesrv/clawdoll/action_clawdoll.go +++ b/gamesrv/clawdoll/action_clawdoll.go @@ -77,7 +77,7 @@ func MSDollMachineoCoinResultHandler(session *netlib.Session, packetId int, data if msg.Result == 1 { logger.Logger.Tracef("上分成功!!!!!!!!!!!!snid = ", msg.Snid) //发送向前移动指令 - sceneEx.OnPlayerSMPerateOp(p.SnId, int32(sceneEx.machineId), rule.ButtonFront) + //sceneEx.OnPlayerSMPerateOp(p.SnId, int32(sceneEx.machineId), rule.ButtonFront) s.ChangeSceneState(rule.ClawDollSceneStateStart) sceneEx.SetPlayingState(int32(rule.ClawDollSceneStateStart)) diff --git a/machine/action/action_server.go b/machine/action/action_server.go index a1b1a54..4ab11d5 100644 --- a/machine/action/action_server.go +++ b/machine/action/action_server.go @@ -119,6 +119,7 @@ func SMDollMachinePerateHandler(session *netlib.Session, packetId int, data inte Process(conn, f1, f2) case 5: //投币 + fmt.Println("===========玩家投币===========") machinedoll.Coin(conn) go DollMachineGrabResult(session, conn, msg.Snid, msg.GetId()) } From ea6ef0be41e50cc65559c8bc046d6352e97283f0 Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Mon, 9 Sep 2024 10:21:24 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=88=BF=E5=8D=A1=E6=89=A3=E9=99=A4?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/action_friend.go | 2 +- worldsrv/action_game.go | 4 ++-- worldsrv/scenepolicydata.go | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/worldsrv/action_friend.go b/worldsrv/action_friend.go index 92c6dfe..0f15b4d 100644 --- a/worldsrv/action_friend.go +++ b/worldsrv/action_friend.go @@ -354,7 +354,7 @@ func (this *CSInviteFriendHandler) Process(s *netlib.Session, packetid int, data return nil } //私有房间 - if p.scene.sceneMode != common.SceneModePrivate { + if !p.scene.IsPrivateScene() && !p.scene.IsCustom() { logger.Logger.Warn("CSInviteFriendHandler scene is common.SceneMode_Private") opRetCode = friend.OpResultCode_OPRC_InviteFriend_RoomLimit send(p) diff --git a/worldsrv/action_game.go b/worldsrv/action_game.go index fcacfc2..829aede 100644 --- a/worldsrv/action_game.go +++ b/worldsrv/action_game.go @@ -1249,7 +1249,7 @@ func CSCreatePrivateRoomHandler(s *netlib.Session, packetId int, data interface{ costType = int64(msg.GetCostType()) } if costType < 1 || costType > 2 { - costType = 1 // 默认房主支付 + costType = 1 // 默认AA } // 语音 if cfg.GetVoice() != 3 { @@ -1335,7 +1335,7 @@ func CSCreatePrivateRoomHandler(s *netlib.Session, packetId int, data interface{ return nil } - if cfg.GetCostType() == 1 { + if cfg.GetCostType() == 2 { sp.CostPayment(scene, p) } diff --git a/worldsrv/scenepolicydata.go b/worldsrv/scenepolicydata.go index 2aa2754..4d5545c 100644 --- a/worldsrv/scenepolicydata.go +++ b/worldsrv/scenepolicydata.go @@ -66,7 +66,7 @@ func (spd *ScenePolicyData) OnSceneState(s *Scene, state int) { case common.SceneStateStart: s.NotifyPrivateRoom(common.ListModify) if s.IsCustom() { - if s.GetCostType() == 2 { + if s.GetCostType() == 1 { for _, v := range s.players { spd.CostPayment(s, v) } @@ -96,7 +96,7 @@ func (spd *ScenePolicyData) CanEnter(s *Scene, p *Player) int { func (spd *ScenePolicyData) costEnough(costType, playerNum int, roomConfig *webapi.RoomConfig, snid int32, f func(items []*model.Item)) bool { isEnough := true var items []*model.Item - if costType == 1 { + if costType == 2 { // 房主 for _, v := range roomConfig.GetCost() { if item := BagMgrSingleton.GetItem(snid, v.GetItemId()); item == nil || item.ItemNum < v.GetItemNum() { @@ -119,7 +119,7 @@ func (spd *ScenePolicyData) costEnough(costType, playerNum int, roomConfig *weba } else { items = append(items, &model.Item{ ItemId: v.GetItemId(), - ItemNum: v.GetItemNum(), + ItemNum: n, }) } } From d27a04020e77369d4f10749259ddece30ed82694 Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Mon, 9 Sep 2024 10:40:26 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=A5=BD=E5=8F=8B=E8=BF=9B=E6=88=BF?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/action_friend.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worldsrv/action_friend.go b/worldsrv/action_friend.go index 0f15b4d..db3bcc2 100644 --- a/worldsrv/action_friend.go +++ b/worldsrv/action_friend.go @@ -461,7 +461,7 @@ func (this *CSInviteFriendOpHandler) Process(s *netlib.Session, packetid int, da return nil } //私有房间 - if scene.sceneMode != common.SceneModePrivate { + if !scene.IsPrivateScene() && !scene.IsCustom() { logger.Logger.Warn("CSInviteFriendHandler scene is common.SceneMode_Private") opRetCode = friend.OpResultCode_OPRC_InviteFriend_RoomLimit //只能进入私有房间 send(p)