From 2ed317bc2c70aeeaffb62432fc38d8fbc4c1a326 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Thu, 7 Apr 2022 15:09:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=91=98=E6=98=9F=E9=98=81=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=EF=BC=8C=E5=A4=87=E6=88=98=E9=98=B5=E8=90=A5=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/Formation/FormationPanelV2.lua | 21 ++++++++++++------- .../~Lua/Modules/Hero/PropHero.lua | 3 ++- .../Popup/RewardEquipSingleShowPopup2.lua | 4 ++-- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua b/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua index 26a640115d..0c61187c09 100644 --- a/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua +++ b/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua @@ -559,7 +559,7 @@ function this.SetCardSingleData(o, heroId, _pos, _heroData) fg.sprite = this.spLoader:LoadSprite(GetHeroCardStarFg[heroData.star]) - pro.sprite=this.spLoader:LoadSprite(GetProStrImageByProNum(heroData.changeProId)) + pro.sprite=this.spLoader:LoadSprite(GetProStrImageByProNum(heroData.property)) local star,starType = heroData.GetStar() if starType == 3 then if heroData.star>11 then @@ -726,8 +726,8 @@ function this.NaturalSort(isNature,a,b) if a.lv == b.lv then if a.warPower == b.warPower then if a.id == b.id then - if a.changeProId==b.changeProId then - return a.changeProId b.sortId end @@ -815,7 +815,14 @@ function this.SingleHeroDataShow(_go, _heroData) else redPot.gameObject:SetActive(false) end - changeProBtn:SetActive(_heroData.changeProId>=5) + if _heroData.property then + changeProBtn:SetActive(_heroData.property>=5) + pro.sprite= this.spLoader:LoadSprite(GetProStrImageByProNum(heroData.property)) + else + changeProBtn:SetActive(false) + LogError("+++++++") + pro.sprite= this.spLoader:LoadSprite(GetProStrImageByProNum(heroData.heroConfig.PropertyName)) + end frame.sprite=this.spLoader:LoadSprite(GetHeroQuantityImageByquality(heroData.heroConfig.Quality,heroData.star)) icon.sprite=this.spLoader:LoadSprite(heroData.icon) if HarmonyManager.IsChangeColor(heroData.dynamicId) then @@ -828,7 +835,7 @@ function this.SingleHeroDataShow(_go, _heroData) lv.text=heroData.lv end - pro.sprite= this.spLoader:LoadSprite(GetProStrImageByProNum(heroData.changeProId)) + pos.sprite = this.spLoader:LoadSprite(heroData.professionIcon) local star,starType = heroData.GetStar(1) local starSize = Vector2.New(30,30) @@ -924,7 +931,7 @@ function this.SingleHeroDataShow(_go, _heroData) end -- 点击事件 Util.AddOnceClick(go, function() - if heroData.changeProId>=5 then + if heroData.property and heroData.property>=5 then UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.ChangeHeroPro,heroData,function() LogError("刷新界面数据") this.RefreshShow(false,false) @@ -1269,7 +1276,7 @@ function this.SetOneKeyGo() end for k, v in ipairs(heros) do local curSingleherodata = HeroManager.GetSingleHeroData(v.dynamicId) - if curSingleherodata.changeProId~=5 then + if curSingleherodata.property~=5 then if not upHeroSidTable[curSingleherodata.id] then if #this.choosedList < 6 then for n = 1, #posArr do diff --git a/Assets/ManagedResources/~Lua/Modules/Hero/PropHero.lua b/Assets/ManagedResources/~Lua/Modules/Hero/PropHero.lua index e0bbf2416f..17f7c289a6 100644 --- a/Assets/ManagedResources/~Lua/Modules/Hero/PropHero.lua +++ b/Assets/ManagedResources/~Lua/Modules/Hero/PropHero.lua @@ -187,7 +187,8 @@ Hero_Prop_Func = { addAllProVal[id] = value end if propertyConfig[id].Style == 1 and curEquip.homeEquipLv then--摘星阁加持 - addAllProVal[id] = addAllProVal[id] + math.ceil(addAllProVal[id] * HomeLandManager.LevelToValue(curEquip.homeEquipLv,curEquip.position)/100) + --LogError("addlevel=="..HomeLandManager.LevelToValue(curEquip.homeEquipLv,curEquip.position)) + addAllProVal[id] = addAllProVal[id] + math.ceil(addAllProVal[id] * HomeLandManager.LevelToValue(curEquip.homeEquipLv,curEquip.position)/10000) end end end diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/RewardEquipSingleShowPopup2.lua b/Assets/ManagedResources/~Lua/Modules/Popup/RewardEquipSingleShowPopup2.lua index 5d1fe243a6..0b7783231b 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/RewardEquipSingleShowPopup2.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/RewardEquipSingleShowPopup2.lua @@ -334,7 +334,7 @@ function RewardEquipSingleShowPopup2:OnShow() local proConfigData = ConfigManager.GetConfigData(ConfigName.PropertyConfig, prop[1]) if proConfigData and proConfigData.Style == 1 then local num = HomeLandManager.LevelToValue(self.equipData.homeEquipLv,self.equipData.position) - local power = math.ceil(prop[2]*(num/100)) + local power = math.ceil(prop[2]*(num/10000)) if not _homeProList[index] then _homeProList[index] = newObjToParent(self.homeProPre, self.homeProGrid) end @@ -342,7 +342,7 @@ function RewardEquipSingleShowPopup2:OnShow() _homeProList[index]:GetComponent("Text").text = GetLanguageStrById(proConfigData.Info) local sText = Util.GetGameObject(_homeProList[index], "curProVale"):GetComponent("Text") sText.text = "+"..GetPropertyFormatStr(proConfigData.Style, power) - Util.GetGameObject(sText.gameObject, "homeValue"):GetComponent("Text").text = string.format("(%s",num).."%)"--摘星阁加持文字显示位置 + Util.GetGameObject(sText.gameObject, "homeValue"):GetComponent("Text").text = string.format("(%s",num/100).."%)"--摘星阁加持文字显示位置 end end end