【新副本界面】刷新时间和引导修改

dev_chengFeng
ZhangBiao 2021-07-23 14:11:29 +08:00
parent ce89a20050
commit b5fd7ba8f6
3 changed files with 34 additions and 23 deletions

View File

@ -113,8 +113,16 @@ function CarbonsPanel:OnShow(...)
SoundManager.PlayMusic(SoundConfig.BGM_Carbon)
-- 刷新一次编队战斗力
FormationManager.RefreshMainFormationPower()
self:ShowMap()
self:SetTime()
self:DoRequest(function ()
self:ShowMap()
self:SetTime()
end)
end
--界面开启前的请求信息
function CarbonsPanel:DoRequest(func)
NetManager.GetExpeditionRequest(ExpeditionManager.expeditionLeve)
func()
end
function CarbonsPanel:ShowMap()
@ -155,6 +163,9 @@ function CarbonsPanel:ShowMap()
Util.AddOnceClick(selfObj,function ()
self:BtnClick(key)
end)
Util.AddOnceClick(go,function ()
self:BtnClick(key)
end)
end
end
@ -164,6 +175,7 @@ function CarbonsPanel:TipShow(_go,_value)
local time = Util.GetGameObject(_go,"Grid/time")
local freetimes = Util.GetGameObject(_go,"Grid/freetimes")
local buytimes = Util.GetGameObject(_go,"Grid/buytimes")
local redPoint = Util.GetGameObject(_go,"redPoint")
local openLevelText = Util.GetGameObject(openLevel,"Text"):GetComponent("Text")
local timeText = Util.GetGameObject(time,"Text"):GetComponent("Text")
@ -193,15 +205,9 @@ function CarbonsPanel:TipShow(_go,_value)
time:SetActive(true)
local expeditionData = systemConfig[JumpType.Expedition]
self.timeList[_value.id] = {}
if ExpeditionManager.ExpeditionState == 2 or ExpeditionManager.ExpeditionState == 3 then--大闹天宫重置阶段
self.timeList[_value.id].TextObj = timeText
self.timeList[_value.id].Text = "重置时间:"
self.timeList[_value.id].time = CalculateSecondsNowTo_N_OClock(24)
else--正常阶段
self.timeList[_value.id].TextObj = timeText
self.timeList[_value.id].Text = "剩余时间:"
self.timeList[_value.id].time = ExpeditionManager.startTime + tonumber(expeditionData.SeasonEnd) - GetTimeStamp() + expeditionData.SeasonInterval * 60
end
self.timeList[_value.id].TextObj = timeText
self.timeList[_value.id].Text = "剩余时间:"
self.timeList[_value.id].time = ExpeditionManager.startTime + tonumber(expeditionData.SeasonEnd) - GetTimeStamp() + expeditionData.SeasonInterval * 60 - 300
elseif _value.id == FUNCTION_OPEN_TYPE.ENDLESS then--无尽副本
time:SetActive(true)
self.timeList[_value.id] = {}
@ -221,8 +227,9 @@ function CarbonsPanel:TipShow(_go,_value)
else
openLevel:SetActive(true)
openLevelText.text = string.format("%s级开启",systemConfig[_value.id].OpenRules[2])
if (_value.id == FUNCTION_OPEN_TYPE.ENDLESS or _value.id == FUNCTION_OPEN_TYPE.TRIAL) and ActTimeCtrlManager.IsQualifiled(_value.id) then--无尽副本、森罗幻境
if (_value.id == FUNCTION_OPEN_TYPE.EXPEDITION or _value.id == FUNCTION_OPEN_TYPE.ENDLESS or _value.id == FUNCTION_OPEN_TYPE.TRIAL) and ActTimeCtrlManager.IsQualifiled(_value.id) then--无尽副本、森罗幻境
openLevel:SetActive(false)
redPoint:SetActive(false)
self.timeList[_value.id] = {}
self.timeList[_value.id].TextObj = timeText
self.timeList[_value.id].Text = "重置时间:"
@ -339,16 +346,20 @@ function CarbonsPanel:BtnClick(id)
PopupTipPanel.ShowTip(string.format(Language[10279],config.OpenRules[2]))
end
elseif id == FUNCTION_OPEN_TYPE.ENDLESS then
if ActTimeCtrlManager.SingleFuncState(id) then
local serData = ActTimeCtrlManager.GetSerDataByTypeId(FUNCTION_OPEN_TYPE.ENDLESS)
PlayerPrefs.SetInt("WuJin1"..PlayerManager.uid,serData.endTime)
CheckRedPointStatus(RedPointType.EndlessPanel)
MapManager.curCarbonType = CarBonTypeId.ENDLESS
MapManager.SetViewSize(3)--设置视野范围(明雷形式)
MapManager.isTimeOut = false
UIManager.OpenPanel(UIName.EndLessCarbonPanel)
if ActTimeCtrlManager.IsQualifiled(id) then
if ActTimeCtrlManager.SingleFuncState(id) then
local serData = ActTimeCtrlManager.GetSerDataByTypeId(FUNCTION_OPEN_TYPE.ENDLESS)
PlayerPrefs.SetInt("WuJin1"..PlayerManager.uid,serData.endTime)
CheckRedPointStatus(RedPointType.EndlessPanel)
MapManager.curCarbonType = CarBonTypeId.ENDLESS
MapManager.SetViewSize(3)--设置视野范围(明雷形式)
MapManager.isTimeOut = false
UIManager.OpenPanel(UIName.EndLessCarbonPanel)
else
PopupTipPanel.ShowTip(Language[10281])
end
else
PopupTipPanel.ShowTip(Language[10281])
PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.TRIAL))
end
elseif id == FUNCTION_OPEN_TYPE.FIGHTLEVEL then
if ActTimeCtrlManager.SingleFuncState(id) then

View File

@ -251,7 +251,7 @@ function this.GetFuncTip(id)
if rules[1] == 1 then
tip = string.format(Language[10769], GetLanguageStrById(censorshipConfig[rules[2]].Name))
elseif rules[1] == 2 then
tip = string.format(Language[10770], rules[2])
tip = string.format(Language[10279], rules[2])
elseif rules[1] == 3 then
tip = string.format(Language[10771], rules[2])
end

View File

@ -250,7 +250,7 @@ function this.InitTaskData(curData,taskType,configName)
}
data.type = allListData[i].Type
data.jump = allListData[i].Jump[1]
LogGreen("missionId:"..tostring(data.missionId).." taskType:"..tostring(data.taskType).." itemName:"..tostring(data.itemName))
-- LogGreen("missionId:"..tostring(data.missionId).." taskType:"..tostring(data.taskType).." itemName:"..tostring(data.itemName))
table.insert(curData.rewards,data)
end
end