副本红点修改提交

dev_chengFeng
jiaoyangna 2020-08-31 13:58:47 +08:00
parent 9fd56a684d
commit 366343b72b
4 changed files with 44 additions and 36 deletions

View File

@ -807,13 +807,14 @@ function this.CheckEliteCarbonRedpot(carbonId)
end
-- 红点检测方法
function this.CarbonRedCheck(redType)
function this. CarbonRedCheck(redType)
if not ActTimeCtrlManager.IsQualifiled(FUNCTION_OPEN_TYPE.DAILYCHALLENGE_COIN) then
return false
end
--日常
if redType == RedPointType.HeroExplore then
if ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.DAILYCHALLENGE_COIN) then
if redType == FUNCTION_OPEN_TYPE.DAILYCHALLENGE_COIN then
if ActTimeCtrlManager.SingleFuncState(redType) then
for k,v in pairs(this.GetDailyCarbons(0)) do
if v and v.state then
return true
@ -828,22 +829,20 @@ function this.CarbonRedCheck(redType)
-- else
-- return false
-- end
-- --大闹天宫
-- elseif redType == RedPointType.OrdinaryExplore then
-- if ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.DAILYCHALLENGE_COIN) then
-- else
-- return false
-- end
--大闹天宫
elseif redType == FUNCTION_OPEN_TYPE.EXPEDITION then
if ActTimeCtrlManager.SingleFuncState(redType) then
return TreasureOfHeavenManger.RedPoint()
end
return false
--车迟斗法
elseif redType == RedPointType.LegendExplore then
if ActTimeCtrlManager.IsQualifiled(FUNCTION_OPEN_TYPE.CARDELAY) and PlayerManager.familyId ~= 0
elseif redType == FUNCTION_OPEN_TYPE.CARDELAY then
if ActTimeCtrlManager.IsQualifiled(redType) and PlayerManager.familyId ~= 0
and (GuildCarDelayManager.RefreshRedPoint(GuildCarDelayProType.Challenge)
or GuildCarDelayManager.RefreshRedPoint(GuildCarDelayProType.Loot)) then
return true
else
return false
end
return false
end
end

View File

@ -4,6 +4,7 @@ local this = CarbonTypePanelV2
local hasFresh = false
local orginLayer = 0
local specialConfig = ConfigManager.GetConfig(ConfigName.SpecialConfig)
local redPointTypeList = {}
local type = {
[1] = {
title = "r_Dungeon_tonghefuben",
@ -178,20 +179,6 @@ function CarbonTypePanelV2:BindEvent()
UIManager.OpenPanel(UIName.VipPanelV2)
end
)
for k,v in ipairs(carbons) do
local data
if not type[PlayerManager.carbonType][k] then
data = type[PlayerManager.carbonType].default
else
data = type[PlayerManager.carbonType][k]
end
if data.redPointType == -1 or not data.redPointType then
Util.GetGameObject(v, "redPoint"):SetActive(false)
else
BindRedPointObject(data.redPointType,Util.GetGameObject(v, "redPoint"))
end
end
end
@ -228,6 +215,29 @@ end
--界面打开时调用(用于子类重写)
function CarbonTypePanelV2:OnShow(...)
if not redPointTypeList then
redPointTypeList= {}
end
for k,v in pairs(carbons) do
if redPointTypeList[Util.GetGameObject(v, "redPoint")] then
ClearRedPointObject(redPointTypeList[Util.GetGameObject(v, "redPoint")],Util.GetGameObject(v, "redPoint"))
redPointTypeList[Util.GetGameObject(v, "redPoint")] = -1
end
end
for k,v in ipairs(carbons) do
local data
if not type[PlayerManager.carbonType][k] then
data = type[PlayerManager.carbonType].default
else
data = type[PlayerManager.carbonType][k]
end
if data.redPointType == -1 or not data.redPointType then
Util.GetGameObject(v, "redPoint"):SetActive(false)
else
BindRedPointObject(data.redPointType,Util.GetGameObject(v, "redPoint"))
redPointTypeList[Util.GetGameObject(v, "redPoint")] = data.redPointType
end
end
carbonType = PlayerManager.carbonType
this.title:GetComponent("Image").sprite = Util.LoadSprite(type[carbonType].title)
@ -499,8 +509,10 @@ function CarbonTypePanelV2:OnDestroy()
if data.redPointType == -1 or not data.redPointType then
else
ClearRedPointObject(data.redPointType,Util.GetGameObject(v, "redPoint"))
redPointTypeList[Util.GetGameObject(v, "redPoint")] = -1
end
end
redPointTypeList = {}
end
return CarbonTypePanelV2

View File

@ -246,7 +246,7 @@ function this.InitRedPointAllRelate()
-- 成就
RPData:SetParent(RedPointType.Achievement_Main, RedPointType.DailyTaskMain)
--大闹天宫 天宫秘宝
RPData:SetParent(RedPointType.Expedition_Treasure, RedPointType.OrdinaryExplore)
--RPData:SetParent(RedPointType.Expedition_Treasure, RedPointType.OrdinaryExplore)
end
-- 注册红点检测方法
@ -396,6 +396,7 @@ function this.RegisterRedCheckFunc()
RPData:AddCheckFunc(RedPointType.PoZhenZhuXianTask, OperatingManager.CheckPoZhenZhuXianTaskRed)
RPData:AddCheckFunc(RedPointType.PoZhenZhuXianRecharge, OperatingManager.CheckLeiJiChongZhiRedData)
RPData:AddCheckFunc(RedPointType.OrdinaryExplore, CarbonManager.CarbonRedCheck,FUNCTION_OPEN_TYPE.EXPEDITION)
RPData:AddCheckFunc(RedPointType.HeroExplore, CarbonManager.CarbonRedCheck,FUNCTION_OPEN_TYPE.DAILYCHALLENGE_COIN)
RPData:AddCheckFunc(RedPointType.EpicExplore, CarbonManager.CarbonRedCheck,FUNCTION_OPEN_TYPE.MONSTER_COMING)
RPData:AddCheckFunc(RedPointType.LegendExplore, CarbonManager.CarbonRedCheck,FUNCTION_OPEN_TYPE.CARDELAY)

View File

@ -72,16 +72,12 @@ function this.RedPointState(singleRewardData,TreasrueState)
end
function this.RedPoint()
local data={}
for i, v in ConfigPairs(ConfigData) do
table.insert(data, v)
end
for i =1, #this.rewardStateData do
local curTreasrueState = OperatingManager.GetGoodsBuyTime(GoodsTypeDef.TreasureOfHeaven,106)
if this.curScore >= ConfigData[this.rewardStateData[i].id].Integral then
if this.rewardStateData[i].state==0 and curTreasrueState==1 or
this.rewardStateData[i].state==1 and curTreasrueState==1 or
this.rewardStateData[i].state==0 and curTreasrueState==0 then
if (this.rewardStateData[i].state==0 and curTreasrueState==1) or
(this.rewardStateData[i].state==1 and curTreasrueState==1) or
(this.rewardStateData[i].state==0 and curTreasrueState==0) then
return true
end
end