宝物共鸣修改

dev_chengFeng
jiaoyangna 2021-07-28 15:40:50 +08:00
parent 4805b041e8
commit ad850da05f
3 changed files with 12 additions and 11 deletions

View File

@ -3727,6 +3727,7 @@ function this.CheckIsUpTreasure(Did,index)
if index == 1 then if index == 1 then
isMax = curEquipData.lv == curEquipData.maxLv isMax = curEquipData.lv == curEquipData.maxLv
items,isMatEnough = this.GetCostItems(curEquipData,curEquipData.strongConfig) items,isMatEnough = this.GetCostItems(curEquipData,curEquipData.strongConfig)
isMatEnough = isMatEnough and not (HarmonyManager.IsInfo(curEquipData.upHeroDid) and HarmonyManager.GetSingleAdditions(HarmonyAddType.HunSoulPrint) ~= -1)
elseif index == 2 then elseif index == 2 then
isMax = curEquipData.refineLv == curEquipData.maxRefineLv isMax = curEquipData.refineLv == curEquipData.maxRefineLv
items,isMatEnough = this.GetCostItems(curEquipData,curEquipData.refineConfig) items,isMatEnough = this.GetCostItems(curEquipData,curEquipData.refineConfig)
@ -3735,6 +3736,7 @@ function this.CheckIsUpTreasure(Did,index)
items,isMatEnough = this.GetCostItems(curEquipData,curEquipData.refineConfig) items,isMatEnough = this.GetCostItems(curEquipData,curEquipData.refineConfig)
if not isMatEnough then if not isMatEnough then
items,isMatEnough = this.GetCostItems(curEquipData,curEquipData.strongConfig) items,isMatEnough = this.GetCostItems(curEquipData,curEquipData.strongConfig)
isMatEnough = isMatEnough and not (HarmonyManager.IsInfo(curEquipData.upHeroDid) and HarmonyManager.GetSingleAdditions(HarmonyAddType.HunSoulPrint) ~= -1)
end end
end end
local teamHero=FormationManager.GetWuJinFormationHeroIds(FormationTypeDef.FORMATION_NORMAL) local teamHero=FormationManager.GetWuJinFormationHeroIds(FormationTypeDef.FORMATION_NORMAL)

View File

@ -12,6 +12,7 @@ local isMax=false
local isEnough = false local isEnough = false
local curIndex local curIndex
local datas local datas
local isGongMing = false
--初始化组件(用于子类重写) --初始化组件(用于子类重写)
function EquipTreasureStrongPopup:InitComponent() function EquipTreasureStrongPopup:InitComponent()
this.spLoader = SpriteLoader.New() this.spLoader = SpriteLoader.New()
@ -73,7 +74,7 @@ function EquipTreasureStrongPopup:BindEvent()
end) end)
--强化按钮 --强化按钮
Util.AddClick(this.btnStrong, function() Util.AddClick(this.btnStrong, function()
if HarmonyManager.IsInfo(curEquipData.upHeroDid) then if isGongMing then
return return
end end
--如果强化界面 强化到最高等级谈提示 精炼界面 就切界面 --如果强化界面 强化到最高等级谈提示 精炼界面 就切界面
@ -353,8 +354,10 @@ function EquipTreasureStrongPopup:SetWindShow(_index,delta)
this.hintTxt.text=Language[11782] this.hintTxt.text=Language[11782]
end end
end end
isGongMing = false
if HarmonyManager.IsInfo(curEquipData.upHeroDid) and _index == 1 then local index = curEquipData.equipType == 1 and HarmonyAddType.HunSoulPrint or HarmonyAddType.LingSoulPrint
if HarmonyManager.IsInfo(curEquipData.upHeroDid) and HarmonyManager.GetSingleAdditions(index) ~= -1 and _index == 1 then
isGongMing = true
this.hintTxt.text = "共鸣中的宝物无法强化" this.hintTxt.text = "共鸣中的宝物无法强化"
this.hintTxt.gameObject:SetActive(true) this.hintTxt.gameObject:SetActive(true)
this.Image2.gameObject:SetActive(false) this.Image2.gameObject:SetActive(false)
@ -376,8 +379,7 @@ function EquipTreasureStrongPopup:CostShow(items)
this.costItemPreList = {} this.costItemPreList = {}
end end
--显示消耗物品 --显示消耗物品
if items and isMax==false then if items then
this.costItemGrid.gameObject:SetActive(true)
for i = 1,math.max(#items,#this.costItemPreList) do for i = 1,math.max(#items,#this.costItemPreList) do
if not items[i] then if not items[i] then
this.costItemPreList[i].gameObject:SetActive(false) this.costItemPreList[i].gameObject:SetActive(false)
@ -419,7 +421,7 @@ function EquipTreasureStrongPopup:SetPropertyShow(_infos)
return return
end end
this.propertyGrid.gameObject:SetActive(true) this.propertyGrid.gameObject:SetActive(true)
if type == 1 and HarmonyManager.IsInfo(curEquipData.upHeroDid) then if isGongMing then
for i = 0, #this.properList do for i = 0, #this.properList do
this.properList[i].go.gameObject:SetActive(false) this.properList[i].go.gameObject:SetActive(false)
end end

View File

@ -186,9 +186,8 @@ function RoleEquipTreasureChangePopup:OnOpen(_openThisPanel,_type,_curHeroData,_
curEquipData = _curEquipData curEquipData = _curEquipData
nextEquipData = _nextEquipData nextEquipData = _nextEquipData
position = _position position = _position
local index = curEquipData.equipType == 1 and HarmonyAddType.HunSoulPrint or HarmonyAddType.LingSoulPrint
if HarmonyManager.IsInfo(curEquipData.upHeroDid) and HarmonyManager.GetSingleAdditions(index) ~= -1 then
if HarmonyManager.IsInfo(curEquipData.upHeroDid) then
-- bod -- bod
isGongMing = true isGongMing = true
Util.SetGray(this.curEquipBtnStrong, true) Util.SetGray(this.curEquipBtnStrong, true)
@ -196,8 +195,6 @@ function RoleEquipTreasureChangePopup:OnOpen(_openThisPanel,_type,_curHeroData,_
else else
isGongMing = false isGongMing = false
Util.SetGray(this.curEquipBtnStrong, false) Util.SetGray(this.curEquipBtnStrong, false)
end end
end end
function RoleEquipTreasureChangePopup:OnShow() function RoleEquipTreasureChangePopup:OnShow()