diff --git a/common/constant.go b/common/constant.go index 1544e3f..4112649 100644 --- a/common/constant.go +++ b/common/constant.go @@ -774,11 +774,15 @@ const ( var PetIDs = []int32{PetIDChicken} const ( - ChannelSwitchExchange = 1 // 兑换商城开关 - ChannelSwitchDropItem = 2 // v卡掉落开关 - ChannelSwitchInvite = 3 // 邀请开关 - ChannelSwitchPermit = 4 // 典藏通行证开关 - ChannelSwitchDiamondLottery = 5 // 钻石抽奖开关 + ChannelSwitchExchange = 1 // 兑换商城开关 + ChannelSwitchDropItem = 2 // v卡掉落开关 + ChannelSwitchInvite = 3 // 邀请开关 + ChannelSwitchPermit = 4 // 典藏通行证开关 + ChannelSwitchDiamondLottery = 5 // 钻石抽奖开关 + ChannelSwitchItemRecExpire = 8 // 记牌器开关 + ChannelSwitchPigBankCoin = 13 // 金币存钱罐开关 + ChannelSwitchPigBankDiamond = 14 // 钻石存钱罐开关 + ) // 特殊商品id diff --git a/gamesrv/base/player.go b/gamesrv/base/player.go index 4c49bc3..a1d2395 100644 --- a/gamesrv/base/player.go +++ b/gamesrv/base/player.go @@ -1243,6 +1243,11 @@ func (this *Player) UpdatePigBankCoin(gainTexCoin int64) { return } + // 渠道开关 + if !ConfigMgrInst.IsOn(this.Platform, common.ChannelSwitchPigBankCoin, this.LastChannel) { + return + } + if this.PlayerData.WelfData == nil || this.PlayerData.WelfData.PigBank == nil { return } diff --git a/worldsrv/welfmgr.go b/worldsrv/welfmgr.go index 4c351a6..352855b 100644 --- a/worldsrv/welfmgr.go +++ b/worldsrv/welfmgr.go @@ -1118,7 +1118,7 @@ func (this *WelfareMgr) BlindBoxInfo(p *Player, bid int32) { if cyc == 1 || blindBox.Cycle == model.WelfareOpen { p.WelfData.BlindBoxId = 0 } - } // == 1代表当日循环 + } // == 1代表当日循环 if p.WelfData.BlindBoxId == 0 { // 未领取过发随机Date idx := bid @@ -1686,6 +1686,9 @@ func (this *WelfareMgr) BuyContinuousPay(p *Player, ConfigPayId int32) { // PigbankGetInfo 存钱罐信息 func (this *WelfareMgr) PigbankGetInfo(p *Player) { + if !PlatformMgrSingleton.IsOn(p.Platform, common.ChannelSwitchPigBankCoin, p.LastChannel) { + return + } pack := &welfare.SCPigbankGetInfo{ OpRetCode: welfare.OpResultCode_OPRC_Error, } @@ -1775,6 +1778,10 @@ func (this *WelfareMgr) PigbankGetInfo(p *Player) { // PigbankTakeCoin 存钱罐领取金币 func (this *WelfareMgr) PigbankTakeCoin(p *Player) { + if !PlatformMgrSingleton.IsOn(p.Platform, common.ChannelSwitchPigBankCoin, p.LastChannel) { + return + } + pack := &welfare.SCPigbankTakeCoin{ OpRetCode: welfare.OpResultCode_OPRC_Error, } @@ -1934,6 +1941,10 @@ func (this *WelfareMgr) DayResetPigBank(p *Player) { // 钻石储存罐信息 func (this *WelfareMgr) DiamondBankGetInfo(p *Player) { + if !PlatformMgrSingleton.IsOn(p.Platform, common.ChannelSwitchPigBankDiamond, p.LastChannel) { + return + } + pack := &welfare.SCDiamondBankGetInfo{ OpRetCode: welfare.OpResultCode_OPRC_Error, } @@ -2001,6 +2012,10 @@ func (this *WelfareMgr) DiamondBankGetInfo(p *Player) { // DiamondBankTakeCoin 钻石存钱罐领取钻石 func (this *WelfareMgr) DiamondBankTakeCoin(p *Player) (retItemArr []*model.Item) { + if !PlatformMgrSingleton.IsOn(p.Platform, common.ChannelSwitchPigBankDiamond, p.LastChannel) { + return + } + pack := &welfare.SCDiamondBankTakeDiamond{ OpRetCode: welfare.OpResultCode_OPRC_Error, }