修改十三张记分显示

This commit is contained in:
sk 2024-12-04 10:06:59 +08:00
parent 3f35e67a40
commit 5a67d8f073
3 changed files with 13 additions and 2 deletions

View File

@ -105,7 +105,7 @@ type Group struct {
Head [3]int
Mid [5]int
End [5]int
PokerType int
PokerType int // -1 无牌数据0 有牌数据, 1-13 特殊牌型
}
func (p *Group) String() string {

View File

@ -487,6 +487,7 @@ func (this *SceneEx) GetScore(player *PlayerEx) {
player.winAllPlayers[p.Pos] += rate
p.winAllPlayers[player.Pos] -= rate
player.tableScore[3] += rate - 1
p.tableScore[3] -= rate - 1
}
//中墩
rate = int64(1)
@ -509,6 +510,7 @@ func (this *SceneEx) GetScore(player *PlayerEx) {
player.winAllPlayers[p.Pos] += rate
p.winAllPlayers[player.Pos] -= rate
player.tableScore[4] += rate - 1
p.tableScore[4] -= rate - 1
}
//尾墩
rate = int64(1)
@ -529,6 +531,7 @@ func (this *SceneEx) GetScore(player *PlayerEx) {
player.winAllPlayers[p.Pos] += rate
p.winAllPlayers[player.Pos] -= rate
player.tableScore[5] += rate - 1
p.tableScore[5] -= rate - 1
}
if s == 3 {
player.winThreePos[p.Pos] = score

View File

@ -866,6 +866,10 @@ func (this *StateOp) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, param
copy(playerEx.cardsO.Mid[:], common.Int64Toint(params[3:8]))
copy(playerEx.cardsO.End[:], common.Int64Toint(params[8:]))
playerEx.cardsO.PokerType = 0
tp := sceneEx.logic.GetSpecialType(playerEx.cards)
if tp > 0 {
playerEx.cardsO.PokerType = tp
}
sceneEx.SendSelectCards(playerEx, 0, int64(opcode))
} else {
sceneEx.SendSelectCards(playerEx, int(params[0]), int64(opcode))
@ -912,6 +916,10 @@ func (this *StateOp) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, param
copy(playerEx.preCardsO.Mid[:], common.Int64Toint(params[3:8]))
copy(playerEx.preCardsO.End[:], common.Int64Toint(params[8:]))
playerEx.preCardsO.PokerType = 0
tp := sceneEx.logic.GetSpecialType(playerEx.cards)
if tp > 0 {
playerEx.preCardsO.PokerType = tp
}
}
playerEx.SendToClient(int(thirteen.TWMmoPacketID_PACKET_SCThirteenPlayerOp), pack)
@ -948,7 +956,7 @@ func (this *StateOp) OnLeave(s *base.Scene) {
}
// 判断是否倒水
if player.cardsO != nil && player.cardsO.PokerType != -1 {
if player.cardsO.PokerType < 1000000 {
if player.cardsO.PokerType == 0 {
player.isDP = sceneEx.logic.IsDP(player.cardsO.Head, player.cardsO.Mid, player.cardsO.End)
}
continue