【装备】===========================潜能属性显示修改,归元显示返还材料显示修改

TCX_dev_realOne_master
wangzhenxing 2023-12-24 15:16:09 +08:00
parent 52732876f3
commit 7c3827cd0d
5 changed files with 109 additions and 75 deletions

View File

@ -293,6 +293,17 @@ function this.AddPotentialDataByType(dyn,type,lv)
end
end
--改变所有英雄的礼物等级
function this.ChangeAllHeroGiftLV()
for i, v in pairs(heroDatas) do
if v.potential then
for key, value in pairs(v.potential) do
value.giftLv=GiftManager.GetHeroPotencyLvById(i)
end
end
end
end
--设置法灵
function this.SetHeroBaublesId(dyn,_id)
if heroDatas[dyn] then
@ -2970,72 +2981,73 @@ end
local rewardGroup = ConfigManager.GetConfig(ConfigName.RewardGroup)
function this.GetHeroReturnItems(selectHeroData, type)
local allRewardData = {}
-- if type == GENERAL_POPUP_TYPE.ResolveRecall then
-- local specificValue = tonumber(ConfigManager.GetConfigData(ConfigName.SpecialConfig, 34).Value) / 10000
-- local ShowItemlist = {}
-- --HeroReturn 的 ReturnHero + RankupReturn * specificValue + HeroLevelConfig 的 Consume * specificValue
-- --先把回溯英雄放进去
-- for i, v in pairs(selectHeroData) do
-- local curHeroData = heroDatas[i]
-- if not curHeroData then
-- return
-- end
-- local pId
-- if curHeroData.breakId == 0 then
-- pId=0
-- else
-- pId= heroRankUpConfig[curHeroData.breakId].Phase[2]
-- end
-- local heroReturnConfig =
-- ConfigManager.TryGetConfigDataByDoubleKey(
-- ConfigName.HeroReturn,
-- "HeroId",
-- curHeroData.id,
-- "Star",
-- pId
-- )
-- local rewardShowStr1 = {}
-- if not heroReturnConfig then
-- LogRed("pId:"..pId.." curHeroData.breakId:"..curHeroData.breakId.." curHeroData.id:"..curHeroData.id)
-- else
-- ShowItemlist[heroReturnConfig.HeroId] = {heroReturnConfig.HeroId,1,curHeroData.star}
-- rewardShowStr1 = heroReturnConfig.RankupReturn
-- if rewardShowStr1 then
-- for k,v in ipairs(rewardShowStr1) do
-- if v[1] and v[2] then
-- if not ShowItemlist[v[1]] then
-- ShowItemlist[v[1]] = {v[1], v[2] * specificValue}
-- else
-- ShowItemlist[v[1]] = {v[1],ShowItemlist[v[1]][2] + v[2] * specificValue}
-- end
-- end
-- end
-- end
-- end
-- rewardShowStr1 = ConfigManager.GetConfigData(ConfigName.HeroLevelConfig, v.lv).SumConsume
-- if rewardShowStr1 then
-- for k,v in ipairs(rewardShowStr1) do
-- if not ShowItemlist[v[1]] then
-- ShowItemlist[v[1]] = {v[1], v[2] * specificValue}
-- else
-- ShowItemlist[v[1]] = {v[1],ShowItemlist[v[1]][2] + v[2] * specificValue}
-- end
-- end
-- end
-- --this.GetHeroReturnItems2(ShowItemlist,allRewardData)
-- end
-- local dropList = {}
-- for n,m in pairs(ShowItemlist) do
-- local curReward = {}
-- curReward.id = m[1]
-- curReward.num = math.floor(m[2])
-- curReward.itemConfig = itemConfig[curReward.id]
-- curReward.star = m[3] or nil
-- table.insert(dropList, curReward)
-- end
-- return dropList
-- else
if type == GENERAL_POPUP_TYPE.ResolveDismantle or type== GENERAL_POPUP_TYPE.ResolveRecall then --献祭
if type == GENERAL_POPUP_TYPE.ResolveRecall then
local specificValue = tonumber(ConfigManager.GetConfigData(ConfigName.SpecialConfig, 34).Value) / 10000
local ShowItemlist = {}
--HeroReturn 的 ReturnHero + RankupReturn * specificValue + HeroLevelConfig 的 Consume * specificValue
--先把回溯英雄放进去
for i, v in pairs(selectHeroData) do
local curHeroData = heroDatas[i]
if not curHeroData then
return
end
local pId
if curHeroData.breakId == 0 then
pId=0
else
pId= heroRankUpConfig[curHeroData.breakId].Phase[2]
end
local heroReturnConfig =
ConfigManager.TryGetConfigDataByDoubleKey(
ConfigName.HeroReturn,
"HeroId",
curHeroData.id,
"Star",
pId
)
local rewardShowStr1 = {}
if not heroReturnConfig then
LogRed("pId:"..pId.." curHeroData.breakId:"..curHeroData.breakId.." curHeroData.id:"..curHeroData.id)
else
ShowItemlist[heroReturnConfig.HeroId] = {heroReturnConfig.HeroId,1,curHeroData.star}
rewardShowStr1 = heroReturnConfig.RankupReturn
if rewardShowStr1 then
for k,v in ipairs(rewardShowStr1) do
if v[1] and v[2] then
if not ShowItemlist[v[1]] then
ShowItemlist[v[1]] = {v[1], v[2] * specificValue}
else
ShowItemlist[v[1]] = {v[1],ShowItemlist[v[1]][2] + v[2] * specificValue}
end
end
end
end
end
rewardShowStr1 = ConfigManager.GetConfigData(ConfigName.HeroLevelConfig, v.lv).SumConsume
if rewardShowStr1 then
for k,v in ipairs(rewardShowStr1) do
if not ShowItemlist[v[1]] then
ShowItemlist[v[1]] = {v[1], v[2] * specificValue}
else
ShowItemlist[v[1]] = {v[1],ShowItemlist[v[1]][2] + v[2] * specificValue}
end
end
end
--this.GetHeroReturnItems2(ShowItemlist,allRewardData)
end
local dropList = {}
for n,m in pairs(ShowItemlist) do
local curReward = {}
curReward.id = m[1]
curReward.num = math.floor(m[2])
curReward.itemConfig = itemConfig[curReward.id]
curReward.star = m[3] or nil
table.insert(dropList, curReward)
end
return dropList
elseif type == GENERAL_POPUP_TYPE.ResolveDismantle then
--if type == GENERAL_POPUP_TYPE.ResolveDismantle or type== GENERAL_POPUP_TYPE.ResolveRecall then --献祭
local specificValue = tonumber(ConfigManager.GetConfigData(ConfigName.SpecialConfig, 35).Value) / 10000
for i, v in pairs(selectHeroData) do
--当英雄一次都未突破和进阶时
@ -3199,7 +3211,7 @@ function this.GetReturnItemsByType(selectHeroData)
for i, v in pairs(selectHeroData) do
local curHeroData = heroDatas[i]
local temp = {}
if curHeroData.talismanList > 1 then
if curHeroData.talismanList and curHeroData.talismanList > 1 then
local temp1 =tonumber(ConfigManager.GetConfigData(ConfigName.HeroConfig, curHeroData.id).EquipTalismana[2])
for i = 1, curHeroData.talismanList - 1 do
temp = ConfigManager.GetConfigDataByDoubleKey(ConfigName.EquipTalismana,"TalismanaId",temp1,"Level",i).RankupBasicMaterial
@ -4247,6 +4259,19 @@ function this.GetHeroPotencyAddByType(_dyn,_type)
end
function this.GetHeroPotencyAddByTypeAndPotencyData(_data,_type)
if _data and _type and _data[_type] then
local aaa=_data[_type]
local allLv=aaa.lv+aaa.giftLv
local config=ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.PotentialNew,"Type",_type,"Level",allLv)
if config then
local pro=config.Attribute/10000
return pro
end
end
return 0
end
function this.ResetHero(dynamicloadId)
if heroDatas[dynamicloadId] then

