控制开启所有活动

This commit is contained in:
sk 2024-04-16 18:09:03 +08:00
parent 9ef345a00d
commit e500cc3f13
3 changed files with 29 additions and 1 deletions

View File

@ -85,6 +85,7 @@ type GameParam struct {
WinCoinUpdateTime int // 收入榜每日几点更新 WinCoinUpdateTime int // 收入榜每日几点更新
RankWinCoinMaxNum int // 收入榜最大人数 RankWinCoinMaxNum int // 收入榜最大人数
RankInviteMaxNum int32 // 邀请排行榜最大人数 RankInviteMaxNum int32 // 邀请排行榜最大人数
TestActSwitch bool // 开启所有活动开关
} }
var GameParamPath = "../data/gameparam.json" var GameParamPath = "../data/gameparam.json"

2
public

@ -1 +1 @@
Subproject commit bf19adf1d5cf74a3ec3d180730404492658dd6d7 Subproject commit 6390826abfd45829c1122c39b9f0455b1b82a940

View File

@ -157,9 +157,15 @@ func (this *WelfareMgr) GetReliefFund(p *Player, isVideo bool) {
} }
func (this *WelfareMgr) UpdateSign7(cfg *webapi_proto.Welfare7SignDateList) { func (this *WelfareMgr) UpdateSign7(cfg *webapi_proto.Welfare7SignDateList) {
if model.GameParamData.TestActSwitch {
cfg.Switch = WelfareOpen
}
this.getConfig(cfg.Platform).Welfare7SignDateList = cfg this.getConfig(cfg.Platform).Welfare7SignDateList = cfg
} }
func (this *WelfareMgr) UpdateTurnplate(cfg *webapi_proto.WelfareTurnplateDateList) { func (this *WelfareMgr) UpdateTurnplate(cfg *webapi_proto.WelfareTurnplateDateList) {
if model.GameParamData.TestActSwitch {
cfg.Switch = WelfareOpen
}
s := int32(0) s := int32(0)
info := this.getConfig(cfg.Platform) info := this.getConfig(cfg.Platform)
if info.WelfareTurnplateDateList != nil { if info.WelfareTurnplateDateList != nil {
@ -174,6 +180,9 @@ func (this *WelfareMgr) UpdateTurnplate(cfg *webapi_proto.WelfareTurnplateDateLi
} }
func (this *WelfareMgr) UpdateBlindBox(cfg *webapi_proto.WelfareBlindBoxDataList) { func (this *WelfareMgr) UpdateBlindBox(cfg *webapi_proto.WelfareBlindBoxDataList) {
if model.GameParamData.TestActSwitch {
cfg.Switch = WelfareOpen
}
s := int32(0) s := int32(0)
info := this.getConfig(cfg.Platform) info := this.getConfig(cfg.Platform)
if info.WelfareBlindBoxDataList != nil { if info.WelfareBlindBoxDataList != nil {
@ -190,6 +199,9 @@ func (this *WelfareMgr) UpdateBlindBox(cfg *webapi_proto.WelfareBlindBoxDataList
} }
func (this *WelfareMgr) UpdateFirstPay(cfg *webapi_proto.WelfareFirstPayDataList) { func (this *WelfareMgr) UpdateFirstPay(cfg *webapi_proto.WelfareFirstPayDataList) {
if model.GameParamData.TestActSwitch {
cfg.Switch = WelfareOpen
}
s := int32(0) s := int32(0)
info := this.getConfig(cfg.Platform) info := this.getConfig(cfg.Platform)
if info.WelfareFirstPayDataList != nil { if info.WelfareFirstPayDataList != nil {
@ -206,6 +218,9 @@ func (this *WelfareMgr) UpdateFirstPay(cfg *webapi_proto.WelfareFirstPayDataList
} }
func (this *WelfareMgr) UpdateContinuousPay(cfg *webapi_proto.WelfareContinuousPayDataList) { func (this *WelfareMgr) UpdateContinuousPay(cfg *webapi_proto.WelfareContinuousPayDataList) {
if model.GameParamData.TestActSwitch {
cfg.Switch = WelfareOpen
}
s := int32(0) s := int32(0)
info := this.getConfig(cfg.Platform) info := this.getConfig(cfg.Platform)
if info.WelfareContinuousPayDataList != nil { if info.WelfareContinuousPayDataList != nil {
@ -222,6 +237,9 @@ func (this *WelfareMgr) UpdateContinuousPay(cfg *webapi_proto.WelfareContinuousP
} }
func (this *WelfareMgr) UpdatePhoneLotteryStatus(cfg *webapi_proto.WelfarePhoneLotteryStatus) { func (this *WelfareMgr) UpdatePhoneLotteryStatus(cfg *webapi_proto.WelfarePhoneLotteryStatus) {
if model.GameParamData.TestActSwitch {
cfg.Switch = WelfareOpen
}
s := int32(0) s := int32(0)
info := this.getConfig(cfg.Platform) info := this.getConfig(cfg.Platform)
if info.WelfarePhoneLotteryStatus != nil { if info.WelfarePhoneLotteryStatus != nil {
@ -243,6 +261,9 @@ func (this *WelfareMgr) GetPhoneLotteryStatus(platform string) int32 {
} }
func (this *WelfareMgr) UpdateCollectConfig(cfg *webapi_proto.WelfareCollectConfig) { func (this *WelfareMgr) UpdateCollectConfig(cfg *webapi_proto.WelfareCollectConfig) {
if model.GameParamData.TestActSwitch {
cfg.Switch = WelfareOpen
}
s := int32(0) s := int32(0)
info := this.getConfig(cfg.Platform) info := this.getConfig(cfg.Platform)
if info.WelfareCollectConfig != nil { if info.WelfareCollectConfig != nil {
@ -813,6 +834,12 @@ func (this *WelfareMgr) WelfareSwitch(p *Player, platform string, op int) {
pack.WelfareSwitch = append(pack.WelfareSwitch, WelfareClose) pack.WelfareSwitch = append(pack.WelfareSwitch, WelfareClose)
} }
if model.GameParamData.TestActSwitch {
for k := range pack.WelfareSwitch {
pack.WelfareSwitch[k] = WelfareOpen
}
}
if p != nil { if p != nil {
logger.Logger.Tracef("WelfareSwitch snid: %v pack: %v", p.SnId, pack) logger.Logger.Tracef("WelfareSwitch snid: %v pack: %v", p.SnId, pack)
p.SendToClient(int(player_proto.PlayerPacketID_PACKET_SC_SWELFAREINFO), pack) p.SendToClient(int(player_proto.PlayerPacketID_PACKET_SC_SWELFAREINFO), pack)