diff --git a/gamesrv/clawdoll/action_clawdoll.go b/gamesrv/clawdoll/action_clawdoll.go index ab4f06c..75837bb 100644 --- a/gamesrv/clawdoll/action_clawdoll.go +++ b/gamesrv/clawdoll/action_clawdoll.go @@ -114,6 +114,7 @@ func MSDollMachineoCoinResultHandler(session *netlib.Session, packetId int, data logger.Logger.Tracef("下抓成功!!!!!!!!!!!!snid = %v", msg.Snid) } else { logger.Logger.Tracef("下抓失败!!!!!!!!!!!!snid = %v", msg.Snid) + playerEx.IsWin = false } diff --git a/gamesrv/clawdoll/player_clawdoll.go b/gamesrv/clawdoll/player_clawdoll.go index d303fd1..5cc463d 100644 --- a/gamesrv/clawdoll/player_clawdoll.go +++ b/gamesrv/clawdoll/player_clawdoll.go @@ -12,14 +12,9 @@ type PlayerEx struct { *base.Player //玩家信息 clawDollState int32 // 抓娃娃状态 - dollCardsCnt int32 // 娃娃卡数量 - - IsWin bool // 是否抓到娃娃 - - winDollCardType int32 // 本局赢取娃娃的类型 - gainCoin int64 // 本局赢的金币 - taxCoin int64 // 本局税收 - odds int32 + IsWin bool // 是否抓到娃娃 + gainCoin int64 // 本局赢的金币 + taxCoin int64 //本局税收 } func (this *PlayerEx) Clear(baseScore int32) { @@ -28,8 +23,6 @@ func (this *PlayerEx) Clear(baseScore int32) { this.MarkFlag(base.PlayerState_Ready) this.gainCoin = 0 - this.taxCoin = 0 - this.odds = 0 this.IsWin = false } @@ -119,6 +112,7 @@ func (this *PlayerEx) CostPlayCoin() bool { GameFreeId: int64(sceneEx.GetGameFreeId()), }) + logger.Logger.Tracef("Clawdoll (*PlayerEx) CostPlayCoin, items = %v", items) return true } @@ -162,6 +156,7 @@ func (this *PlayerEx) CatchCardClawdoll() bool { GameFreeId: int64(sceneEx.GetGameFreeId()), }) + logger.Logger.Tracef("Clawdoll (*PlayerEx) CatchCardClawdoll, items = %v", items) return true } @@ -193,38 +188,15 @@ func (this *PlayerEx) CanGrab() bool { // 游戏新一局 设置数据 func (this *PlayerEx) ReStartGame() { - this.ReDataStartGame() this.UnmarkFlag(base.PlayerState_WaitNext) this.UnmarkFlag(base.PlayerState_GameBreak) this.MarkFlag(base.PlayerState_Ready) this.gainCoin = 0 - this.taxCoin = 0 - this.odds = 0 this.IsWin = false } -// 初始化 -func (this *PlayerEx) InitData(baseScore int32) { - -} - -// 重置数据 -func (this *PlayerEx) ResetData() { - -} - -// 游戏新一局 设置数据 -func (this *PlayerEx) ReDataStartGame() { - -} - -func (this *PlayerEx) CanPlayerOpInState(sceneState int) bool { - - return false -} - // 能否退出游戏 func (this *PlayerEx) CanLeaveScene(sceneState int) bool {