65 lines
2.7 KiB
Lua
65 lines
2.7 KiB
Lua
------------------------------------------------
|
|
--作者: yangqf
|
|
--日期: 2021-02-22
|
|
--文件: ItemQuickGetSystem.lua
|
|
--模块: ItemQuickGetSystem
|
|
--描述: 物品快速获取系统
|
|
------------------------------------------------
|
|
|
|
local ItemQuickGetSystem = {
|
|
TipsStr = nil,
|
|
}
|
|
|
|
function ItemQuickGetSystem:Initialize()
|
|
self.TipsStr = nil
|
|
end
|
|
function ItemQuickGetSystem:UnInitialize()
|
|
self.TipsStr = nil
|
|
end
|
|
|
|
function ItemQuickGetSystem:OpenItemQuickGetForm(itemId)
|
|
if itemId == ItemTypeCode.Gold then
|
|
--元宝
|
|
local _curRecharge = GameCenter.VipSystem.CurRecharge
|
|
--没有首充时弹首充
|
|
if _curRecharge <= 0 and GameCenter.MainFunctionSystem:FunctionIsVisible(FunctionStartIdCode.FirstCharge) then
|
|
GameCenter.MainFunctionSystem:DoFunctionCallBack(FunctionStartIdCode.FirstCharge)
|
|
return
|
|
end
|
|
-- 灵玉获取途径屏蔽特权卡
|
|
-- -- 没有月卡时弹月卡
|
|
-- local _welfareCard = GameCenter.WelfareSystem.WelfareCard
|
|
-- if _welfareCard ~= nil and GameCenter.MainFunctionSystem:FunctionIsVisible(FunctionStartIdCode.WelfareCard) then
|
|
-- if _welfareCard.OwnedCards == nil or _welfareCard.OwnedCards:Count() < 2 then
|
|
-- GameCenter.MainFunctionSystem:DoFunctionCallBack(FunctionStartIdCode.WelfareCard)
|
|
-- return
|
|
-- end
|
|
-- end
|
|
-- 灵玉获取途径屏蔽成长基金
|
|
-- --没有购买成长基金时弹出成长基金
|
|
-- local grow = GameCenter.WelfareSystem.GrowthFund
|
|
-- if grow ~= nil and not grow.IsBuy and GameCenter.MainFunctionSystem:FunctionIsVisible(FunctionStartIdCode.WelfareInvestment) then
|
|
-- GameCenter.MainFunctionSystem:DoFunctionCallBack(FunctionStartIdCode.WelfareInvestment)
|
|
-- return
|
|
-- end
|
|
--没有购买每日礼包时跳转每日礼包
|
|
local _dailyGift = GameCenter.WelfareSystem.DailyGift
|
|
if _dailyGift ~= nil and not _dailyGift.IsAllBuy and GameCenter.MainFunctionSystem:FunctionIsVisible(FunctionStartIdCode.WelfareDailyGift) then
|
|
GameCenter.MainFunctionSystem:DoFunctionCallBack(FunctionStartIdCode.WelfareDailyGift)
|
|
return
|
|
end
|
|
GameCenter.MainFunctionSystem:DoFunctionCallBack(FunctionStartIdCode.Pay)
|
|
return
|
|
end
|
|
local _equipCfg = DataConfig.DataEquip[itemId]
|
|
local _itemCfg = DataConfig.DataItem[itemId]
|
|
if _equipCfg ~= nil and string.len(_equipCfg.GetText) <= 0 then
|
|
return
|
|
end
|
|
if _itemCfg ~= nil and string.len(_itemCfg.GetText) <= 0 then
|
|
return
|
|
end
|
|
GameCenter.PushFixEvent(UIEventDefine.UIItemQuickGetForm_OPEN, itemId)
|
|
end
|
|
|
|
return ItemQuickGetSystem |