日常副本判断开启临时添加战力计算

zhangqiang 2020-08-07 06:06:55 +08:00
parent dd4800f657
commit 54148395b4
1 changed files with 4 additions and 2 deletions

View File

@ -55,6 +55,7 @@ local _TabData={ [1] = { default = "r_richang_anniu_jinbi_01", select = "r_richa
local _TabFontColor = { default = Color.New(130 / 255, 128 / 255, 120 / 255, 1),
select = Color.New(243 / 255, 235 / 255, 202 / 255, 1),
lock=Color.New(243 / 255, 235 / 255, 202 / 255, 1)}
local maxForce = 0
function DailyCarbonPanel:InitComponent()
this.panel=Util.GetGameObject(this.gameObject,"Panel")
@ -114,6 +115,7 @@ function DailyCarbonPanel:OnOpen(_carbonIndex)
end
function DailyCarbonPanel:OnShow()
maxForce = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL)
if carbonIndex==0 then carbonIndex=1 end
this.TabCtrl:SetTabAdapter(this.TabAdapter)
this.TabCtrl:SetTabIsLockCheck(this.TabIsLockCheck)
@ -216,7 +218,7 @@ function this.SetData(root, data, ldata)
local isOpen = (not ldata or CarbonManager.IsDailyCarbonPass(ldata.Id)) -- 上一个副本解锁
and PlayerManager.level >= _lv -- 等级
and (_point == 0 or FightPointPassManager.IsFightPointPass(_point))
and PlayerManager.maxForce >= _power -- 战斗力
and maxForce >= _power -- 战斗力
--显示挑战或扫荡道具消耗
goIcon:SetActive(isOpen and freeTime<=0)
goIconNum:SetActive( isOpen and freeTime<=0)
@ -249,7 +251,7 @@ function this.SetData(root, data, ldata)
if PlayerManager.level<_lv then
PopupTipPanel.ShowTip(string.format(Language[10340],_lv))
return
elseif PlayerManager.maxForce < _power then
elseif maxForce < _power then
PopupTipPanel.ShowTip(string.format(Language[12219], _power))
return
elseif _point ~= 0 and not FightPointPassManager.IsFightPointPass(_point) then