特权礼包修改提交
parent
5574c4bdac
commit
f8245898b0
File diff suppressed because it is too large
Load Diff
|
@ -525,7 +525,7 @@ function this.ResetShopData(shopData, buyType, DataTypeIndex)
|
|||
local limitNum = 0
|
||||
for i = 1, #shopData do
|
||||
if DataTypeIndex == DataType.Shop then
|
||||
boughtNum = ShopManager.GetShopItemHadBuyTimes(SHOP_TYPE.FINDTREASURE_GIFT, shopData[i].id)
|
||||
boughtNum = ShopManager.GetShopItemHadBuyTimes(buyType, shopData[i].id)
|
||||
limitNum = ShopManager.GetShopItemLimitBuyCount(shopData[i].id)
|
||||
local curSortId = 0--临时一个数值 只用做排序用
|
||||
if limitNum == -1 then
|
||||
|
@ -537,7 +537,7 @@ function this.ResetShopData(shopData, buyType, DataTypeIndex)
|
|||
elseif DataTypeIndex == DataType.Direct then
|
||||
--所有直购 进行筛选 类型一致的取出
|
||||
if rechargeCommodityConfig[shopData[i].goodsId].ShowType == buyType then
|
||||
boughtNum = OperatingManager.GetGoodsBuyTime(GoodsTypeDef.DirectPurchaseGift, shopData[i].goodsId)
|
||||
boughtNum = OperatingManager.GetGoodsBuyTime(DataTypeIndex, shopData[i].goodsId)
|
||||
limitNum = rechargeCommodityConfig[ shopData[i].goodsId].Limit
|
||||
local curSortId = 0--临时一个数值 只用做排序用
|
||||
if limitNum == -1 then
|
||||
|
|
|
@ -70,6 +70,28 @@ function GiftPre:InitComponent()
|
|||
self.UI_Effect_MianBan_LiBao_button_01 = Util.GetGameObject(self.gameObject, "UI_Effect_MianBan_LiBao_button_01")
|
||||
self.isCanBuy = 0
|
||||
self.itemList = {}
|
||||
|
||||
self.tipRoot = Util.GetGameObject(self.upLayout,"type3")
|
||||
self.tip1 = Util.GetGameObject(self.tipRoot,"tip1")
|
||||
self.tip1_en = Util.GetGameObject(self.tipRoot,"tip1_en")
|
||||
self.tip2 = Util.GetGameObject(self.tipRoot,"tip2")
|
||||
self.tip2_en = Util.GetGameObject(self.tipRoot,"tip2_en")
|
||||
self.tip3 = Util.GetGameObject(self.tipRoot,"tip3")
|
||||
self.tip3_en = Util.GetGameObject(self.tipRoot,"tip3_en")
|
||||
self.tip4 = Util.GetGameObject(self.tipRoot,"tip4")
|
||||
self.tip4_en = Util.GetGameObject(self.tipRoot,"tip4_en")
|
||||
self.tip5 = Util.GetGameObject(self.tipRoot,"tip5")
|
||||
self.tip5Text = Util.GetGameObject(self.tip5,"Text"):GetComponent("Text")
|
||||
self.tipRoot:SetActive(false)
|
||||
self.tip1:SetActive(false)
|
||||
self.tip1_en:SetActive(false)
|
||||
self.tip2:SetActive(false)
|
||||
self.tip2_en:SetActive(false)
|
||||
self.tip3:SetActive(false)
|
||||
self.tip3_en:SetActive(false)
|
||||
self.tip4:SetActive(false)
|
||||
self.tip4_en:SetActive(false)
|
||||
self.tip5:SetActive(false)
|
||||
end
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
|
@ -242,10 +264,48 @@ function GiftPre:SetContent1()
|
|||
CreatNumberPrefab(tostring(self.data.data.shopItemData.BuyRule[2]),self.numList)
|
||||
self.type1Text1.text = "累计充值"
|
||||
self.type1Text3.text = "("..rechargeNum.."/"..self.data.data.shopItemData.BuyRule[2]..Language[11698]--资格进度条
|
||||
elseif (self.data.DataType == DataType.Direct and self.data.buyType == DirectBuyType.FINDTREASURE_GIFT) or
|
||||
(self.data.DataType == DataType.Shop and self.data.buyType == SHOP_TYPE.FINDTREASURE_GIFT) then
|
||||
self.tipRoot:SetActive(true)
|
||||
self:SetTip()
|
||||
end
|
||||
LayoutRebuilder.ForceRebuildLayoutImmediate(self.upLayout.transform)
|
||||
end
|
||||
|
||||
function GiftPre:SetTip()
|
||||
if self.data.data.shopData.id and self.data.data.shopData.id == 20091 then
|
||||
if GetCurLanguage() ~= 0 then
|
||||
self.tip1_en:SetActive(true)
|
||||
else
|
||||
self.tip1:SetActive(true)
|
||||
end
|
||||
elseif self.data.data.shopData.id and self.data.data.shopData.id == 20092 then
|
||||
if GetCurLanguage() ~= 0 then
|
||||
self.tip2_en:SetActive(true)
|
||||
else
|
||||
self.tip2:SetActive(true)
|
||||
end
|
||||
elseif self.data.data.shopData.goodsId and self.data.data.shopData.goodsId == 4002 then
|
||||
if GetCurLanguage() ~= 0 then
|
||||
self.tip3_en:SetActive(true)
|
||||
else
|
||||
self.tip3:SetActive(true)
|
||||
end
|
||||
elseif self.data.data.shopData.goodsId and self.data.data.shopData.goodsId == 4001 then
|
||||
if GetCurLanguage() ~= 0 then
|
||||
self.tip4_en:SetActive(true)
|
||||
else
|
||||
self.tip4:SetActive(true)
|
||||
end
|
||||
elseif self.data.data.shopData.goodsId and self.data.data.shopData.goodsId == 4003 then
|
||||
self.tip5:SetActive(true)
|
||||
self.tip5.text = "轩辕宝境必备特权!每天增加2次免费次数,6次额外购买次数!"
|
||||
elseif self.data.data.shopData.goodsId and self.data.data.shopData.goodsId == 7105 then
|
||||
self.tip5:SetActive(true)
|
||||
self.tip5.text = "每日可额外增加3次免费的灵兽山招募机会,同时灵兽山妖晶招募价格变为8折!"
|
||||
end
|
||||
end
|
||||
|
||||
function GiftPre:SetIcon(_itemdata)
|
||||
self.btnBuy.gameObject:SetActive(true)
|
||||
self.isCanBuy = 0
|
||||
|
|
Loading…
Reference in New Issue