Compare commits

...

2 Commits

Author SHA1 Message Date
sk 4947685627 no message 2024-10-15 16:22:39 +08:00
sk db3f7bee67 添加调控开关 2024-10-15 16:15:04 +08:00
10 changed files with 2383 additions and 2344 deletions

View File

@ -409,6 +409,9 @@ func (this *TienLenSceneData) BroadcastOpPos() {
if B < 0 {
isWin = false
}
if this.WGCreateScene.GetCloseCtrl() {
isWin = true
}
isTienLenYule := this.IsTienLenYule()
pack := &tienlen.SCTienLenAIData{
BombNum: 0, //炸弹数量
@ -554,10 +557,12 @@ func (this *TienLenSceneData) GetFreeGameSceneType() int32 {
return this.GetSceneType()
}
// SendHandCard_Match 发牌
// 比赛场发牌
// 纯真人,随机发牌
// 有机器人和真人,真人拿好牌
func (this *TienLenSceneData) SendHandCard_Match() {
// mustRandom 必须随机发牌
func (this *TienLenSceneData) SendHandCard_Match(mustRandom bool) {
this.poker.Shuffle()
buf := this.poker.GetPokerBuf()
cardss := map[int][]int32{}
@ -579,7 +584,7 @@ func (this *TienLenSceneData) SendHandCard_Match() {
}
}
}
if len(realPlayers) > 0 && len(robotPlayers) > 0 {
if !mustRandom && len(realPlayers) > 0 && len(robotPlayers) > 0 {
type gradeInfo struct {
id int
grade int

View File

@ -991,14 +991,18 @@ func (this *SceneHandCardStateTienLen) OnEnter(s *base.Scene) {
if rule.TestOpen {
sceneEx.SendHandCardTest()
} else {
if len(sceneEx.testPokers) > 1 {
sceneEx.SendHandCardOdds()
} else {
if sceneEx.IsMatchScene() || sceneEx.IsCustom() {
sceneEx.SendHandCard_Match()
// 关闭调控发牌
if sceneEx.WGCreateScene.GetCloseCtrl() {
sceneEx.SendHandCard_Match(true)
} else {
sceneEx.SendHandCardOdds()
if sceneEx.IsMatchScene() || sceneEx.IsCustom() {
sceneEx.SendHandCard_Match(false)
} else {
sceneEx.SendHandCardOdds()
}
}
}
}

View File

@ -236,8 +236,8 @@ enum PlayerPacketID {
PACKET_SCClawdollItemLog = 2845;//
PACKET_CSDollConfig = 2846; //
PACKET_SCDollConfig = 2847; //
PACKET_CSPopUpWindowConfig = 2848; //
PACKET_SCPopUpWindowConfig = 2849; //
PACKET_CSPopUpWindowConfig = 2848; //
PACKET_SCPopUpWindowConfig = 2849; //
}
//
@ -1417,12 +1417,12 @@ message CSPopUpWindowConfig{
//
//PACKET_SCPopUpWindowConfig
message SCPopUpWindowConfig{
repeated PopUpWindowInfo Info =1;
repeated PopUpWindowInfo Info = 1;
}
message PopUpWindowInfo{
int32 Id = 1;
string Name = 2;
string Key = 3;
int32 OpenStatus = 4;//1- 0-
int32 Weight = 5;//
int32 Id = 1;
string Name = 2;
string Key = 3;
int32 OpenStatus = 4;//1- 0-
int32 Weight = 5;//
}

File diff suppressed because it is too large Load Diff

View File

@ -205,6 +205,7 @@ message WGCreateScene {
MatchParam Match = 16; //
repeated int32 ChessRank = 26; //
repeated int64 Params = 27; // ,GameRule中定义,
bool CloseCtrl = 28; //
}
//PACKET_WG_DESTROYSCENE

File diff suppressed because it is too large Load Diff

View File

@ -109,6 +109,7 @@ message GameFree {
int32 GroupId = 1; // ID
bool Status = 2; //
server.DB_GameFree DbGameFree = 3; // excel导出结构
bool CloseCtrl = 4; //
}
//
@ -992,13 +993,13 @@ message ClientUpgrade{
//etcd /game/PopUpWindowConfig
message PopUpWindowConfig{
string Platform = 1; //
repeated PopUpWindowInfo Info =2;
string Platform = 1; //
repeated PopUpWindowInfo Info = 2;
}
message PopUpWindowInfo{
int32 Id = 1;
string Name = 2;
string Key = 3;
int32 OpenStatus = 4;//1- 2-
int32 Weight = 5;//
int32 Id = 1;
string Name = 2;
string Key = 3;
int32 OpenStatus = 4;//1- 2-
int32 Weight = 5;//
}

View File

@ -163,6 +163,7 @@ func (this *GameSession) AddScene(args *AddSceneParam) {
Custom: args.S.CustomParam,
Match: args.S.MatchParam,
Params: args.S.params,
CloseCtrl: args.S.CloseCtrl,
}
if args.S.CustomParam.GetRoomConfigId() != 0 {
cfg := PlatformMgrSingleton.GetConfig(args.S.platform.IdStr).RoomConfig[args.S.CustomParam.GetRoomConfigId()]

View File

@ -127,6 +127,7 @@ func (cfg *GameList) GetGameConfig(gameFreeId int32) *webapiproto.GameFree {
func CompareGameFreeConfigChanged(oldCfg, newCfg *webapiproto.GameFree) bool {
if oldCfg.Status != newCfg.Status ||
oldCfg.GroupId != newCfg.GroupId ||
oldCfg.GetCloseCtrl() != newCfg.GetCloseCtrl() ||
oldCfg.DbGameFree.GetBot() != newCfg.DbGameFree.GetBot() ||
oldCfg.DbGameFree.GetBaseScore() != newCfg.DbGameFree.GetBaseScore() ||
oldCfg.DbGameFree.GetLimitCoin() != newCfg.DbGameFree.GetLimitCoin() ||

View File

@ -65,8 +65,10 @@ type Scene struct {
*serverproto.CustomParam // 房卡场参数
*serverproto.MatchParam // 比赛场参数
*webapiproto.RoomConfigSystem // 系统竞技馆房间
csp *CoinScenePool // 所在场景池
hp *HundredSceneMgr // 百人场房间池
CloseCtrl bool // 调控开关
csp *CoinScenePool // 所在场景池
hp *HundredSceneMgr // 百人场房间池
}
// NewScene 创建房间
@ -146,6 +148,10 @@ func NewScene(args *CreateSceneParam) *Scene {
if s.RoomConfigSystem == nil {
s.RoomConfigSystem = new(webapiproto.RoomConfigSystem)
}
gf := PlatformMgrSingleton.GetGameFree(args.Platform.IdStr, args.GameFreeId)
if gf != nil {
s.CloseCtrl = gf.GetCloseCtrl()
}
return s
}