From 027a2c6732fd155f86d1235166f7b800bb0a5b28 Mon Sep 17 00:00:00 2001 From: "DESKTOP-45ANQ2C\\unis" <179233648@qq.com> Date: Thu, 26 Sep 2024 17:21:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A8=83=E5=A8=83=E6=9C=BA=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gamesrv/clawdoll/action_clawdoll.go | 1 + gamesrv/clawdoll/player_clawdoll.go | 38 ++++------------------------- 2 files changed, 6 insertions(+), 33 deletions(-) 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 {