View File

@ -140,6 +140,7 @@ function RewardEquipSingleShowPopup2:BindEvent()
self:ClosePanel()
if heroId=="0" then
GiftManager.SetPlayerGift(idList)
HeroManager.ChangeAllHeroGiftLV()
else
GiftManager.SetHeroGift(self.curHeroData.dynamicId,idList,1)
end
@ -359,7 +360,10 @@ function RewardEquipSingleShowPopup2:OnShow()
string.format(" 主角礼物加成+%s (%s%%)",math.floor(prop[2]*GiftManager.GetPlayerGiftAdd()/100),GiftManager.GetPlayerGiftAdd())
..string.format(" 特训加成+%s (%s%%)",math.floor(prop[2]*HeroManager.ReturnGiftAtt()),HeroManager.ReturnGiftAtt())
elseif equipConfigData.Position<=4 and self.curHeroData then
local potencyAdd=HeroManager.GetHeroPotencyAddByType(self.curHeroData.dynamicId,equipConfigData.Position)
-- for k, v in pairs(self.curHeroData.potential) do
-- LogError("v======================"..v.." k==="..k)
-- end
local potencyAdd=HeroManager.GetHeroPotencyAddByTypeAndPotencyData(self.curHeroData.potential,equipConfigData.Position)
LogError("potencyAdd============"..potencyAdd)
vText.text = "+"..GetPropertyFormatStr(proConfigData.Style, prop[2])..string.format(" <color=#00ff00>潜能 +%s(%s%%)</color>",math.floor(prop[2]*potencyAdd+0.5),potencyAdd*100)
else
@ -553,6 +557,7 @@ function RewardEquipSingleShowPopup2:OnShow()
if self.curHeroData and (self.openType == 2 or self.openType == 5) then
equipGoldSuite = HeroManager.GetCurHeroBaiJinEquipSuitPros(self.curHeroData.equipIdList)
end
LogError("equipConfigData.Star===================="..equipConfigData.Star)
local curGoldSuitConFig = suitConFig[equipConfigData.Star]
for k,v in ipairs(_superProList) do
v.gameObject:SetActive(false)

