Merge branch 'develop' of git.pogorockgames.com:mango-games/server/game into develop

This commit is contained in:
sk 2024-10-21 14:35:55 +08:00
commit a20383ff3b
3 changed files with 4 additions and 81 deletions

View File

@ -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)

View File

@ -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)
}
}
}
func (this *SceneEx) SceneDestroy(force bool) {
//销毁房间

View File

@ -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 {