Merge branch 'develop' of git.pogorockgames.com:mango-games/server/game into develop
This commit is contained in:
commit
a20383ff3b
|
@ -8,7 +8,6 @@ import (
|
||||||
"mongo.games.com/game/model"
|
"mongo.games.com/game/model"
|
||||||
"mongo.games.com/game/protocol/clawdoll"
|
"mongo.games.com/game/protocol/clawdoll"
|
||||||
"mongo.games.com/game/protocol/machine"
|
"mongo.games.com/game/protocol/machine"
|
||||||
"mongo.games.com/game/srvdata"
|
|
||||||
"mongo.games.com/goserver/core/basic"
|
"mongo.games.com/goserver/core/basic"
|
||||||
"mongo.games.com/goserver/core/logger"
|
"mongo.games.com/goserver/core/logger"
|
||||||
"mongo.games.com/goserver/core/netlib"
|
"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 err error
|
||||||
var ItemLogs []model.ClawdollSuccessItemLog
|
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{} {
|
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||||
ItemLogs, err = model.GetClawdollSuccessItemLog(p.Platform, p.SnId)
|
ItemLogs, err = model.GetClawdollSuccessItemLog(p.Platform, p.SnId)
|
||||||
|
|
|
@ -150,14 +150,11 @@ func (this *SceneEx) OnPlayerLeave(p *base.Player, reason int) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if !rule.DebugSwitch {
|
|
||||||
if len(this.players) <= 0 {
|
if len(this.players) <= 0 {
|
||||||
logger.Logger.Trace("Clawdoll (*SceneEx) OnPlayerLeave, cur player num = ", len(this.players))
|
logger.Logger.Trace("Clawdoll (*SceneEx) OnPlayerLeave, cur player num = ", len(this.players))
|
||||||
// 发送http Get请求 关闭直播间流
|
// 发送http Get请求 关闭直播间流
|
||||||
operateTask(this, 2, rule.Zego_ForbidRTCStream, p.Platform)
|
operateTask(this, 2, rule.Zego_ForbidRTCStream, p.Platform)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
func (this *SceneEx) SceneDestroy(force bool) {
|
func (this *SceneEx) SceneDestroy(force bool) {
|
||||||
//销毁房间
|
//销毁房间
|
||||||
|
|
|
@ -530,23 +530,6 @@ func (this *StateWait) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, par
|
||||||
// 1-前 2-后 3-左 4-右 5-投币
|
// 1-前 2-后 3-左 4-右 5-投币
|
||||||
sceneEx.OnPlayerSMPerateOp(p.SnId, int32(sceneEx.machineId), rule.ButtonPayCoin)
|
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)
|
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)
|
//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 -强力抓
|
//1-弱力抓 2 -强力抓
|
||||||
sceneEx.OnPlayerSMGrabOp(p.SnId, int32(sceneEx.machineId), grapType)
|
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
|
sceneEx.Gaming = false
|
||||||
|
|
||||||
case rule.ClawDollPlayerOpMove:
|
case rule.ClawDollPlayerOpMove:
|
||||||
|
@ -934,22 +899,6 @@ func (this *StateWaitPayCoin) OnPlayerOp(s *base.Scene, p *base.Player, opcode i
|
||||||
playerEx.ReStartGame()
|
playerEx.ReStartGame()
|
||||||
|
|
||||||
sceneEx.OnPlayerSCOp(p, opcode, clawdoll.OpResultCode_OPRC_Success, params)
|
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:
|
case rule.ClawDollPlayerCancelPayCoin:
|
||||||
if sceneEx.playingSnid != playerEx.SnId {
|
if sceneEx.playingSnid != playerEx.SnId {
|
||||||
|
|
Loading…
Reference in New Issue