diff --git a/Assets/ManagedResources/~Lua/Modules/Bag/BagResolveAnCompoundPanel.lua b/Assets/ManagedResources/~Lua/Modules/Bag/BagResolveAnCompoundPanel.lua index 5c6f97c811..c6e158885e 100644 --- a/Assets/ManagedResources/~Lua/Modules/Bag/BagResolveAnCompoundPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Bag/BagResolveAnCompoundPanel.lua @@ -280,8 +280,12 @@ function this.OnShowLayout3Data() if itemData.itemConfig.ItemType==ItemType.HeroDebris then--碎片 this.chipFrame:SetActive(true) this.chipFrame:GetComponent("Image").sprite = Util.LoadSprite(GetHeroChipQuantityImageByquality(itemData.itemConfig.Quantity)) - this.propertyIma:SetActive(true) - this.propertyIma:GetComponent("Image").sprite = Util.LoadSprite(GetJobSpriteStrByJobNum(itemData.itemConfig.PropertyName)) + if itemData.itemConfig.PropertyName and itemData.itemConfig.PropertyName > 0 then + this.propertyIma:SetActive(true) + this.propertyIma:GetComponent("Image").sprite = Util.LoadSprite(GetJobSpriteStrByJobNum(itemData.itemConfig.PropertyName)) + else + this.propertyIma:SetActive(false) + end this.nameText.text=Language[10209] this.btnCompoundText.text=Language[10210] local maxCompoundValue = math.floor(itemData.num/itemData.itemConfig.UsePerCount) diff --git a/Assets/ManagedResources/~Lua/Modules/Shop/ShopBuyPopup.lua b/Assets/ManagedResources/~Lua/Modules/Shop/ShopBuyPopup.lua index c9b6aac375..eb5ffbafa2 100644 --- a/Assets/ManagedResources/~Lua/Modules/Shop/ShopBuyPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Shop/ShopBuyPopup.lua @@ -111,8 +111,12 @@ function ShopBuyPopup:OnOpen(shopType, shopItemId) if itemConfig[this.shopItemInfo.Goods[1][1]].ItemType == 2 then Util.GetGameObject(self.gameObject,"tipImage/item/chip").gameObject:SetActive(true) Util.GetGameObject(self.gameObject,"tipImage/item/chip"):GetComponent("Image").sprite = Util.LoadSprite(GetHeroChipQuantityImageByquality(itemConfig[this.shopItemInfo.Goods[1][1]].Quantity)) - Util.GetGameObject(self.gameObject, "tipImage/item/proima"):SetActive(true) - Util.GetGameObject(self.gameObject, "tipImage/item/proima"):GetComponent("Image").sprite = Util.LoadSprite(GetJobSpriteStrByJobNum(itemConfig[this.shopItemInfo.Goods[1][1]].PropertyName)) + if itemConfig[this.shopItemInfo.Goods[1][1]].PropertyName and itemConfig[this.shopItemInfo.Goods[1][1]].PropertyName > 0 then + Util.GetGameObject(self.gameObject, "tipImage/item/proima"):SetActive(true) + Util.GetGameObject(self.gameObject, "tipImage/item/proima"):GetComponent("Image").sprite = Util.LoadSprite(GetJobSpriteStrByJobNum(itemConfig[this.shopItemInfo.Goods[1][1]].PropertyName)) + else + Util.GetGameObject(self.gameObject, "tipImage/item/proima"):SetActive(false) + end else Util.GetGameObject(self.gameObject,"tipImage/item/chip").gameObject:SetActive(false) Util.GetGameObject(self.gameObject, "tipImage/item/proima"):SetActive(false)