diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/PlayerInfoPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/PlayerInfoPopup.lua index a35cccea73..34b99e8817 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/PlayerInfoPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/PlayerInfoPopup.lua @@ -410,6 +410,7 @@ function this.FormationAdapter(teamInfo) for i, demon in ipairs(this.Demons) do demon.frame.sprite = this.spLoader:LoadSprite(GetQuantityImageByquality(1)) demon.hero:SetActive(false) + demon.frame.transform:GetComponent("Button").enabled=false end --队伍阵容 for i, hero in ipairs(teamInfo.team) do @@ -419,7 +420,7 @@ function this.FormationAdapter(teamInfo) local star,starType = GetStarOrGodSoulLv(1,hero) local starSize = Vector2.New(35,35) local starScale = -8 - if starType == 3 then + if starType == 3 then starSize = Vector2.New(1,-15.65) starScale = -13 elseif starType == 2 then @@ -434,16 +435,19 @@ function this.FormationAdapter(teamInfo) SetHeroIcon(this.spLoader, hero,this.Demons[hero.position].icon,heroConfig) SetHeroFlyEffect(this.Demons[hero.position].hero,this.spLoader,hero.star,this.sortingOrder+1,0.9,2) local heroData = {} + local frameBtn=this.Demons[hero.position].frameBtn + frameBtn.transform:GetComponent("Button").enabled=true if this._Config.formationType == FormationTypeDef.FORMATION_TSLX then - Util.AddOnceClick(this.Demons[hero.position].frameBtn, function() + Util.AddOnceClick(frameBtn, function() UIManager.OpenPanel(UIName.RoleGetInfoPopup,false,demonId,hero.star) end) else - Util.AddOnceClick(this.Demons[hero.position].frameBtn, function() - NetManager.ViewHeroInfoRequest(this._PlayerId,hero.heroid,netserverName,this._Config.formationType,function(msg) - if not hero.heroid then - return - end + Util.AddOnceClick(frameBtn, function() + if not hero.heroid or not heroConfig then + + return + end + NetManager.ViewHeroInfoRequest(this._PlayerId,hero.heroid,netserverName,this._Config.formationType,function(msg) heroData= GoodFriendManager.GetHeroDatas(msg.hero,msg.force,msg.SpecialEffects,msg.guildSkill) GoodFriendManager.InitEquipData(msg.equip,heroData)--HeroManager.GetSingleHeroData(heroData.dynamicId) LogError("msg.playerGiftLv==================="..msg.playerGiftLv)