存钱罐功能添加后台开关

This commit is contained in:
DESKTOP-45ANQ2C\unis 2024-12-30 14:56:52 +08:00
parent 5b28a10602
commit f0c215dc4a
3 changed files with 30 additions and 6 deletions

View File

@ -779,6 +779,10 @@ const (
ChannelSwitchInvite = 3 // 邀请开关 ChannelSwitchInvite = 3 // 邀请开关
ChannelSwitchPermit = 4 // 典藏通行证开关 ChannelSwitchPermit = 4 // 典藏通行证开关
ChannelSwitchDiamondLottery = 5 // 钻石抽奖开关 ChannelSwitchDiamondLottery = 5 // 钻石抽奖开关
ChannelSwitchItemRecExpire = 8 // 记牌器开关
ChannelSwitchPigBankCoin = 13 // 金币存钱罐开关
ChannelSwitchPigBankDiamond = 14 // 钻石存钱罐开关
) )
// 特殊商品id // 特殊商品id

View File

@ -1243,6 +1243,11 @@ func (this *Player) UpdatePigBankCoin(gainTexCoin int64) {
return return
} }
// 渠道开关
if !ConfigMgrInst.IsOn(this.Platform, common.ChannelSwitchPigBankCoin, this.LastChannel) {
return
}
if this.PlayerData.WelfData == nil || this.PlayerData.WelfData.PigBank == nil { if this.PlayerData.WelfData == nil || this.PlayerData.WelfData.PigBank == nil {
return return
} }

View File

@ -1686,6 +1686,9 @@ func (this *WelfareMgr) BuyContinuousPay(p *Player, ConfigPayId int32) {
// PigbankGetInfo 存钱罐信息 // PigbankGetInfo 存钱罐信息
func (this *WelfareMgr) PigbankGetInfo(p *Player) { func (this *WelfareMgr) PigbankGetInfo(p *Player) {
if !PlatformMgrSingleton.IsOn(p.Platform, common.ChannelSwitchPigBankCoin, p.LastChannel) {
return
}
pack := &welfare.SCPigbankGetInfo{ pack := &welfare.SCPigbankGetInfo{
OpRetCode: welfare.OpResultCode_OPRC_Error, OpRetCode: welfare.OpResultCode_OPRC_Error,
} }
@ -1775,6 +1778,10 @@ func (this *WelfareMgr) PigbankGetInfo(p *Player) {
// PigbankTakeCoin 存钱罐领取金币 // PigbankTakeCoin 存钱罐领取金币
func (this *WelfareMgr) PigbankTakeCoin(p *Player) { func (this *WelfareMgr) PigbankTakeCoin(p *Player) {
if !PlatformMgrSingleton.IsOn(p.Platform, common.ChannelSwitchPigBankCoin, p.LastChannel) {
return
}
pack := &welfare.SCPigbankTakeCoin{ pack := &welfare.SCPigbankTakeCoin{
OpRetCode: welfare.OpResultCode_OPRC_Error, OpRetCode: welfare.OpResultCode_OPRC_Error,
} }
@ -1934,6 +1941,10 @@ func (this *WelfareMgr) DayResetPigBank(p *Player) {
// 钻石储存罐信息 // 钻石储存罐信息
func (this *WelfareMgr) DiamondBankGetInfo(p *Player) { func (this *WelfareMgr) DiamondBankGetInfo(p *Player) {
if !PlatformMgrSingleton.IsOn(p.Platform, common.ChannelSwitchPigBankDiamond, p.LastChannel) {
return
}
pack := &welfare.SCDiamondBankGetInfo{ pack := &welfare.SCDiamondBankGetInfo{
OpRetCode: welfare.OpResultCode_OPRC_Error, OpRetCode: welfare.OpResultCode_OPRC_Error,
} }
@ -2001,6 +2012,10 @@ func (this *WelfareMgr) DiamondBankGetInfo(p *Player) {
// DiamondBankTakeCoin 钻石存钱罐领取钻石 // DiamondBankTakeCoin 钻石存钱罐领取钻石
func (this *WelfareMgr) DiamondBankTakeCoin(p *Player) (retItemArr []*model.Item) { func (this *WelfareMgr) DiamondBankTakeCoin(p *Player) (retItemArr []*model.Item) {
if !PlatformMgrSingleton.IsOn(p.Platform, common.ChannelSwitchPigBankDiamond, p.LastChannel) {
return
}
pack := &welfare.SCDiamondBankTakeDiamond{ pack := &welfare.SCDiamondBankTakeDiamond{
OpRetCode: welfare.OpResultCode_OPRC_Error, OpRetCode: welfare.OpResultCode_OPRC_Error,
} }