From dde83e46a6b501cb26d07d550fc2a405b2d3ccf9 Mon Sep 17 00:00:00 2001 From: "DESKTOP-45ANQ2C\\unis" <121212121@qq.com> Date: Mon, 21 Oct 2024 14:30:53 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=A8=83=E5=A8=83=E6=9C=BA=E6=8A=93?= =?UTF-8?q?=E5=8F=96=E6=A6=82=E7=8E=87=E5=85=AC=E5=BC=8F=E3=80=91=20https:?= =?UTF-8?q?//www.tapd.cn/31044302/prong/stories/view/1131044302001001287?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gamesrv/clawdoll/action_clawdoll.go | 23 ----------- gamesrv/clawdoll/scene_clawdoll.go | 11 ++--- gamesrv/clawdoll/scenepolicy_clawdoll.go | 51 ------------------------ 3 files changed, 4 insertions(+), 81 deletions(-) diff --git a/gamesrv/clawdoll/action_clawdoll.go b/gamesrv/clawdoll/action_clawdoll.go index e01c784..3da5a08 100644 --- a/gamesrv/clawdoll/action_clawdoll.go +++ b/gamesrv/clawdoll/action_clawdoll.go @@ -8,7 +8,6 @@ import ( "mongo.games.com/game/model" "mongo.games.com/game/protocol/clawdoll" "mongo.games.com/game/protocol/machine" - "mongo.games.com/game/srvdata" "mongo.games.com/goserver/core/basic" "mongo.games.com/goserver/core/logger" "mongo.games.com/goserver/core/netlib" @@ -240,28 +239,6 @@ func (h *CSGetPlayerLogHandler) Process(s *netlib.Session, packetid int, data in var err error var ItemLogs []model.ClawdollSuccessItemLog - if rule.DebugSwitch { - var items []*model.Item - itemData := srvdata.GameItemMgr.Get(p.Platform, common.ItemIDClawdoll) - if itemData != nil { - items = append(items, &model.Item{ - ItemId: common.ItemIDClawdoll, - ItemNum: int64(machineInfo.CostItemNum), - }) - } - - p.AddItems(&model.AddItemParam{ - Platform: p.Platform, - SnId: p.SnId, - Change: items, - GainWay: common.GainWayClawdollCostItem, - Operator: "system", - Remark: "娃娃机上分扣除道具", - GameId: int64(sceneEx.GameId), - GameFreeId: int64(sceneEx.GetGameFreeId()), - }) - } - //娃娃机道具使用日志 task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} { ItemLogs, err = model.GetClawdollSuccessItemLog(p.Platform, p.SnId) diff --git a/gamesrv/clawdoll/scene_clawdoll.go b/gamesrv/clawdoll/scene_clawdoll.go index efa13c4..a1d6849 100644 --- a/gamesrv/clawdoll/scene_clawdoll.go +++ b/gamesrv/clawdoll/scene_clawdoll.go @@ -150,14 +150,11 @@ func (this *SceneEx) OnPlayerLeave(p *base.Player, reason int) { return } - if !rule.DebugSwitch { - if len(this.players) <= 0 { - logger.Logger.Trace("Clawdoll (*SceneEx) OnPlayerLeave, cur player num = ", len(this.players)) - // 发送http Get请求 关闭直播间流 - operateTask(this, 2, rule.Zego_ForbidRTCStream, p.Platform) - } + if len(this.players) <= 0 { + logger.Logger.Trace("Clawdoll (*SceneEx) OnPlayerLeave, cur player num = ", len(this.players)) + // 发送http Get请求 关闭直播间流 + operateTask(this, 2, rule.Zego_ForbidRTCStream, p.Platform) } - } func (this *SceneEx) SceneDestroy(force bool) { //销毁房间 diff --git a/gamesrv/clawdoll/scenepolicy_clawdoll.go b/gamesrv/clawdoll/scenepolicy_clawdoll.go index 188dab5..7a5fbcc 100644 --- a/gamesrv/clawdoll/scenepolicy_clawdoll.go +++ b/gamesrv/clawdoll/scenepolicy_clawdoll.go @@ -530,23 +530,6 @@ func (this *StateWait) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, par // 1-前 2-后 3-左 4-右 5-投币 sceneEx.OnPlayerSMPerateOp(p.SnId, int32(sceneEx.machineId), rule.ButtonPayCoin) - if rule.DebugSwitch { - playerEx.CostPlayCoin() - - sceneEx.playingSnid = p.SnId - - //发送向前移动指令 - //sceneEx.OnPlayerSMPerateOp(p.SnId, int32(sceneEx.machineId), rule.ButtonBack) - - s.ChangeSceneState(rule.ClawDollSceneStateStart) - sceneEx.SetPlayingState(int32(rule.ClawDollSceneStateStart)) - - ClawdollBroadcastRoomState(s) - ClawdollSendPlayerInfo(s) - - ClawdollBroadcastPlayingInfo(s) - } - logger.Logger.Trace("(ClawDoll this *StateWait) OnPlayerOp payCoin, sceneId=", s.GetSceneId(), " player=", p.SnId, " machineId=", sceneEx.machineId) //sceneEx.OnPlayerSCOp(p, opcode, clawdoll.OpResultCode_OPRC_Success, params) @@ -692,24 +675,6 @@ func (this *PlayGame) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, para //1-弱力抓 2 -强力抓 sceneEx.OnPlayerSMGrabOp(p.SnId, int32(sceneEx.machineId), grapType) - if rule.DebugSwitch { - if sceneEx.RoundId/2 == 1 { - // 获得娃娃卡 - playerEx.CatchCardClawdoll() - - playerEx.IsWin = true - - } else { - playerEx.IsWin = false - } - - s.ChangeSceneState(rule.ClawDollSceneStateBilled) - sceneEx.SetPlayingState(int32(rule.ClawDollSceneStateBilled)) - - ClawdollBroadcastRoomState(s) - ClawdollSendPlayerInfo(s) - } - sceneEx.Gaming = false case rule.ClawDollPlayerOpMove: @@ -934,22 +899,6 @@ func (this *StateWaitPayCoin) OnPlayerOp(s *base.Scene, p *base.Player, opcode i playerEx.ReStartGame() sceneEx.OnPlayerSCOp(p, opcode, clawdoll.OpResultCode_OPRC_Success, params) - if rule.DebugSwitch { - playerEx.CostPlayCoin() - - sceneEx.playingSnid = p.SnId - - //发送向前移动指令 - //sceneEx.OnPlayerSMPerateOp(p.SnId, int32(sceneEx.machineId), rule.ButtonBack) - - s.ChangeSceneState(rule.ClawDollSceneStateStart) - sceneEx.SetPlayingState(int32(rule.ClawDollSceneStateStart)) - - ClawdollBroadcastRoomState(s) - ClawdollSendPlayerInfo(s) - - ClawdollBroadcastPlayingInfo(s) - } case rule.ClawDollPlayerCancelPayCoin: if sceneEx.playingSnid != playerEx.SnId {