碎片合成修改

(cherry picked from commit c81fbbfa27)
tcx_xiyou_test
wangzhenxing 2024-01-02 16:15:08 +08:00
parent 978462344e
commit 5507673520
3 changed files with 46 additions and 8 deletions

View File

@ -330,7 +330,6 @@ function this.OnShowLayout3Data()
this.chipFrame:SetActive(true)
this.chipFrame:GetComponent("Image").sprite = this.spLoader:LoadSprite(GetHeroChipQuantityImageByquality(itemData.itemConfig.Quantity))
if itemData.itemConfig.PropertyName and itemData.itemConfig.PropertyName > 0 then
print(itemData.itemConfig.PropertyName,"~~~~~~S")
this.propertyIma:SetActive(true)
this.propertyIma:GetComponent("Image").sprite = this.spLoader:LoadSprite(GetJobSpriteStrByJobNum(itemData.itemConfig.PropertyName))
else
@ -342,11 +341,13 @@ function this.OnShowLayout3Data()
--
if itemData.itemConfig.ItemType==ItemType.HeroDebris
or itemData.itemConfig.ItemType==ItemType.likeabilityItemChip
or itemData.itemConfig.ItemType==ItemType.EquipChip
or itemData.itemConfig.ItemType==ItemType.CommonChip
--or itemData.itemConfig.ItemType==ItemType.EquipChip
--or itemData.itemConfig.ItemType==ItemType.CommonChip
then -- 神将碎片
compoundMaxNum = math.min(maxCompoundValue, gameSetting.HeroCompoundLimit, gameSetting.HeroNumlimit-LengthOfTable(HeroManager.GetAllHeroDatas()))
elseif itemData.itemConfig.ItemType==ItemType.ZuoQiChip then -- 坐骑碎片
elseif itemData.itemConfig.ItemType==ItemType.ZuoQiChip
or itemData.itemConfig.ItemType==ItemType.EquipChip
or itemData.itemConfig.ItemType==ItemType.CommonChip then -- 坐骑碎片
compoundMaxNum = math.min(maxCompoundValue, gameSetting.HeroCompoundLimit)
end
@ -366,6 +367,10 @@ function this.OnShowLayout3Data()
this.nameText.text=Language[10195]
this.btnCompoundText.text=Language[10195]
compoundMaxNum=itemData.num
-- elseif itemData.itemConfig.ItemType==ItemType.ZuoQiChip
-- or itemData.itemConfig.ItemType==ItemType.EquipChip
-- or itemData.itemConfig.ItemType==ItemType.CommonChip then
else
itemResolveType=itemData.itemConfig.ItemBaseType
this.nameText.text=Language[10196]

View File

@ -292,7 +292,7 @@ function this.CalculateEquipWarForce(curEquip)
local value = prop.propertyValue
--
if id~=0 and id~=nil then
LogError("id==========="..id)
--LogError("id==========="..id)
if propertyConfig[id].Style == 2 then
value = value / 100
end

View File

@ -101,9 +101,9 @@ function RewardItemSingleShowPopup:BindEvent()
return
end
if itemConfigData.ItemType == ItemType.HeroDebris
or itemConfigData.ItemType==ItemType.likeabilityItemChip
or itemConfigData.ItemType==ItemType.EquipChip
or itemConfigData.ItemType==ItemType.CommonChip then
or itemConfigData.ItemType==ItemType.likeabilityItemChip then
--or itemConfigData.ItemType==ItemType.EquipChip
--or itemConfigData.ItemType==ItemType.CommonChip then
local gameSetting = ConfigManager.GetConfigData(ConfigName.GameSetting, 1)
local endHeroNum=gameSetting.HeroNumlimit-LengthOfTable(HeroManager.GetAllHeroDatas())
local sum = BagManager.GetItemCountById(itemSid) / BagManager.bagDatas[itemSid].itemConfig.UsePerCount
@ -136,6 +136,39 @@ function RewardItemSingleShowPopup:BindEvent()
else
PopupTipPanel.ShowTip(Language[11509])
end
elseif itemConfigData.ItemType==ItemType.EquipChip or itemConfigData.ItemType==ItemType.CommonChip then
LogError("装备碎片合成========================公共碎片合成")
local endHeroNum2 = 10
local sum = BagManager.GetItemCountById(itemSid) / BagManager.bagDatas[itemSid].itemConfig.UsePerCount
if sum >= 2 then
local _itemData = BagManager.bagDatas[itemSid]
if endHeroNum2 > 0 then
UIManager.OpenPanel(UIName.BagResolveAnCompoundPanel, 3, _itemData, function()
func()
end)
else
PopupTipPanel.ShowTip(Language[12157])
end
elseif sum >= 1 and sum < 2 then
-- body
local compoundNum = 1
local _itemData = BagManager.bagDatas[itemSid]
local item={}
item.itemId= _itemData.id
item.itemNum=compoundNum*_itemData.itemConfig.UsePerCount
if endHeroNum2 > 0 then
NetManager.HeroComposeRequest(item,function (drop)
this.SendBackCompoundReCallBack(drop)
end)
if compoundNum<=0 then
PopupTipPanel.ShowTip(Language[10183])
end
else
PopupTipPanel.ShowTip("合成物品超过最大数量限制")
end
else
PopupTipPanel.ShowTip(Language[11509])
end
elseif itemConfigData.ItemType == ItemType.Blueprint then
if lanTuData and lanTuData[1] == true then
local _itemData = BagManager.bagDatas[itemSid]