Compare commits
4 Commits
548681d435
...
a842987444
Author | SHA1 | Date |
---|---|---|
|
a842987444 | |
|
2693793aa9 | |
|
368cb70732 | |
|
41ddf30336 |
|
@ -18,6 +18,7 @@ type PlayerEx struct {
|
||||||
IsWin bool // 是否抓到娃娃
|
IsWin bool // 是否抓到娃娃
|
||||||
gainCoin int64 // 本局赢的金币
|
gainCoin int64 // 本局赢的金币
|
||||||
taxCoin int64 //本局税收
|
taxCoin int64 //本局税收
|
||||||
|
lastIsWin bool // 上一局是否抓到娃娃
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *PlayerEx) Clear(baseScore int32) {
|
func (this *PlayerEx) Clear(baseScore int32) {
|
||||||
|
@ -27,6 +28,7 @@ func (this *PlayerEx) Clear(baseScore int32) {
|
||||||
|
|
||||||
this.gainCoin = 0
|
this.gainCoin = 0
|
||||||
this.IsWin = false
|
this.IsWin = false
|
||||||
|
this.lastIsWin = false
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *PlayerEx) CanOp(sceneEx *SceneEx) bool {
|
func (this *PlayerEx) CanOp(sceneEx *SceneEx) bool {
|
||||||
|
@ -233,7 +235,7 @@ func (this *PlayerEx) SendPlayerGameBilled(RoundId int32) {
|
||||||
if this != nil {
|
if this != nil {
|
||||||
|
|
||||||
result := 0
|
result := 0
|
||||||
if this.IsWin {
|
if this.lastIsWin {
|
||||||
result = 1
|
result = 1
|
||||||
}
|
}
|
||||||
pack := &clawdoll.SCCLAWDOLLRoundGameBilled{
|
pack := &clawdoll.SCCLAWDOLLRoundGameBilled{
|
||||||
|
|
|
@ -804,6 +804,7 @@ func (this *StateBilled) OnEnter(s *base.Scene) {
|
||||||
sceneEx.SaveGamePlayerListLog(playerEx.SnId, logParam)
|
sceneEx.SaveGamePlayerListLog(playerEx.SnId, logParam)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
playerEx.lastIsWin = playerEx.IsWin
|
||||||
playerEx.ReStartGame()
|
playerEx.ReStartGame()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -933,6 +934,8 @@ func (this *StateWaitPayCoin) OnEnter(s *base.Scene) {
|
||||||
playingEx := sceneEx.GetPlayingEx()
|
playingEx := sceneEx.GetPlayingEx()
|
||||||
if playingEx != nil {
|
if playingEx != nil {
|
||||||
playingEx.SendPlayerGameBilled(int32(sceneEx.RoundId))
|
playingEx.SendPlayerGameBilled(int32(sceneEx.RoundId))
|
||||||
|
|
||||||
|
playingEx.lastIsWin = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -181,6 +181,10 @@ func DollMachineGrabResult(conn *machinedoll.Conn, snid, id int32) {
|
||||||
n, err := conn.Read(buf)
|
n, err := conn.Read(buf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Logger.Error("Failed to read response from client:", err)
|
logger.Logger.Error("Failed to read response from client:", err)
|
||||||
|
err := conn.Conn.Close()
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 将读取到的数据按照 221 进行分割
|
// 将读取到的数据按照 221 进行分割
|
||||||
|
|
|
@ -383,7 +383,7 @@ var data = []byte{
|
||||||
0x00, //1 几币几玩占用位
|
0x00, //1 几币几玩占用位
|
||||||
0x2D, //2 游戏时间
|
0x2D, //2 游戏时间
|
||||||
0x01, //3 出奖模式0 无概率 1 随机模式 2 固定模式 3 冠兴模式
|
0x01, //3 出奖模式0 无概率 1 随机模式 2 固定模式 3 冠兴模式
|
||||||
0x0F, //4 出奖概率
|
0x0A, //4 出奖概率
|
||||||
0x00, //5 出奖概率占用位
|
0x00, //5 出奖概率占用位
|
||||||
0x00, //6 空中抓物 0关闭 1开启
|
0x00, //6 空中抓物 0关闭 1开启
|
||||||
0x00, //7 连续投币赠送 范围0~100
|
0x00, //7 连续投币赠送 范围0~100
|
||||||
|
@ -409,7 +409,7 @@ var data = []byte{
|
||||||
0x06, //25 放线长度占用位
|
0x06, //25 放线长度占用位
|
||||||
0x00, //26 礼品下放高度
|
0x00, //26 礼品下放高度
|
||||||
0x00, //27 礼品下放高度占用位
|
0x00, //27 礼品下放高度占用位
|
||||||
0x14, //28 甩抓长度
|
0x00, //28 甩抓长度
|
||||||
0x00, //29 甩抓保护
|
0x00, //29 甩抓保护
|
||||||
|
|
||||||
0x78, //30 甩抓电压
|
0x78, //30 甩抓电压
|
||||||
|
|
Loading…
Reference in New Issue