View File

@ -556,7 +556,8 @@ function RewardTalismanSingleShowPopup2:SetPropertyShow1(_infos,_preList,_grid)
end
if self.curHeroData then
if proper.Style==1 then
local potencyAdd=HeroManager.GetHeroPotencyAddByType(self.curHeroData.dynamicId,self.position)
local potencyAdd=HeroManager.GetHeroPotencyAddByTypeAndPotencyData(self.curHeroData.potential,self.position)
LogError("potencyAdd============"..potencyAdd)
str = str..GetLanguageStrById(proper.Info).."+".. value.currValue..string.format(" <color=#00ff00>潜能 +%s(%s%%)</color>",math.floor(value.currValue*(potencyAdd)+0.5),potencyAdd*100)
else

View File

@ -103,12 +103,12 @@ end
function RecruitEquipPanelNew:BindEvent()
Util.AddOnceClick(self.lsth, function()
-- local isOpen =CheckFunctionOpen(FUNCTION_OPEN_TYPE.EquipWish)
-- local tip=GetFunctionOpenTip(FUNCTION_OPEN_TYPE.EquipWish)
-- if isOpen==false then
-- PopupTipPanel.ShowTip(tip)
-- return
-- end
local isOpen =CheckFunctionOpen(FUNCTION_OPEN_TYPE.EquipWish)
local tip=GetFunctionOpenTip(FUNCTION_OPEN_TYPE.EquipWish)
if isOpen==false then
PopupTipPanel.ShowTip(tip)
return
end
JumpManager.GoJump(40082)
end)
--帮助按钮

View File

@ -484,6 +484,9 @@ local bType={
--点将台红点状态
function this.GetAllRecruitBtnRedpoint(red)
local index = {}
if red==RedPointType.Recruit_Friend and CheckFunctionOpen(FUNCTION_OPEN_TYPE.EquipWish)==false then
return false
end
if red == RedPointType.Recruit_Normal then
index = {1,2}
elseif red == RedPointType.Recruit_Friend then