Compare commits

..

No commits in common. "871c6ed72ff2258a09ddf14b4d63e95ced33ff25" and "46a4255273d23ae78614f40fe5c7a24844881af8" have entirely different histories.

8 changed files with 8 additions and 35 deletions

View File

@ -168,10 +168,10 @@ const (
// 房间模式 // 房间模式
const ( const (
SceneMode_Public = 0 //公共房间 SceneMode_Public = iota //公共房间
SceneMode_Private = 2 //私人房间 SceneMode_Private //私人房间
SceneMode_Match = 3 //赛事房间 SceneMode_Match //赛事房间
SceneMode_Thr = 4 //三方房间 SceneMode_Thr //三方房间
) )
const ( const (

View File

@ -24,7 +24,6 @@ type PlayerEx struct {
odds int32 odds int32
totalScore int64 totalScore int64
defGroup *thirteen.Group defGroup *thirteen.Group
playerPool int // 个人水池分
} }
func (this *PlayerEx) Clear() { func (this *PlayerEx) Clear() {
@ -47,7 +46,6 @@ func (this *PlayerEx) Clear() {
this.odds = 0 this.odds = 0
this.totalScore = 0 this.totalScore = 0
this.defGroup = nil this.defGroup = nil
this.playerPool = 0
this.TestLog = this.TestLog[:0] this.TestLog = this.TestLog[:0]
} }

View File

@ -57,7 +57,6 @@ type PlayerData struct {
allGroup map[int]*rule.Group allGroup map[int]*rule.Group
TestLog []string TestLog []string
RoleId int32 RoleId int32
PlayerPool int // 个人水池分
} }
type SceneEx struct { type SceneEx struct {
@ -82,7 +81,6 @@ type SceneEx struct {
LeaveNum int // 离场扣分人数 LeaveNum int // 离场扣分人数
testPokers []int64 // 测试牌堆 testPokers []int64 // 测试牌堆
logid string logid string
ctrlType int // 1控赢 2控输 0不控
} }
func NewThirteenWaterSceneData(s *base.Scene) *SceneEx { func NewThirteenWaterSceneData(s *base.Scene) *SceneEx {
@ -123,7 +121,6 @@ func (this *SceneEx) Clear() {
this.nowMaxCardsIsIn = true this.nowMaxCardsIsIn = true
this.PlayerBackup = make(map[int32]*PlayerData) this.PlayerBackup = make(map[int32]*PlayerData)
this.LeaveNum = 0 this.LeaveNum = 0
this.ctrlType = 0
for i := 0; i < this.GetPlayerNum(); i++ { for i := 0; i < this.GetPlayerNum(); i++ {
if this.seats[i] != nil { if this.seats[i] != nil {
@ -1313,7 +1310,6 @@ func (this *SceneEx) BackupPlayer(p *PlayerEx, isBilled bool) {
allGroup: p.allGroup, allGroup: p.allGroup,
TestLog: testLog, TestLog: testLog,
RoleId: p.PlayerData.GetRoleId(), RoleId: p.PlayerData.GetRoleId(),
PlayerPool: p.playerPool,
} }
} }
@ -1326,7 +1322,6 @@ func (this *SceneEx) SendHandCardOdds() {
robotPlayers = append(robotPlayers, seat) robotPlayers = append(robotPlayers, seat)
} else { } else {
seat.odds = this.GetPlayerOdds(seat.Player, this.GameId, this.robotNum > 0) seat.odds = this.GetPlayerOdds(seat.Player, this.GameId, this.robotNum > 0)
seat.playerPool = int(this.PlayerPoolOdds(seat.Player))
if seat.odds > 0 { if seat.odds > 0 {
realPlayersGood = append(realPlayersGood, seat) realPlayersGood = append(realPlayersGood, seat)
G += seat.odds G += seat.odds
@ -1392,12 +1387,6 @@ func (this *SceneEx) SendHandCardOdds() {
isGood := len(realPlayersGood) > 0 && int32(this.RandInt(1000)) < G isGood := len(realPlayersGood) > 0 && int32(this.RandInt(1000)) < G
isBad := len(realPlayersBad) > 0 && int32(this.RandInt(1000)) < B isBad := len(realPlayersBad) > 0 && int32(this.RandInt(1000)) < B
logger.Logger.Tracef("Thirteen SendHandCardOdds Good:%v G:%v Bad:%v B:%v", isGood, G, isBad, B) logger.Logger.Tracef("Thirteen SendHandCardOdds Good:%v G:%v Bad:%v B:%v", isGood, G, isBad, B)
if isBad {
this.ctrlType = 2
}
if isGood && !isBad {
this.ctrlType = 1
}
if isGood || isBad { if isGood || isBad {
// 按从大到小排序 // 按从大到小排序
this.cardsSort(cardsArr, cardsGroup) this.cardsSort(cardsArr, cardsGroup)

View File

@ -1208,11 +1208,9 @@ func (this *StateBilled) OnEnter(s *base.Scene) {
if sceneEx, ok := s.ExtraData.(*SceneEx); ok { if sceneEx, ok := s.ExtraData.(*SceneEx); ok {
//通知客户端结算结果 //通知客户端结算结果
var billed []*thirteen.Billed var billed []*thirteen.Billed
playerPool := map[int]int{}
// 没离开,剩余玩家结算 // 没离开,剩余玩家结算
for _, playerEx := range sceneEx.players { for _, playerEx := range sceneEx.players {
if playerEx != nil && playerEx.IsGameing() { if playerEx != nil && playerEx.IsGameing() {
playerPool[int(playerEx.SnId)] = playerEx.playerPool
if playerEx.gainCoin > 0 { if playerEx.gainCoin > 0 {
//税前赢的钱 税收 下注额 //税前赢的钱 税收 下注额
playerEx.AddServiceFee(playerEx.taxCoin) playerEx.AddServiceFee(playerEx.taxCoin)
@ -1237,7 +1235,6 @@ func (this *StateBilled) OnEnter(s *base.Scene) {
// 提前离开的 // 提前离开的
for _, playerEx := range sceneEx.PlayerBackup { for _, playerEx := range sceneEx.PlayerBackup {
if playerEx != nil && playerEx.isBilled { if playerEx != nil && playerEx.isBilled {
playerPool[int(playerEx.SnId)] = playerEx.PlayerPool
billed = append(billed, &thirteen.Billed{ billed = append(billed, &thirteen.Billed{
Pos: proto.Int32(int32(playerEx.Pos)), Pos: proto.Int32(int32(playerEx.Pos)),
Coin: proto.Int64(playerEx.Coin), Coin: proto.Int64(playerEx.Coin),
@ -1393,11 +1390,7 @@ func (this *StateBilled) OnEnter(s *base.Scene) {
thirteenWaterType.PlayerCount = len(person) thirteenWaterType.PlayerCount = len(person)
info, err := model.MarshalGameNoteByFIGHT(&thirteenWaterType) info, err := model.MarshalGameNoteByFIGHT(&thirteenWaterType)
if err == nil { if err == nil {
sceneEx.SaveGameDetailedLog(sceneEx.logid, info, &base.GameDetailedParam{ sceneEx.SaveGameDetailedLog(sceneEx.logid, info, &base.GameDetailedParam{})
Trend20Lately: "",
CtrlType: sceneEx.ctrlType,
PlayerPool: playerPool,
})
} }
} }
} }

View File

@ -1055,13 +1055,6 @@ func GetPlayerDataBySnId(plt string, snid int32, correctData, createIfNotExist b
logger.Logger.Tracef("Get %v %v player data error:%v", plt, snid, err) logger.Logger.Tracef("Get %v %v player data error:%v", plt, snid, err)
return nil, false return nil, false
} }
// 设置本地时区
ret.Pd.UpgradeTime = ret.Pd.UpgradeTime.Local()
ret.Pd.CreateTime = ret.Pd.CreateTime.Local()
ret.Pd.LastLoginTime = ret.Pd.LastLoginTime.Local()
ret.Pd.LastLogoutTime = ret.Pd.LastLogoutTime.Local()
return ret.Pd, ret.IsNew return ret.Pd, ret.IsNew
} }

View File

@ -4726,7 +4726,7 @@ type CSQueryRoomInfo struct {
GameIds []int32 `protobuf:"varint,1,rep,packed,name=GameIds,proto3" json:"GameIds,omitempty"` GameIds []int32 `protobuf:"varint,1,rep,packed,name=GameIds,proto3" json:"GameIds,omitempty"`
GameSite int32 `protobuf:"varint,2,opt,name=GameSite,proto3" json:"GameSite,omitempty"` //1.初级 2.中级 3.高级 GameSite int32 `protobuf:"varint,2,opt,name=GameSite,proto3" json:"GameSite,omitempty"` //1.初级 2.中级 3.高级
Id []int32 `protobuf:"varint,3,rep,packed,name=Id,proto3" json:"Id,omitempty"` //gamefreeid Id []int32 `protobuf:"varint,3,rep,packed,name=Id,proto3" json:"Id,omitempty"` //gamefreeid
SceneMode int32 `protobuf:"varint,4,opt,name=SceneMode,proto3" json:"SceneMode,omitempty"` // 0公共房 2私人房 SceneMode int32 `protobuf:"varint,4,opt,name=SceneMode,proto3" json:"SceneMode,omitempty"` // 0公共房 1私人房
} }
func (x *CSQueryRoomInfo) Reset() { func (x *CSQueryRoomInfo) Reset() {

View File

@ -615,7 +615,7 @@ message CSQueryRoomInfo{
repeated int32 GameIds = 1; repeated int32 GameIds = 1;
int32 GameSite = 2; //1. 2. 3. int32 GameSite = 2; //1. 2. 3.
repeated int32 Id = 3; //gamefreeid repeated int32 Id = 3; //gamefreeid
int32 SceneMode = 4; // 0 2 int32 SceneMode = 4; // 0 1
} }
// //

2
public

@ -1 +1 @@
Subproject commit 549a622ad237392dddedae5d13456a06a8328fdd Subproject commit 7f2452e10c176dc35fc5ed1ffdb0b4145aec8160