Merge branch 'dev_pigbank2' into develop

This commit is contained in:
DESKTOP-45ANQ2C\unis 2024-12-30 14:57:19 +08:00
commit 71622caf8f
3 changed files with 30 additions and 6 deletions

View File

@ -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

View File

@ -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
}

View File

@ -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,
}