diff --git a/Assets/ManagedResources/~Lua/Modules/Bag/BagPanel.lua b/Assets/ManagedResources/~Lua/Modules/Bag/BagPanel.lua index 81e5de1f2f..8628c46ae7 100644 --- a/Assets/ManagedResources/~Lua/Modules/Bag/BagPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Bag/BagPanel.lua @@ -351,6 +351,7 @@ function this.SingleItemDataShow(_go, _itemData) local refine=Util.GetGameObject(_go.gameObject, "GameObject/item/refine"):GetComponent("Text") local resetLv = Util.GetGameObject(_go.gameObject, "GameObject/item/resetLv") local talismanStar = Util.GetGameObject(_go.gameObject, "GameObject/item/talismanStar") + local fragmentIcon = Util.GetGameObject(_go.transform, "GameObject/item/fragmentIcon"):GetComponent("Image") num:SetActive(true) resetLv:SetActive(false) talismanStar:SetActive(false) @@ -358,7 +359,7 @@ function this.SingleItemDataShow(_go, _itemData) refine.gameObject:SetActive(false) if _itemData.itemConfig then Util.GetGameObject(_go.transform, "GameObject/item/innateImage"):SetActive(false) - Util.GetGameObject(_go.transform, "GameObject/item/fragmentIcon"):SetActive(false) + fragmentIcon.gameObject:SetActive(false) num:SetActive(true) num:GetComponent("Text").text = _itemData.num if _itemData.itemConfig.ItemType == ItemType.Equip then @@ -371,6 +372,9 @@ function this.SingleItemDataShow(_go, _itemData) SetHeroStars(this.spLoader, talismanStar, equipStarsConfig.Stars,1,Vector2.New(32.5,32.5),-15) end end + elseif _itemData.itemConfig.ItemType == ItemType.likeabilityItem then + fragmentIcon.gameObject:SetActive(true) + fragmentIcon.sprite = this.spLoader:LoadSprite(GetProStrImageByProNum(_itemData.itemConfig.PropertyName)) elseif _itemData.itemConfig.ItemType == ItemType.Pokemon then Util.GetGameObject(_go.gameObject, "GameObject/item/frame"):GetComponent("Image").sprite = this.spLoader:LoadSprite(YaoHunFrame[_itemData.quality]) num:SetActive(false) @@ -390,8 +394,8 @@ function this.SingleItemDataShow(_go, _itemData) end local propertyName = itemConfig[_itemData.itemConfig.Id].PropertyName if (propertyName ~= 0) then - Util.GetGameObject(_go.transform, "GameObject/item/fragmentIcon"):SetActive(true) - Util.GetGameObject(_go.transform, "GameObject/item/fragmentIcon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetProStrImageByProNum(propertyName)) + fragmentIcon.gameObject:SetActive(true) + fragmentIcon.sprite = this.spLoader:LoadSprite(GetProStrImageByProNum(propertyName)) end elseif _itemData.itemConfig.ItemType == ItemType.TalentItem then --天赋材料 @@ -418,8 +422,8 @@ function this.SingleItemDataShow(_go, _itemData) refine.gameObject:SetActive(true) refine.text="+".._itemData.refineLv end - Util.GetGameObject(_go.transform, "GameObject/item/fragmentIcon"):SetActive(true) - Util.GetGameObject(_go.transform, "GameObject/item/fragmentIcon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetProStrImageByProNum(itemConfig[_itemData.itemConfig.Id].PropertyName)) + fragmentIcon.gameObject:SetActive(true) + fragmentIcon.sprite = this.spLoader:LoadSprite(GetProStrImageByProNum(itemConfig[_itemData.itemConfig.Id].PropertyName)) elseif _itemData.itemConfig.ItemType == ItemType.HunYin then SetSoulEffect(itemConfig[_itemData.itemConfig.Id].Quantity1,Util.GetGameObject(_go.transform, "GameObject/effects")) Util.GetGameObject(_go.transform, "GameObject/item/resetLv"):SetActive(false) @@ -435,8 +439,8 @@ function this.SingleItemDataShow(_go, _itemData) frameMask:GetComponent("Image").sprite = this.spLoader:LoadSprite(GetHeroChipQuantityImageByquality(_itemData.itemConfig.Quantity)) local propertyName = itemConfig[_itemData.itemConfig.Id].PropertyName if (propertyName ~= 0) then - Util.GetGameObject(_go.transform, "GameObject/item/fragmentIcon"):SetActive(true) - Util.GetGameObject(_go.transform, "GameObject/item/fragmentIcon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetProStrImageByProNum(propertyName)) + fragmentIcon.gameObject:SetActive(true) + fragmentIcon.sprite = this.spLoader:LoadSprite(GetProStrImageByProNum(propertyName)) end talismanStar:SetActive(true) SetHeroStars(this.spLoader,talismanStar, _itemData.itemConfig.HeroStar[1],1,Vector2.New(32.5,32.5),-15)