local UIOACommonTaskBase = require("View/OperationActivity/OACommonBase/UIOACommonTaskBase") local UICommandTheWorldActiveTask = UIViewClass(UIOACommonTaskBase) function UICommandTheWorldActiveTask:OnOpened(context) UTL.Item.SetLocalizationImage(self.loc_TitleLoc, self.img_Title, "hltxtc_msz_hyrw.png") end function UICommandTheWorldActiveTask:ClickTaskInfoCell(cellTable, target, data) if target == cellTable.event_Collect then local status = MDL.OACommon.GetTaskStatus(self.activityId, data.ID) if status == MDL.OACommon.ActivityTaskState.Done then --跨服排行结束,提示,显示荣耀排行榜;否则领取 if CTL.CommandTheWorld.IsBattleAreaEnd() then CTL.Tips.AddTipsMsg(Const_IDS.IDS_ActivityItem_NotAtActivityTime) CTL.CommandTheWorld.ShowHonourShowPanel() self:CloseView() else MDL.OACommon.OATaskRewardReq(self.activityId, data.ID) end elseif status == MDL.OACommon.ActivityTaskState.UnDone then --跨服排行结束,提示,显示荣耀排行榜;否则前往 if CTL.CommandTheWorld.IsBattleAreaEnd() then CTL.Tips.AddTipsMsg(Const_IDS.IDS_ActivityItem_NotAtActivityTime) CTL.CommandTheWorld.ShowHonourShowPanel() self:CloseView() else local conditionData = MDL.OperationActivity.HotGenCondID:GetDataByCondID(data.CondID) local triggerData = DataSheetManager.TriggerType:GetDataByID(conditionData.Task_Table[1].Trigger) CTL.ItemSources.ExecuteSourceFunctionById(triggerData.ItemSourceID) end end else for i, v in ipairs(cellTable.group_Items) do if target == v.event_Click then UTL.ItemTips.ShowCommonTipsById(data.TaskReward_Table[i].TaskRewardID) end end end end return UICommandTheWorldActiveTask