娃娃机添加日志

This commit is contained in:
DESKTOP-45ANQ2C\unis 2024-09-26 17:21:38 +08:00
parent 7d8eaee2c2
commit 027a2c6732
2 changed files with 6 additions and 33 deletions

View File

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

View File

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