diff --git a/Assets/ManagedResources/~Lua/Modules/Harmony/Manager/HarmonyManager.lua b/Assets/ManagedResources/~Lua/Modules/Harmony/Manager/HarmonyManager.lua index c2bd3642cd..80b4ced01a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Harmony/Manager/HarmonyManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Harmony/Manager/HarmonyManager.lua @@ -667,4 +667,7 @@ function this.WarPowerChangeNotify(did) end end +function this.IsGongMing(_curHeroData) + return this.IsChangeColor(_curHeroData.dynamicId) or (this:IsEnvoy(_curHeroData.dynamicId) and this:HongMengTowerUpLimit() ~= 0) +end return HarmonyManager \ No newline at end of file diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoLayout.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoLayout.lua index 65948379dc..34ec5362cc 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoLayout.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoLayout.lua @@ -87,13 +87,19 @@ end function RoleInfoLayout:BindEvent() --升级 Util.AddClick(this.upLvBtn, function() + if this.isGongMing then + PopupTipPanel.ShowTip("神将正在共鸣中,无法升级!") + return + end if Time.realtimeSinceStartup - RoleInfoLayout.timePressStarted <= 0.4 then - -- --LogGreen("upLvBtn ") this:LvUpClick(true) end end) --长按升级按下状态 this._onPointerDown = function(Pointgo, data) + if this.isGongMing then + return + end isTriggerLongClick = false _isClicked = true RoleInfoLayout.timePressStarted = Time.realtimeSinceStartup @@ -101,6 +107,10 @@ function RoleInfoLayout:BindEvent() end --长按升级抬起状态 this._onPointerUp = function(Pointgo, data) + if this.isGongMing then + PopupTipPanel.ShowTip("神将正在共鸣中,无法升级!") + return + end if _isLongPress and isTriggerLongClick then --连续升级抬起请求升级 this:LongLvUpClick(oldLv) @@ -268,8 +278,8 @@ function this:UpdateHeroUpLvAndBreakMaterialShow() end end - local isGongMing = HarmonyManager.IsChangeColor(curHeroData.dynamicId) or (HarmonyManager:IsEnvoy(curHeroData.dynamicId) and HarmonyManager:HongMengTowerUpLimit() ~= 0) - if isGongMing then + this.isGongMing = HarmonyManager.IsGongMing(curHeroData) + if this.isGongMing then this.gongmingText:SetActive(true) this.upLv:SetActive(false) -- this.upLvBtn:SetActive(false)