This commit is contained in:
sk 2024-05-10 18:23:03 +08:00
parent 995cabbea6
commit d7316c0ef2
14 changed files with 30 additions and 50 deletions

View File

@ -486,14 +486,6 @@ func init() {
p := base.PlayerMgrSington.GetPlayerBySnId(wgSetPlayerBlackLevel.GetSnId()) p := base.PlayerMgrSington.GetPlayerBySnId(wgSetPlayerBlackLevel.GetSnId())
if p != nil { if p != nil {
p.WBLevel = wgSetPlayerBlackLevel.GetWBLevel() p.WBLevel = wgSetPlayerBlackLevel.GetWBLevel()
if p.WBLevel > 0 {
p.WhiteLevel = p.WBLevel
} else if p.WBLevel < 0 {
p.BlackLevel = -p.WBLevel
} else {
p.WhiteLevel = 0
p.BlackLevel = 0
}
p.WBCoinLimit = wgSetPlayerBlackLevel.GetWBCoinLimit() p.WBCoinLimit = wgSetPlayerBlackLevel.GetWBCoinLimit()
p.WBMaxNum = wgSetPlayerBlackLevel.GetMaxNum() p.WBMaxNum = wgSetPlayerBlackLevel.GetMaxNum()
p.WBState = wgSetPlayerBlackLevel.GetState() p.WBState = wgSetPlayerBlackLevel.GetState()

View File

@ -125,12 +125,12 @@ func (this *AvengersPlayerData) SavePlayerGameData(gameFreeId string) {
// 黑白名单的限制是否生效 // 黑白名单的限制是否生效
func (this *AvengersPlayerData) CheckBlackWriteList(isWin bool) bool { func (this *AvengersPlayerData) CheckBlackWriteList(isWin bool) bool {
if isWin && this.BlackLevel > 0 && this.BlackLevel <= 10 { if isWin && -this.WBLevel > 0 && -this.WBLevel <= 10 {
if rand.Int31n(100) < this.BlackLevel*10 { if rand.Int31n(100) < -this.WBLevel*10 {
return true return true
} }
} else if !isWin && this.WhiteLevel > 0 && this.WhiteLevel <= 10 { } else if !isWin && this.WBLevel > 0 && this.WBLevel <= 10 {
if rand.Int31n(100) < this.WhiteLevel*10 { if rand.Int31n(100) < this.WBLevel*10 {
return true return true
} }
} }

View File

@ -547,7 +547,7 @@ func (this *SceneStateAvengersStart) OnPlayerOp(s *base.Scene, p *base.Player, o
writeBlackTryTimes++ writeBlackTryTimes++
goto WriteBlack goto WriteBlack
} else if writeBlackTryTimes >= 100 && writeBlackTryTimes != 999 { } else if writeBlackTryTimes >= 100 && writeBlackTryTimes != 999 {
logger.Logger.Warnf("AvengersWriteBlackTryTimesOver [%v][%v][%v][%v][%v]", sceneEx.GetGameFreeId(), playerEx.SnId, gamePoolCoin, playerEx.BlackLevel, playerEx.WhiteLevel) logger.Logger.Warnf("AvengersWriteBlackTryTimesOver [%v][%v][%v][%v]", sceneEx.GetGameFreeId(), playerEx.SnId, gamePoolCoin, playerEx.WBLevel)
} }
//if playerEx.DebugGame && sceneEx.SceneType == 1 { //if playerEx.DebugGame && sceneEx.SceneType == 1 {

View File

@ -113,9 +113,6 @@ type Player struct {
cparams map[string]string //平台登陆数据 cparams map[string]string //平台登陆数据
Iparams map[int]int64 //整形参数 Iparams map[int]int64 //整形参数
sparams map[int]string //字符参数 sparams map[int]string //字符参数
WhiteLevel int32 //todo 使用WBLevel
BlackLevel int32 //todo 使用WBLevel
SingleAdjust *model.PlayerSingleAdjust
IsLocal bool //是否本地player IsLocal bool //是否本地player
Items map[int32]int64 //背包数据 Items map[int32]int64 //背包数据
MatchParams []int32 //比赛参数 排名、段位、假snid、假角色 MatchParams []int32 //比赛参数 排名、段位、假snid、假角色
@ -175,11 +172,6 @@ func (this *Player) init(data []byte) bool {
if this.GDatas == nil { if this.GDatas == nil {
this.GDatas = make(map[string]*model.PlayerGameInfo) this.GDatas = make(map[string]*model.PlayerGameInfo)
} }
if this.WBLevel > 0 {
this.WhiteLevel = this.WBLevel
} else if this.WBLevel < 0 {
this.BlackLevel = -this.WBLevel
}
return true return true
} }

View File

@ -561,7 +561,7 @@ func (this *Scene) PlayerEnter(p *Player, isLoaded bool) {
//避免游戏接口异常 //避免游戏接口异常
utils.RunPanicless(func() { this.sp.OnPlayerEnter(this, p) }) utils.RunPanicless(func() { this.sp.OnPlayerEnter(this, p) })
if p.BlackLevel > 0 { if p.WBLevel < 0 {
WarningBlackPlayer(p.SnId, this.DbGameFree.Id) WarningBlackPlayer(p.SnId, this.DbGameFree.Id)
} }
@ -2336,10 +2336,6 @@ func (this *Scene) SyncPlayerDatas(param *PlayerDataParam) int64 {
if v.WBGain != 0 { if v.WBGain != 0 {
if p := this.GetPlayer(v.SnId); p != nil { if p := this.GetPlayer(v.SnId); p != nil {
n = p.WBUpdate(v.WBGain) n = p.WBUpdate(v.WBGain)
if p.WBLevel == 0 {
p.BlackLevel = 0
p.WhiteLevel = 0
}
} }
} }
} }

View File

@ -125,12 +125,12 @@ func (this *CaiShenPlayerData) SavePlayerGameData(gameFreeId string) {
// 黑白名单的限制是否生效 // 黑白名单的限制是否生效
func (this *CaiShenPlayerData) CheckBlackWriteList(isWin bool) bool { func (this *CaiShenPlayerData) CheckBlackWriteList(isWin bool) bool {
if isWin && this.BlackLevel > 0 && this.BlackLevel <= 10 { if isWin && -this.WBLevel > 0 && -this.WBLevel <= 10 {
if rand.Int31n(100) < this.BlackLevel*10 { if rand.Int31n(100) < -this.WBLevel*10 {
return true return true
} }
} else if !isWin && this.WhiteLevel > 0 && this.WhiteLevel <= 10 { } else if !isWin && this.WBLevel > 0 && this.WBLevel <= 10 {
if rand.Int31n(100) < this.WhiteLevel*10 { if rand.Int31n(100) < this.WBLevel*10 {
return true return true
} }
} }

View File

@ -543,7 +543,7 @@ func (this *SceneStateCaiShenStart) OnPlayerOp(s *base.Scene, p *base.Player, op
writeBlackTryTimes++ writeBlackTryTimes++
goto WriteBlack goto WriteBlack
} else if writeBlackTryTimes >= 100 && writeBlackTryTimes != 999 { } else if writeBlackTryTimes >= 100 && writeBlackTryTimes != 999 {
logger.Logger.Warnf("CaiShenWriteBlackTryTimesOver [%v][%v][%v][%v][%v]", sceneEx.GetGameFreeId(), playerEx.SnId, gamePoolCoin, playerEx.BlackLevel, playerEx.WhiteLevel) logger.Logger.Warnf("CaiShenWriteBlackTryTimesOver [%v][%v][%v][%v]", sceneEx.GetGameFreeId(), playerEx.SnId, gamePoolCoin, playerEx.WBLevel)
} }
// 奖池水池处理 // 奖池水池处理
if spinRes.IsJackpot { if spinRes.IsJackpot {

View File

@ -124,12 +124,12 @@ func (this *EasterIslandPlayerData) SavePlayerGameData(gameFreeId string) {
// 黑白名单的限制是否生效 // 黑白名单的限制是否生效
func (this *EasterIslandPlayerData) CheckBlackWriteList(isWin bool) bool { func (this *EasterIslandPlayerData) CheckBlackWriteList(isWin bool) bool {
if isWin && this.BlackLevel > 0 && this.BlackLevel <= 10 { if isWin && -this.WBLevel > 0 && -this.WBLevel <= 10 {
if rand.Int31n(100) < this.BlackLevel*10 { if rand.Int31n(100) < -this.WBLevel*10 {
return true return true
} }
} else if !isWin && this.WhiteLevel > 0 && this.WhiteLevel <= 10 { } else if !isWin && this.WBLevel > 0 && this.WBLevel <= 10 {
if rand.Int31n(100) < this.WhiteLevel*10 { if rand.Int31n(100) < this.WBLevel*10 {
return true return true
} }
} }

View File

@ -523,7 +523,7 @@ func (this *SceneStateEasterIslandStart) OnPlayerOp(s *base.Scene, p *base.Playe
writeBlackTryTimes++ writeBlackTryTimes++
goto WriteBlack goto WriteBlack
} else if writeBlackTryTimes >= 100 && writeBlackTryTimes != 999 { } else if writeBlackTryTimes >= 100 && writeBlackTryTimes != 999 {
logger.Logger.Warnf("EasterIslandWriteBlackTryTimesOver [%v][%v][%v][%v][%v]", sceneEx.GetGameFreeId(), playerEx.SnId, gamePoolCoin, playerEx.BlackLevel, playerEx.WhiteLevel) logger.Logger.Warnf("EasterIslandWriteBlackTryTimesOver [%v][%v][%v][%v]", sceneEx.GetGameFreeId(), playerEx.SnId, gamePoolCoin, playerEx.WBLevel)
} }
// 奖池水池处理 // 奖池水池处理
if spinRes.IsJackpot { if spinRes.IsJackpot {

View File

@ -358,7 +358,7 @@ func (this *FishingPlayerData) NewStatics(betCoin, gain int64) {
// end // end
//黑白名单不参与投入产出统计,影响自己和他人体验 //黑白名单不参与投入产出统计,影响自己和他人体验
if this.WhiteLevel != 0 || this.WhiteFlag != 0 || this.BlackLevel != 0 || this.GMLevel > 0 { if this.WBLevel != 0 || this.WhiteFlag != 0 || this.GMLevel > 0 {
return return
} }

View File

@ -123,12 +123,12 @@ func (this *IceAgePlayerData) SavePlayerGameData(gameFreeId string) {
// 黑白名单的限制是否生效 // 黑白名单的限制是否生效
func (this *IceAgePlayerData) CheckBlackWriteList(isWin bool) bool { func (this *IceAgePlayerData) CheckBlackWriteList(isWin bool) bool {
if isWin && this.BlackLevel > 0 && this.BlackLevel <= 10 { if isWin && -this.WBLevel > 0 && -this.WBLevel <= 10 {
if rand.Int31n(100) < this.BlackLevel*10 { if rand.Int31n(100) < -this.WBLevel*10 {
return true return true
} }
} else if !isWin && this.WhiteLevel > 0 && this.WhiteLevel <= 10 { } else if !isWin && this.WBLevel > 0 && this.WBLevel <= 10 {
if rand.Int31n(100) < this.WhiteLevel*10 { if rand.Int31n(100) < this.WBLevel*10 {
return true return true
} }
} }

View File

@ -543,7 +543,7 @@ func (this *SceneStateIceAgeStart) OnPlayerOp(s *base.Scene, p *base.Player, opc
writeBlackTryTimes++ writeBlackTryTimes++
goto WriteBlack goto WriteBlack
} else if writeBlackTryTimes >= 100 && writeBlackTryTimes != 999 { } else if writeBlackTryTimes >= 100 && writeBlackTryTimes != 999 {
logger.Logger.Warnf("IceAgeWriteBlackTryTimesOver [%v][%v][%v][%v][%v]", sceneEx.GetGameFreeId(), playerEx.SnId, gamePoolCoin, playerEx.BlackLevel, playerEx.WhiteLevel) logger.Logger.Warnf("IceAgeWriteBlackTryTimesOver [%v][%v][%v][%v]", sceneEx.GetGameFreeId(), playerEx.SnId, gamePoolCoin, playerEx.WBLevel)
} }
///////////测试游戏数据 开始////////// ///////////测试游戏数据 开始//////////

View File

@ -121,12 +121,12 @@ func (this *TamQuocPlayerData) SavePlayerGameData(gameFreeId string) {
// 黑白名单的限制是否生效 // 黑白名单的限制是否生效
func (this *TamQuocPlayerData) CheckBlackWriteList(isWin bool) bool { func (this *TamQuocPlayerData) CheckBlackWriteList(isWin bool) bool {
if isWin && this.BlackLevel > 0 && this.BlackLevel <= 10 { if isWin && -this.WBLevel > 0 && -this.WBLevel <= 10 {
if rand.Int31n(100) < this.BlackLevel*10 { if rand.Int31n(100) < -this.WBLevel*10 {
return true return true
} }
} else if !isWin && this.WhiteLevel > 0 && this.WhiteLevel <= 10 { } else if !isWin && this.WBLevel > 0 && this.WBLevel <= 10 {
if rand.Int31n(100) < this.WhiteLevel*10 { if rand.Int31n(100) < this.WBLevel*10 {
return true return true
} }
} }

View File

@ -526,7 +526,7 @@ func (this *SceneStateTamQuocStart) OnPlayerOp(s *base.Scene, p *base.Player, op
writeBlackTryTimes++ writeBlackTryTimes++
goto WriteBlack goto WriteBlack
} else if writeBlackTryTimes >= 100 && writeBlackTryTimes != 999 { } else if writeBlackTryTimes >= 100 && writeBlackTryTimes != 999 {
logger.Logger.Warnf("TamquocWriteBlackTryTimesOver [%v][%v][%v][%v][%v]", sceneEx.GetGameFreeId(), playerEx.SnId, gamePoolCoin, playerEx.BlackLevel, playerEx.WhiteLevel) logger.Logger.Warnf("TamquocWriteBlackTryTimesOver [%v][%v][%v][%v]", sceneEx.GetGameFreeId(), playerEx.SnId, gamePoolCoin, playerEx.WBLevel)
} }
// 奖池水池处理 // 奖池水池处理