孙悟空添加新人商城
parent
26ef0d21d0
commit
9b01d308e8
|
@ -2,6 +2,7 @@
|
||||||
RewardItemSingleShowPopup = Inherit(BasePanel)
|
RewardItemSingleShowPopup = Inherit(BasePanel)
|
||||||
local this = RewardItemSingleShowPopup
|
local this = RewardItemSingleShowPopup
|
||||||
local JumpConfig = ConfigManager.GetConfig(ConfigName.JumpConfig)
|
local JumpConfig = ConfigManager.GetConfig(ConfigName.JumpConfig)
|
||||||
|
local RechargeCommodityConfig = ConfigManager.GetConfig(ConfigName.RechargeCommodityConfig)
|
||||||
local itemSid
|
local itemSid
|
||||||
local heroBackData
|
local heroBackData
|
||||||
local itemConfigData
|
local itemConfigData
|
||||||
|
@ -327,7 +328,7 @@ function RewardItemSingleShowPopup:OnShow()
|
||||||
SetTextVerTial(this.posText.gameObject,Vector3.New(64,21,0),"MiddleLeft")
|
SetTextVerTial(this.posText.gameObject,Vector3.New(64,21,0),"MiddleLeft")
|
||||||
local jumpDataList = heroConfig.Jump
|
local jumpDataList = heroConfig.Jump
|
||||||
for i = 1, #jumpDataList do
|
for i = 1, #jumpDataList do
|
||||||
if not RECHARGEABLE and (JumpConfig[jumpDataList[i]].Type == JumpType.firstRecharge or JumpConfig[jumpDataList[i]].Type == JumpType.ZhiZunJiangShi) then--(是否开启充值)
|
if not RECHARGEABLE and (JumpConfig[jumpDataList[i]].Type == JumpType.firstRecharge or JumpConfig[jumpDataList[i]].Type == JumpType.ZhiZunJiangShi or JumpConfig[jumpDataList[i]].Type == JumpType.recharge) then--(是否开启充值)
|
||||||
else
|
else
|
||||||
local isShow = true
|
local isShow = true
|
||||||
if JumpConfig[jumpDataList[i]].Type == JumpType.firstRecharge then
|
if JumpConfig[jumpDataList[i]].Type == JumpType.firstRecharge then
|
||||||
|
@ -362,6 +363,28 @@ function RewardItemSingleShowPopup:OnShow()
|
||||||
isShow = false
|
isShow = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
elseif JumpConfig[jumpDataList[i]].Type == JumpType.recharge then
|
||||||
|
local actConfig = ConfigManager.GetConfigDataByDoubleKey(ConfigName.ActivityGroups,"PageType",JumpType.recharge,"Sort",JumpConfig[jumpDataList[i]].Skipfactor[1])
|
||||||
|
local list = OperatingManager.GetGiftGoodsInfoList(actConfig.ShopData[1][2])
|
||||||
|
local goodIdList = {}
|
||||||
|
for i = 1,#list do
|
||||||
|
local rechargeConfig = RechargeCommodityConfig[list[i].goodsId]
|
||||||
|
if rechargeConfig.Limit == 0 or rechargeConfig.Limit - list[i].buyTimes > 0 then
|
||||||
|
if rechargeConfig.ShowType == actConfig.ShopData[1][3] then
|
||||||
|
for j = 1,#rechargeConfig.RewardShow do
|
||||||
|
if rechargeConfig.RewardShow[j][1] == heroConfig.Id or rechargeConfig.RewardShow[j][1] == heroConfig.PiecesId then
|
||||||
|
table.insert(goodIdList,rechargeConfig.Id)
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if #goodIdList < 1 then
|
||||||
|
isShow = false
|
||||||
|
else
|
||||||
|
isShow = true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if isShow then
|
if isShow then
|
||||||
local tempView = SubUIManager.Open(SubUIConfig.JumpViewNew, this.equipProGrid.transform, jumpDataList[i],heroConfig,self)
|
local tempView = SubUIManager.Open(SubUIConfig.JumpViewNew, this.equipProGrid.transform, jumpDataList[i],heroConfig,self)
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
local JumpConfig=ConfigManager.GetConfig(ConfigName.JumpConfig)
|
local JumpConfig=ConfigManager.GetConfig(ConfigName.JumpConfig)
|
||||||
local ItemConfig=ConfigManager.GetConfig(ConfigName.ItemConfig)
|
local ItemConfig=ConfigManager.GetConfig(ConfigName.ItemConfig)
|
||||||
|
local RechargeCommodityConfig=ConfigManager.GetConfig(ConfigName.RechargeCommodityConfig)
|
||||||
JumpViewNew = {}
|
JumpViewNew = {}
|
||||||
function JumpViewNew:New(gameObject)
|
function JumpViewNew:New(gameObject)
|
||||||
local b = {}
|
local b = {}
|
||||||
|
@ -44,6 +45,7 @@ end
|
||||||
function JumpViewNew:OnOpen(jumpId,heroConfig,parent)
|
function JumpViewNew:OnOpen(jumpId,heroConfig,parent)
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
self.jumpSData=JumpConfig[jumpId]
|
self.jumpSData=JumpConfig[jumpId]
|
||||||
|
self.heroId = heroConfig.Id
|
||||||
self.needChipId = heroConfig.PiecesId
|
self.needChipId = heroConfig.PiecesId
|
||||||
self.needChipNum = ItemConfig[self.needChipId].UsePerCount
|
self.needChipNum = ItemConfig[self.needChipId].UsePerCount
|
||||||
self.btnSureIma.sprite = self.parent.spLoader:LoadSprite("r_hero_button_002")
|
self.btnSureIma.sprite = self.parent.spLoader:LoadSprite("r_hero_button_002")
|
||||||
|
@ -144,7 +146,10 @@ function JumpViewNew:OnOpen(jumpId,heroConfig,parent)
|
||||||
self.btnSureIma.sprite = self.parent.spLoader:LoadSprite("r_hero_button_001")
|
self.btnSureIma.sprite = self.parent.spLoader:LoadSprite("r_hero_button_001")
|
||||||
end
|
end
|
||||||
self.desc.text = string.format("<color=#%s>%s:%s/%s</color>",color,ItemConfig[self.needChipId].Name,itemcount,self.needChipNum)
|
self.desc.text = string.format("<color=#%s>%s:%s/%s</color>",color,ItemConfig[self.needChipId].Name,itemcount,self.needChipNum)
|
||||||
elseif self.jumpSData.Type == 40 then
|
elseif self.jumpSData.Type == JumpType.recharge then
|
||||||
|
self.costIconPos.gameObject:SetActive(false)
|
||||||
|
self.desc.text = "快速提升孙悟空星级"
|
||||||
|
elseif self.jumpSData.Type == 40 then
|
||||||
self.costIconPos.gameObject:SetActive(false)
|
self.costIconPos.gameObject:SetActive(false)
|
||||||
self.desc.text = "助力玉帝升星"
|
self.desc.text = "助力玉帝升星"
|
||||||
end
|
end
|
||||||
|
@ -193,6 +198,24 @@ function JumpViewNew:GoToJumpData()
|
||||||
ShopManager.SetSelectIndex(self.jumpSData.Skipfactor[1],{self.ShopId})
|
ShopManager.SetSelectIndex(self.jumpSData.Skipfactor[1],{self.ShopId})
|
||||||
elseif self.jumpSData.Type == JumpType.XingChenShangDian then
|
elseif self.jumpSData.Type == JumpType.XingChenShangDian then
|
||||||
ShopManager.SetSelectIndex(self.shopType,{self.ShopId})
|
ShopManager.SetSelectIndex(self.shopType,{self.ShopId})
|
||||||
|
elseif self.jumpSData.Type == JumpType.recharge then
|
||||||
|
local actConfig = ConfigManager.GetConfigDataByDoubleKey(ConfigName.ActivityGroups,"PageType",JumpType.recharge,"Sort",self.jumpSData.Skipfactor[1])
|
||||||
|
local list = OperatingManager.GetGiftGoodsInfoList(actConfig.ShopData[1][2])
|
||||||
|
local goodIdList = {}
|
||||||
|
for i = 1,#list do
|
||||||
|
local rechargeConfig = RechargeCommodityConfig[list[i].goodsId]
|
||||||
|
if rechargeConfig.Limit == 0 or rechargeConfig.Limit - list[i].buyTimes > 0 then
|
||||||
|
if rechargeConfig.ShowType == actConfig.ShopData[1][3] then
|
||||||
|
for j = 1,#rechargeConfig.RewardShow do
|
||||||
|
if rechargeConfig.RewardShow[j][1] == self.heroId or rechargeConfig.RewardShow[j][1] == self.needChipId then
|
||||||
|
table.insert(goodIdList,rechargeConfig.Id)
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
DynamicActivityManager.SetSelectIndex(DataType.Direct,goodIdList)
|
||||||
end
|
end
|
||||||
JumpManager.GoJump(self.jumpSData.Id,function()
|
JumpManager.GoJump(self.jumpSData.Id,function()
|
||||||
self.parent:ClosePanel()
|
self.parent:ClosePanel()
|
||||||
|
|
Loading…
Reference in New Issue