From 782588b1efe8c67938c80e85a5de62441e846b7f Mon Sep 17 00:00:00 2001 From: ZhangBiao Date: Fri, 7 May 2021 11:43:37 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E3=80=90=E6=A3=AE=E7=BD=97=E5=B9=BB?= =?UTF-8?q?=E5=A2=83=E3=80=91=E4=BF=AE=E5=A4=8D=E6=89=93boss=E5=BC=B9?= =?UTF-8?q?=E5=87=BA=E6=81=AD=E5=96=9C=E8=8E=B7=E5=BE=97=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ManagedResources/~Lua/Modules/Carbon/CarbonManager.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Carbon/CarbonManager.lua b/Assets/ManagedResources/~Lua/Modules/Carbon/CarbonManager.lua index a736de2259..0680576bba 100644 --- a/Assets/ManagedResources/~Lua/Modules/Carbon/CarbonManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Carbon/CarbonManager.lua @@ -521,7 +521,11 @@ function this.InitQuickFightData(monsterGroupId, eventId, msg) Game.GlobalEvent:DispatchEvent(GameEvent.Map.PointRemove, MapManager.curTriggerPos) elseif this.difficulty == 2 then Game.GlobalEvent:DispatchEvent(GameEvent.Map.PointRemove, MapManager.curTriggerPos) - UIManager.OpenPanel(UIName.RewardItemPopup,data.drop,1,func) + if data.drop and (#data.drop.itemlist > 0 and #data.drop.equipId > 0 and #data.drop.Hero > 0 and #data.drop.soulEquip > 0 and #data.drop.pokemon > 0) then + UIManager.OpenPanel(UIName.RewardItemPopup,data.drop,1,func) + else + func() + end end func = nil -- 试炼副本不能直接结束事件点 From 02be5bb730ad4657b4de239b2e3e77f611da7a8a Mon Sep 17 00:00:00 2001 From: ZhangBiao Date: Fri, 7 May 2021 15:10:06 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E3=80=90=E6=A3=AE=E7=BD=97=E5=B9=BB?= =?UTF-8?q?=E5=A2=83=E3=80=91boss=E4=B8=8D=E7=94=9F=E6=88=90=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/ManagedResources/~Lua/Modules/Carbon/CarbonManager.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Carbon/CarbonManager.lua b/Assets/ManagedResources/~Lua/Modules/Carbon/CarbonManager.lua index 0680576bba..31b5e87d84 100644 --- a/Assets/ManagedResources/~Lua/Modules/Carbon/CarbonManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Carbon/CarbonManager.lua @@ -521,7 +521,7 @@ function this.InitQuickFightData(monsterGroupId, eventId, msg) Game.GlobalEvent:DispatchEvent(GameEvent.Map.PointRemove, MapManager.curTriggerPos) elseif this.difficulty == 2 then Game.GlobalEvent:DispatchEvent(GameEvent.Map.PointRemove, MapManager.curTriggerPos) - if data.drop and (#data.drop.itemlist > 0 and #data.drop.equipId > 0 and #data.drop.Hero > 0 and #data.drop.soulEquip > 0 and #data.drop.pokemon > 0) then + if data.drop and (#data.drop.itemlist > 0 or #data.drop.equipId > 0 or #data.drop.Hero > 0 or #data.drop.soulEquip > 0 or #data.drop.pokemon > 0) then UIManager.OpenPanel(UIName.RewardItemPopup,data.drop,1,func) else func() From bad91c3b258071103f9790076e72bdbde761a005 Mon Sep 17 00:00:00 2001 From: ZhangBiao Date: Fri, 7 May 2021 16:39:23 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E3=80=90=E6=9C=88=E5=8D=A1=E3=80=91?= =?UTF-8?q?=E6=9C=88=E5=8D=A1=E7=95=8C=E9=9D=A2=E5=85=B3=E9=97=AD=E5=90=8E?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Operating/MonthCardPage.lua | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Operating/MonthCardPage.lua b/Assets/ManagedResources/~Lua/Modules/Operating/MonthCardPage.lua index 554d87bf5a..2c684c60da 100644 --- a/Assets/ManagedResources/~Lua/Modules/Operating/MonthCardPage.lua +++ b/Assets/ManagedResources/~Lua/Modules/Operating/MonthCardPage.lua @@ -1,8 +1,8 @@  local MonthCardPage = {} local cardData = { - [1] = { curState = 0 ,cardType = MONTH_CARD_TYPE.MONTHCARD,time = nil}, - [2] = { curState = 0 ,cardType = MONTH_CARD_TYPE.LUXURYMONTHCARD,time = nil} + [1] = { curState = 0 ,cardType = MONTH_CARD_TYPE.MONTHCARD}, + [2] = { curState = 0 ,cardType = MONTH_CARD_TYPE.LUXURYMONTHCARD} } local sortingOrder = 0 local addTimeNum = 30 * 24 * 60 * 60 @@ -24,6 +24,7 @@ local offSetX = { function MonthCardPage:InitComponent() self.grid = Util.GetGameObject(self.gameObject, "grid") self.cardPres = {} + self.timerList = {} for i= 1 ,self.grid.transform.childCount do self.cardPres[i] = {} self.cardPres[i].go = self.grid.transform:GetChild(i - 1).gameObject @@ -119,7 +120,7 @@ function MonthCardPage:SetCardShow(i) if dayNum > 0 then self.cardPres[i].time:GetComponent("Text").text = Language[10480] .. dayNum ..Language[10017] else - self:SetMonthCardTimes(residueTimeNum,cardData[i].time,self.cardPres[i].time,i) + self:SetMonthCardTimes(residueTimeNum,self.cardPres[i].time,i) end if self.curAllMonthCardData[cardData[i].cardType].state == 0 then Util.SetGray(self.cardPres[i].month,false) @@ -133,24 +134,24 @@ function MonthCardPage:SetCardShow(i) end end -function MonthCardPage:SetMonthCardTimes(timeNums,timer,timeCom,index) - if timer then - timer:Stop() - timer = nil +function MonthCardPage:SetMonthCardTimes(timeNums,timeCom,index) + if self.timerList[index] then + self.timerList[index]:Stop() + self.timerList[index] = nil end timeCom:GetComponent("Text").text = Language[10023]..TimeStampToDateStr3(timeNums) - timer = Timer.New(function() + self.timerList[index] = Timer.New(function() timeCom:GetComponent("Text").text = Language[10023]..TimeStampToDateStr3(timeNums) if timeNums < 0 then OperatingManager.RefreshMonthCardEnd() self.curAllMonthCardData = OperatingManager.GetMonthCardData() self:SetCardShow(index) - timer:Stop() - timer = nil + self.timerList[index]:Stop() + self.timerList[index] = nil end timeNums = timeNums - 1 end, 1, -1, true) - timer:Start() + self.timerList[index]:Start() end --界面关闭时调用(用于子类重写) @@ -160,11 +161,12 @@ end --界面销毁时调用(用于子类重写) function MonthCardPage:OnDestroy() self.cardPres = {} - for i = 1, #cardData do - if cardData[i].time then - cardData[i].time:Stop() - cardData[i].time = nil + for index = 1, #self.timerList do + if self.timerList[index] then + self.timerList[index]:Stop() + self.timerList[index] = nil end end + self.timerList = {} end return MonthCardPage \ No newline at end of file