活动开关

This commit is contained in:
sk 2024-07-18 11:15:12 +08:00
parent 7e28a059ae
commit 3a881657a2
5 changed files with 12 additions and 10 deletions

View File

@ -792,9 +792,11 @@ const (
var PetIDs = []int32{PetIDChicken}
const (
ChannelSwitchExchange = 1
ChannelSwitchDropItem = 2
DiamondLottery = 4
ChannelSwitchExchange = 1 // 兑换商城开关
ChannelSwitchDropItem = 2 // v卡掉落开关
ChannelSwitchInvite = 3 // 邀请开关
ChannelSwitchPermit = 4 // 典藏通行证开关
ChannelSwitchDiamondLottery = 5 // 钻石抽奖开关
)
// 特殊商品id

View File

@ -6202,7 +6202,7 @@ type ChannelSwitchConfig struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Tp int32 `protobuf:"varint,1,opt,name=Tp,proto3" json:"Tp,omitempty"` // 开关类型 1.兑换 2.道具掉落 3.邀请活动开关 4.钻石抽奖
Tp int32 `protobuf:"varint,1,opt,name=Tp,proto3" json:"Tp,omitempty"` // 开关类型 1.兑换 2.道具掉落 3.邀请活动开关 4.通行证 5.钻石抽奖
Platform string `protobuf:"bytes,2,opt,name=Platform,proto3" json:"Platform,omitempty"` // 平台id
OnChannelName []string `protobuf:"bytes,3,rep,name=OnChannelName,proto3" json:"OnChannelName,omitempty"` // 开启渠道
}

View File

@ -691,7 +691,7 @@ message WelfareCollectConfig{
// etcd /game/channel/switch
message ChannelSwitchConfig{
int32 Tp = 1; // 1. 2. 3. 4.
int32 Tp = 1; // 1. 2. 3. 4. 5.
string Platform = 2; // id
repeated string OnChannelName = 3; //
}

2
public

@ -1 +1 @@
Subproject commit 867b106a8e8daadf6e7c7ae3b3b0b4bf55da83a9
Subproject commit 4206616316ed483d02fc9fc13299c51a278ae53e

View File

@ -80,7 +80,7 @@ func (this *CSPhoneLotteryHandler) Process(s *netlib.Session, packetid int, data
logger.Logger.Warn("CSPhoneLottery p == nil")
return nil
}
conf := PlatformMgrSingleton.GetConfig(p.Platform).ChannelSwitch[common.DiamondLottery]
conf := PlatformMgrSingleton.GetConfig(p.Platform).ChannelSwitch[common.ChannelSwitchDiamondLottery]
if !model.GameParamData.CloseChannelSwitch && (conf == nil || !common.InSliceString(conf.OnChannelName, p.LastChannel)) {
return nil
}
@ -227,7 +227,7 @@ func (this *CSDiamondLotteryInfoHandler) Process(s *netlib.Session, packetid int
return nil
}
// 渠道开关
conf := PlatformMgrSingleton.GetConfig(p.Platform).ChannelSwitch[common.DiamondLottery]
conf := PlatformMgrSingleton.GetConfig(p.Platform).ChannelSwitch[common.ChannelSwitchDiamondLottery]
if !model.GameParamData.CloseChannelSwitch && (conf == nil || !common.InSliceString(conf.OnChannelName, p.LastChannel)) {
return nil
}
@ -278,7 +278,7 @@ func (this *CSDiamondLotteryHandler) Process(s *netlib.Session, packetid int, da
return nil
}
// 渠道开关
conf := PlatformMgrSingleton.GetConfig(p.Platform).ChannelSwitch[common.DiamondLottery]
conf := PlatformMgrSingleton.GetConfig(p.Platform).ChannelSwitch[common.ChannelSwitchDiamondLottery]
if !model.GameParamData.CloseChannelSwitch && (conf == nil || !common.InSliceString(conf.OnChannelName, p.LastChannel)) {
return nil
}
@ -435,7 +435,7 @@ func (this *CSDiamondLotteryLuckyAwardHandler) Process(s *netlib.Session, packet
return nil
}
// 渠道开关
conf := PlatformMgrSingleton.GetConfig(p.Platform).ChannelSwitch[common.DiamondLottery]
conf := PlatformMgrSingleton.GetConfig(p.Platform).ChannelSwitch[common.ChannelSwitchDiamondLottery]
if !model.GameParamData.CloseChannelSwitch && (conf == nil || !common.InSliceString(conf.OnChannelName, p.LastChannel)) {
return nil
}