gm修改器添加条件限制

wangzhenxing 2022-11-04 17:18:11 +08:00
parent d9f4715c4b
commit 2d3304e7bd
2 changed files with 14 additions and 4 deletions

View File

@ -2766,11 +2766,21 @@ function CheckGMIsOpen(type,value)
local name=ConfigManager.GetConfigData(ConfigName.MainLevelConfig,value).Name or ""
return FightPointPassManager.IsFightPointPass(value),string.format(Language[10295], GetLanguageStrById(name))
elseif type==3 then
return true
local config=ConfigManager.GetConfigData(ConfigName.GMInfo,value)
local isBuy=true
for i = 1, #config.Items do
local master=ConfigManager.GetConfigData(ConfigName.GMMaster,config.Items[i])
local buy=OperatingManager.IsBuyGift(master.PackID)
if buy==false then
isBuy=false
end
end
return isBuy,config.Name.."全部兑换解锁"
elseif type==4 then
return VipManager.GetChargedNum()>=value
return VipManager.GetChargedNum()>=value,"累充"..value.."元解锁"
elseif type==5 then
return OperatingManager.IsBuyGift(value)
local recharge=ConfigManager.GetConfigData(ConfigName.RechargeCommodityConfig,value)
return OperatingManager.IsBuyGift(value),"购买"..recharge.Name.."解锁"
end
end

View File

@ -64,7 +64,7 @@ function GMChangePanel:BindEvent()
UIManager.OpenPanel(UIName.RewardItemSingleShowPopup,1342)
end)
Util.AddClick(this.btn_up, function()
UIManager.OpenPanel(UIName.ActivityMainPanel,40,11)
UIManager.OpenPanel(UIName.GMShuaChongTeQuan)
end)
end