【ID1017708】
【无尽副本】购买秘宝后等待下一期秘宝刷新,上一期购买秘宝获得的积分不清,导致下期秘宝无法正常领取奖励
(cherry picked from commit 76fad397de)
			
			
				dev_chengFeng
			
			
		
							parent
							
								
									825c38fc0d
								
							
						
					
					
						commit
						efc0f62cc5
					
				| 
						 | 
				
			
			@ -471,6 +471,7 @@ GameEvent = {
 | 
			
		|||
        RechargeQinglongSerectSuccess = "EndLess.RechargeQinglongSerectSuccess",
 | 
			
		||||
        RefreshHeroData = "EndLess.RefreshHeroData",
 | 
			
		||||
        GuidePanel = "EndLess.GuidePanel",
 | 
			
		||||
        QinglongSerectRefresh = "EndLess.QinglongSerectRefresh",
 | 
			
		||||
    },
 | 
			
		||||
    --山河社稷图
 | 
			
		||||
    FightLevel={
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -227,8 +227,7 @@ function EndLessMapView:BindEvent()
 | 
			
		|||
            return
 | 
			
		||||
        end
 | 
			
		||||
        if not this:CanClick() then return end
 | 
			
		||||
        local data = EndLessMapManager.treasureData
 | 
			
		||||
        UIManager.OpenPanel(UIName.EndLessTreasurePanel,data)
 | 
			
		||||
        UIManager.OpenPanel(UIName.EndLessTreasurePanel)
 | 
			
		||||
    end)
 | 
			
		||||
 | 
			
		||||
    Util.AddClick(this.btnFormat, function ()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -145,7 +145,10 @@ function this.EenlessTreasureRefreshIndication(buffer)
 | 
			
		|||
    local data = buffer:DataByte()
 | 
			
		||||
    local msg = MapInfoProto_pb.EndlessTreasureInfoResponse()
 | 
			
		||||
    msg:ParseFromString(data)
 | 
			
		||||
    local num = BagManager.GetItemCountById(EndLessMapManager.scoreValueId)
 | 
			
		||||
    BagManager.HeroLvUpUpdateItemsNum(EndLessMapManager.scoreValueId, num)
 | 
			
		||||
    EndLessMapManager.InitTreasureData(msg)
 | 
			
		||||
    Game.GlobalEvent:DispatchEvent(GameEvent.EndLess.QinglongSerectRefresh)
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
--后端推送福利红包数据
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -44,21 +44,23 @@ end
 | 
			
		|||
--添加事件监听(用于子类重写)
 | 
			
		||||
function EndLessTreasurePanel:AddListener()
 | 
			
		||||
    Game.GlobalEvent:AddEvent(GameEvent.EndLess.RechargeQinglongSerectSuccess, self.refresh,self)
 | 
			
		||||
    Game.GlobalEvent:AddEvent(GameEvent.EndLess.QinglongSerectRefresh, self.OnShow,self)
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
--移除事件监听(用于子类重写)
 | 
			
		||||
function EndLessTreasurePanel:RemoveListener()
 | 
			
		||||
    Game.GlobalEvent:RemoveEvent(GameEvent.EndLess.RechargeQinglongSerectSuccess, self.refresh,self)
 | 
			
		||||
    Game.GlobalEvent:AddEvent(GameEvent.EndLess.QinglongSerectRefresh, self.OnShow,self)
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
--界面打开时调用(用于子类重写)
 | 
			
		||||
function EndLessTreasurePanel:OnOpen(...)
 | 
			
		||||
    local args = {...}
 | 
			
		||||
    self.treasureData = args[1]
 | 
			
		||||
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
-- 打开,重新打开时回调
 | 
			
		||||
function EndLessTreasurePanel:OnShow()
 | 
			
		||||
    self.treasureData = EndLessMapManager.treasureData
 | 
			
		||||
    self.tips.text = self.treasureData.tip
 | 
			
		||||
    --self.time.gameObject:SetActive(false)
 | 
			
		||||
    self.time.text = "重置时间:"..TimeToDHMS(self.treasureData.resetTime - GetTimeStamp())
 | 
			
		||||
| 
						 | 
				
			
			@ -243,8 +245,10 @@ function EndLessTreasurePanel:ShowTime()
 | 
			
		|||
    self.localTimer = Timer.New(function()
 | 
			
		||||
        time = time - 1
 | 
			
		||||
        if time <= 0  then
 | 
			
		||||
            self.treasureState = 0
 | 
			
		||||
            self.ScrollView:SetIndex(1)
 | 
			
		||||
            self.time.text = "重置时间:"..TimeToDHMS(0)
 | 
			
		||||
            self.localTimer:Stop()
 | 
			
		||||
            self.localTimer = nil
 | 
			
		||||
            return
 | 
			
		||||
        end
 | 
			
		||||
        self.time.text = "重置时间:"..TimeToDHMS(time)
 | 
			
		||||
    end,1,-1,true)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue