diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemSingleShowPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemSingleShowPopup.lua
index e14a3ad76d..e132064ad6 100644
--- a/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemSingleShowPopup.lua
+++ b/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemSingleShowPopup.lua
@@ -21,9 +21,9 @@ function RewardItemSingleShowPopup:InitComponent()
this.itemPos = Util.GetGameObject(self.transform, "bgPanel/armor/itemPos")
this.itemView = SubUIManager.Open(SubUIConfig.ItemView,this.itemPos.transform)
- this.pos = Util.GetGameObject(self.transform, "bgPanel/armor/pos")
- this.posIcon = Util.GetGameObject(this.pos, "PosImage"):GetComponent("Image")
- this.posText = Util.GetGameObject(this.pos, "PosText"):GetComponent("Text")
+ this.pos = Util.GetGameObject(self.transform, "bgPanel/armor/pos"):GetComponent("Image")
+ this.posIcon = Util.GetGameObject(this.pos.transform, "PosImage"):GetComponent("Image")
+ this.posText = Util.GetGameObject(this.pos.transform, "PosText"):GetComponent("Text")
this.armorType = Util.GetGameObject(self.transform, "bgPanel/armor/info/armorType"):GetComponent("Text")
this.armorLanTuNum = Util.GetGameObject(self.transform, "armor/info/armorLanTuNum"):GetComponent("Text")
@@ -312,6 +312,7 @@ function RewardItemSingleShowPopup:OnShow()
this.btnSure:SetActive(false)
this.equipQuaText.gameObject:SetActive(false)
this.pos.gameObject:SetActive(true)
+ this.pos.sprite = this.spLoader:LoadSprite(GetHeroPosBgStr(heroConfig.Profession))
this.armorInfo.gameObject:SetActive(false)
this.armorTitle.gameObject:SetActive(true)
this.armorDesc.gameObject:SetActive(true)
diff --git a/Assets/ManagedResources/~Lua/View/JumpViewNew.lua b/Assets/ManagedResources/~Lua/View/JumpViewNew.lua
index 0575f9d9fa..cf3927b859 100644
--- a/Assets/ManagedResources/~Lua/View/JumpViewNew.lua
+++ b/Assets/ManagedResources/~Lua/View/JumpViewNew.lua
@@ -14,6 +14,7 @@ function JumpViewNew:InitComponent()
local tran = Util.GetGameObject(self.gameObject, "content")
self.info = Util.GetGameObject(tran, "info"):GetComponent("Text")
self.btnSure = Util.GetGameObject(tran, "btnSure")
+ self.btnSureIma = self.btnSure:GetComponent("Image")
self.btnSureText = Util.GetGameObject(tran, "btnSure/Text"):GetComponent("Text")
self.desc = Util.GetGameObject(tran, "grid/Text"):GetComponent("Text")
@@ -45,6 +46,8 @@ function JumpViewNew:OnOpen(jumpId,heroConfig,parent)
self.jumpSData=JumpConfig[jumpId]
self.needChipId = heroConfig.PiecesId
self.needChipNum = ItemConfig[self.needChipId].UsePerCount
+ self.btnSureIma.sprite = self.parent.spLoader:LoadSprite("r_hero_button_002")
+ local color = "EBCC97"
if self.jumpSData then
self.info.text=GetLanguageStrById(self.jumpSData.Title)
self.btnSureText.text = Language[10556]
@@ -95,10 +98,14 @@ function JumpViewNew:OnOpen(jumpId,heroConfig,parent)
else
needCostNum = math.ceil(self.needChipNum/getChipNum)*costItemNum
end
-
- self.desc.text = ItemConfig[costItemId].Name..":"..BagManager.GetItemCountById(costItemId).."/"..needCostNum
+ local itemcount = BagManager.GetItemCountById(costItemId)
self.costIconPos.gameObject:SetActive(true)
self.itemView:OnOpen(false, {costItemId,0}, 0.4, false, false, false, self.parent.sortingOrder)
+ if itemcount >= needCostNum then
+ color = "12C10B"
+ self.btnSureIma.sprite = self.parent.spLoader:LoadSprite("r_hero_button_001")
+ end
+ self.desc.text = string.format("%s:%s/%s",color, ItemConfig[costItemId].Name,itemcount,needCostNum)
elseif self.jumpSData.Type == JumpType.XingChenShangDian then
local storeTypeConfig = ConfigManager.GetConfigDataByKey(ConfigName.StoreTypeConfig,"StoreType",70)
local configs = ConfigManager.GetAllConfigsDataByKey(ConfigName.StoreConfig,"StoreId",storeTypeConfig.Id)
@@ -116,13 +123,23 @@ function JumpViewNew:OnOpen(jumpId,heroConfig,parent)
end
end
local needCostNum = math.ceil(self.needChipNum/getChipNum)*costItemNum
- self.desc.text = ItemConfig[costItemId].Name..":"..BagManager.GetItemCountById(costItemId).."/"..needCostNum
+ local itemcount = BagManager.GetItemCountById(costItemId)
self.costIconPos.gameObject:SetActive(true)
self.itemView:OnOpen(false, {costItemId,0}, 0.4, false, false, false, self.parent.sortingOrder)
+ if itemcount >= needCostNum then
+ color = "12C10B"
+ self.btnSureIma.sprite = self.parent.spLoader:LoadSprite("r_hero_button_001")
+ end
+ self.desc.text = string.format("%s:%s/%s",color, ItemConfig[costItemId].Name,itemcount,needCostNum)
elseif self.jumpSData.Type == 30003 then
self.btnSureText.text = "合成"
self.itemView:OnOpen(false, {self.needChipId,0}, 0.4, false, false, false, self.parent.sortingOrder)
- self.desc.text = ItemConfig[self.needChipId].Name..":"..BagManager.GetItemCountById(self.needChipId).."/"..self.needChipNum
+ local itemcount = BagManager.GetItemCountById(self.needChipId)
+ if itemcount >= self.needChipNum then
+ color = "12C10B"
+ self.btnSureIma.sprite = self.parent.spLoader:LoadSprite("r_hero_button_001")
+ end
+ self.desc.text = string.format("%s:%s/%s",color,ItemConfig[self.needChipId].Name,itemcount,self.needChipNum)
elseif self.jumpSData.Type == 40 then
self.costIconPos.gameObject:SetActive(false)
self.desc.text = "助力玉帝升星"
@@ -130,10 +147,11 @@ function JumpViewNew:OnOpen(jumpId,heroConfig,parent)
end
function JumpViewNew:GoToJumpData()
if self.jumpSData.Type == 30003 then
- if BagManager.GetItemCountById(self.needChipId) >= self.needChipNum then
+ local itemcount = BagManager.GetItemCountById(self.needChipId)
+ if itemcount >= self.needChipNum then
local gameSetting = ConfigManager.GetConfigData(ConfigName.GameSetting, 1)
local endHeroNum=gameSetting.HeroNumlimit-LengthOfTable(HeroManager.GetAllHeroDatas())
- local sum = math.floor(BagManager.GetItemCountById(self.needChipId) / self.needChipNum)
+ local sum = math.floor(itemcount / self.needChipNum)
if sum > 1 then
local _itemData = BagManager.bagDatas[self.needChipId]
if endHeroNum > 0 then