修改十三张记分显示
This commit is contained in:
parent
3f35e67a40
commit
5a67d8f073
|
@ -105,7 +105,7 @@ type Group struct {
|
||||||
Head [3]int
|
Head [3]int
|
||||||
Mid [5]int
|
Mid [5]int
|
||||||
End [5]int
|
End [5]int
|
||||||
PokerType int
|
PokerType int // -1 无牌数据,0 有牌数据, 1-13 特殊牌型
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *Group) String() string {
|
func (p *Group) String() string {
|
||||||
|
|
|
@ -487,6 +487,7 @@ func (this *SceneEx) GetScore(player *PlayerEx) {
|
||||||
player.winAllPlayers[p.Pos] += rate
|
player.winAllPlayers[p.Pos] += rate
|
||||||
p.winAllPlayers[player.Pos] -= rate
|
p.winAllPlayers[player.Pos] -= rate
|
||||||
player.tableScore[3] += rate - 1
|
player.tableScore[3] += rate - 1
|
||||||
|
p.tableScore[3] -= rate - 1
|
||||||
}
|
}
|
||||||
//中墩
|
//中墩
|
||||||
rate = int64(1)
|
rate = int64(1)
|
||||||
|
@ -509,6 +510,7 @@ func (this *SceneEx) GetScore(player *PlayerEx) {
|
||||||
player.winAllPlayers[p.Pos] += rate
|
player.winAllPlayers[p.Pos] += rate
|
||||||
p.winAllPlayers[player.Pos] -= rate
|
p.winAllPlayers[player.Pos] -= rate
|
||||||
player.tableScore[4] += rate - 1
|
player.tableScore[4] += rate - 1
|
||||||
|
p.tableScore[4] -= rate - 1
|
||||||
}
|
}
|
||||||
//尾墩
|
//尾墩
|
||||||
rate = int64(1)
|
rate = int64(1)
|
||||||
|
@ -529,6 +531,7 @@ func (this *SceneEx) GetScore(player *PlayerEx) {
|
||||||
player.winAllPlayers[p.Pos] += rate
|
player.winAllPlayers[p.Pos] += rate
|
||||||
p.winAllPlayers[player.Pos] -= rate
|
p.winAllPlayers[player.Pos] -= rate
|
||||||
player.tableScore[5] += rate - 1
|
player.tableScore[5] += rate - 1
|
||||||
|
p.tableScore[5] -= rate - 1
|
||||||
}
|
}
|
||||||
if s == 3 {
|
if s == 3 {
|
||||||
player.winThreePos[p.Pos] = score
|
player.winThreePos[p.Pos] = score
|
||||||
|
|
|
@ -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.Mid[:], common.Int64Toint(params[3:8]))
|
||||||
copy(playerEx.cardsO.End[:], common.Int64Toint(params[8:]))
|
copy(playerEx.cardsO.End[:], common.Int64Toint(params[8:]))
|
||||||
playerEx.cardsO.PokerType = 0
|
playerEx.cardsO.PokerType = 0
|
||||||
|
tp := sceneEx.logic.GetSpecialType(playerEx.cards)
|
||||||
|
if tp > 0 {
|
||||||
|
playerEx.cardsO.PokerType = tp
|
||||||
|
}
|
||||||
sceneEx.SendSelectCards(playerEx, 0, int64(opcode))
|
sceneEx.SendSelectCards(playerEx, 0, int64(opcode))
|
||||||
} else {
|
} else {
|
||||||
sceneEx.SendSelectCards(playerEx, int(params[0]), int64(opcode))
|
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.Mid[:], common.Int64Toint(params[3:8]))
|
||||||
copy(playerEx.preCardsO.End[:], common.Int64Toint(params[8:]))
|
copy(playerEx.preCardsO.End[:], common.Int64Toint(params[8:]))
|
||||||
playerEx.preCardsO.PokerType = 0
|
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)
|
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 != 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)
|
player.isDP = sceneEx.logic.IsDP(player.cardsO.Head, player.cardsO.Mid, player.cardsO.End)
|
||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue