From fc4e2c35ffbcf8aeeb71f66b3fa9e29ef7920082 Mon Sep 17 00:00:00 2001 From: ZhangBiao Date: Wed, 15 Jul 2020 14:50:00 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/Adventure/AdventureExploreRewardPanel.lua | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Adventure/AdventureExploreRewardPanel.lua b/Assets/ManagedResources/~Lua/Modules/Adventure/AdventureExploreRewardPanel.lua index aaf8068891..2b4962ebf4 100644 --- a/Assets/ManagedResources/~Lua/Modules/Adventure/AdventureExploreRewardPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Adventure/AdventureExploreRewardPanel.lua @@ -3,7 +3,6 @@ AdventureExploreRewardPanel = Inherit(BasePanel) local this=AdventureExploreRewardPanel local baseDrop={} local randomDrop={} -local baseContentList={} local randomList = {} local itemListPrefab={} local isOpenGeiSSRAvtivity = 0--五星成长礼拍脸 @@ -12,7 +11,6 @@ local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig) this.selfsortingOrder = 0 --初始化组件(用于子类重写) function AdventureExploreRewardPanel:InitComponent() - baseContentList = {} this.btnBack = Util.GetGameObject(self.gameObject, "maskImage") this.rewardGrid = Util.GetGameObject(self.gameObject, "top/grid") this.randomDropGrid = Util.GetGameObject(self.gameObject, "Bg/scroll/grid") @@ -47,6 +45,7 @@ function AdventureExploreRewardPanel:OnOpen(...) baseDrop=args[1] randomDrop = args[2] local itemDataList={} + local baseContentList1={} local callList1 = Stack.New() itemDataList=BagManager.GetTableByBackDropData(baseDrop) BagManager.GoIntoBackData(baseDrop) @@ -59,12 +58,13 @@ function AdventureExploreRewardPanel:OnOpen(...) -- end -- baseContentList[i]:OnOpen(true,itemDataList[i],1,true,false,false,this.selfsortingOrder) -- end - self:SetItemShow(baseDrop,itemDataList,this.rewardGrid.transform,callList1) + self:SetItemShow(baseDrop,itemDataList,this.rewardGrid.transform,callList1,baseContentList1) --随机掉落 if(randomDrop~=nil) then local callList2 = Stack.New() local itemRandomDataList={} + local baseContentList2={} itemRandomDataList=BagManager.GetTableByBackDropData(randomDrop) -- 按品质排序 @@ -82,7 +82,7 @@ function AdventureExploreRewardPanel:OnOpen(...) -- end -- randomList[i]:OnOpen(true,itemDataList[i], 1.1, true) -- end - self:SetItemShow(randomDrop,itemRandomDataList,this.randomDropGrid.transform,callList2) + self:SetItemShow(randomDrop,itemRandomDataList,this.randomDropGrid.transform,callList2,baseContentList2) end local hours = AdventureManager.adventureOffline --gameSetting[1].AdventureOffline local time = AdventureManager.stateTime >= hours * 60 * 60 and hours * 60 * 60 or AdventureManager.stateTime @@ -91,7 +91,7 @@ end -- 根据物品列表数据显示物品 -function AdventureExploreRewardPanel:SetItemShow(drop,dataList,transform,callList) +function AdventureExploreRewardPanel:SetItemShow(drop,dataList,transform,callList,baseContentList) BagManager.OnShowTipDropNumZero(drop) if drop==nil then return end for i = 1, #dataList do @@ -188,7 +188,6 @@ end function AdventureExploreRewardPanel:OnDestroy() randomList = {} - baseContentList = {} end return AdventureExploreRewardPanel \ No newline at end of file