From 4801852d88c644af1f620112195a4774f9825b73 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Mon, 30 Aug 2021 18:09:06 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A5=9E=E5=BA=94=E4=BF=AE=E6=94=B9=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RoleInfo/RoleEquipTreasureChangePopup.prefab | 4 ++-- .../Modules/MonsterCamp/MonsterCampManager.lua | 4 +--- .../Modules/RoleInfo/EquipTreasureManager.lua | 9 +++++++++ .../RoleInfo/RoleEquipTreasureChangePopup.lua | 10 +++++----- .../Modules/SacredTree/SacredTreeManager.lua | 16 +++++++++++----- Assets/ManagedResources/~Lua/View/ItemView.lua | 2 +- 6 files changed, 29 insertions(+), 16 deletions(-) diff --git a/Assets/ManagedResources/Prefabs/UI/RoleInfo/RoleEquipTreasureChangePopup.prefab b/Assets/ManagedResources/Prefabs/UI/RoleInfo/RoleEquipTreasureChangePopup.prefab index ff88ee0dbb..c2834332e4 100644 --- a/Assets/ManagedResources/Prefabs/UI/RoleInfo/RoleEquipTreasureChangePopup.prefab +++ b/Assets/ManagedResources/Prefabs/UI/RoleInfo/RoleEquipTreasureChangePopup.prefab @@ -1359,7 +1359,7 @@ MonoBehaviour: m_Left: 0 m_Right: 0 m_Top: 0 - m_Bottom: 0 + m_Bottom: 30 m_ChildAlignment: 4 m_Spacing: 0 m_ChildForceExpandWidth: 1 @@ -3749,7 +3749,7 @@ MonoBehaviour: m_Left: 0 m_Right: 0 m_Top: 0 - m_Bottom: 0 + m_Bottom: 30 m_ChildAlignment: 4 m_Spacing: 0 m_ChildForceExpandWidth: 1 diff --git a/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampManager.lua b/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampManager.lua index 2f9b7c9930..e67c51b5ad 100644 --- a/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampManager.lua @@ -370,16 +370,14 @@ function this.InitSingleTreasureData(_singleData,_fourTotal,_treeLevel) single.id=staticId single.idDyn=_singleData.id single.lv=_singleData.exp - LogGreen("single.lv:"..single.lv) single.refineLv=_singleData.rebuildLevel - LogGreen("single.refineLv:"..single.refineLv) single.maxLv=currJewel.Max[1] single.maxRefineLv=currJewel.Max[2] single.upHeroDid="" single.maxTreeLv = currJewel.GodHoodMaxlv single.treeLv = _treeLevel + single.treePool = currJewel.GodHoodPool single.fourTotal = _fourTotal - LogGreen("_treeLevel:"..single.treeLv.." single.fourTotal:"..single.fourTotal) local quantity=currJewel.Level single.quantity=quantity single.frame=GetQuantityImageByquality(quantity) diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/EquipTreasureManager.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/EquipTreasureManager.lua index 6ce84ed361..8ddaca9abc 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/EquipTreasureManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/EquipTreasureManager.lua @@ -529,6 +529,15 @@ end --计算战斗力 function this.CalculateWarForce(Did) local curTreasure = allTreasures[Did] + if not curTreasure then + curTreasure = MonsterCampManager.GetSingleTreasureByIdDyn(Did) + end + if not curTreasure then + curTreasure = ExpeditionManager.GetSingleTreasureByIdDyn(Did) + end + if not curTreasure then + GoodFriendManager.GetSingleTreasureByIdDyn(Did) + end if curTreasure then return this.CalculateWarForceBase(curTreasure.id, curTreasure.lv, curTreasure.refineLv, curTreasure.treeLv) end diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleEquipTreasureChangePopup.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleEquipTreasureChangePopup.lua index 016d546736..fa1c75767f 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleEquipTreasureChangePopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleEquipTreasureChangePopup.lua @@ -188,14 +188,14 @@ end --界面打开时调用(用于子类重写) -function RoleEquipTreasureChangePopup:OnOpen(_openThisPanel,_type,_curHeroData,_curEquipData,_nextEquipData,_position,isShowBtn) +function RoleEquipTreasureChangePopup:OnOpen(_openThisPanel,_type,_curHeroData,_curEquipData,_nextEquipData,_position,_isShowBtn) openThisPanel = _openThisPanel type = _type--1 穿戴 2 卸下 3 替换 4显示信息 curHeroData = _curHeroData equipData[1] = _curEquipData--lv equipData[2] = _nextEquipData--refinelv position = _position--treelv - isShowBtn = isShowBtn + isShowBtn = _isShowBtn end function RoleEquipTreasureChangePopup:OnShow() Log("openType:"..tostring(type)) @@ -393,9 +393,9 @@ function this.ShowEquipData(i) this.SetPropertyShow1(refineInfo,this.RefinePropertyList[i],this.treasurePanel[i].RefineAttriGrid) end --(神应属性) - local treeInfo=SacredTreeManager.GetCurLvPropertyValue(3,equipData[i].treePool,equipData[i].treeLv) + local treeInfo=SacredTreeManager.GetCurLvPropertyValue(3,equipData[i].treePool,equipData[i].treeLv or 0) this.treasurePanel[i].TreeAttriNum.text = string.format("[神应等级:%s/%s]",equipData[i].treeLv,equipData[i].maxTreeLv) - if equipData[i].upHeroDid == "" or equipData[i].upHeroDid == "0" or treeLv == 0 then + if equipData[i].upHeroDid == "" or equipData[i].upHeroDid == "0" or (equipData[i].treeLv < 1 and SacredTreeManager.CulAttri(equipData[1]) < 1) then this.treasurePanel[i].TreeAttri:SetActive(false) else this.treasurePanel[i].TreeAttri:SetActive(true) @@ -410,7 +410,7 @@ end --神应专用 function this.SetPropertyShow2(_infos,_preList,_grid) - local curTree = SacredTreeManager.CulAttri() + local curTree = SacredTreeManager.CulAttri(equipData[1]) local attriConfig = ConfigManager.GetConfigDataByKey(ConfigName.GodHoodTreeSetting,"Id",0).PropertyUnlcokLevelForClient local dataCount=LengthOfTable(_infos) local preCount=#_preList diff --git a/Assets/ManagedResources/~Lua/Modules/SacredTree/SacredTreeManager.lua b/Assets/ManagedResources/~Lua/Modules/SacredTree/SacredTreeManager.lua index e817631fc4..fc451b2997 100644 --- a/Assets/ManagedResources/~Lua/Modules/SacredTree/SacredTreeManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/SacredTree/SacredTreeManager.lua @@ -60,8 +60,13 @@ function this.GetUnLockNewProperty(trailWaves) end --计算神应等级 -function this.CulAttri() - local wave = this.GetTowerLevel() +function this.CulAttri(dadta) + local wave + if not dadta or EquipTreasureManager.GetSingleTreasureByIdDyn(dadta.idDyn) then + wave = this.GetTowerLevel() + else + wave = dadta.fourTotal or 0 + end local attriConfig = ConfigManager.GetConfigDataByKey(ConfigName.GodHoodTreeSetting,"Id",0) local level = 0 for i = 1, #attriConfig.PropertyUnlcokLevels do @@ -118,9 +123,10 @@ function this.GetCurLvPropertyValue(_type, _id, _lv) local index = info[1] local skillValue = {} skillValue.currValue = info[2] - if info[2] ~= 0 then - proList[index] = skillValue - end + proList[index] = skillValue + -- if info[2] ~= 0 then + -- proList[index] = skillValue + -- end end end end diff --git a/Assets/ManagedResources/~Lua/View/ItemView.lua b/Assets/ManagedResources/~Lua/View/ItemView.lua index b7ef5c115b..2fb7d247d4 100644 --- a/Assets/ManagedResources/~Lua/View/ItemView.lua +++ b/Assets/ManagedResources/~Lua/View/ItemView.lua @@ -607,7 +607,7 @@ function ItemView:NoGetRewardShow(_reward, effectLayer, isShowAddImage) end if data.treeLv > 0 then self.middleDownLv.gameObject:SetActive(true) - self.middleDownLvText.text =string.format("+%s", data.treeLv) + self.middleDownLvText.text =string.format("%s", data.treeLv) else self.middleDownLv.gameObject:SetActive(false) end