【装备】===========================潜能属性显示修改,归元显示返还材料显示修改
parent
52732876f3
commit
7c3827cd0d
|
|
@ -293,6 +293,17 @@ function this.AddPotentialDataByType(dyn,type,lv)
|
||||||
end
|
end
|
||||||
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)
|
function this.SetHeroBaublesId(dyn,_id)
|
||||||
if heroDatas[dyn] then
|
if heroDatas[dyn] then
|
||||||
|
|
@ -2970,72 +2981,73 @@ end
|
||||||
local rewardGroup = ConfigManager.GetConfig(ConfigName.RewardGroup)
|
local rewardGroup = ConfigManager.GetConfig(ConfigName.RewardGroup)
|
||||||
function this.GetHeroReturnItems(selectHeroData, type)
|
function this.GetHeroReturnItems(selectHeroData, type)
|
||||||
local allRewardData = {}
|
local allRewardData = {}
|
||||||
-- if type == GENERAL_POPUP_TYPE.ResolveRecall then
|
if type == GENERAL_POPUP_TYPE.ResolveRecall then
|
||||||
-- local specificValue = tonumber(ConfigManager.GetConfigData(ConfigName.SpecialConfig, 34).Value) / 10000
|
local specificValue = tonumber(ConfigManager.GetConfigData(ConfigName.SpecialConfig, 34).Value) / 10000
|
||||||
-- local ShowItemlist = {}
|
local ShowItemlist = {}
|
||||||
-- --HeroReturn 的 ReturnHero + RankupReturn * specificValue + HeroLevelConfig 的 Consume * specificValue
|
--HeroReturn 的 ReturnHero + RankupReturn * specificValue + HeroLevelConfig 的 Consume * specificValue
|
||||||
-- --先把回溯英雄放进去
|
--先把回溯英雄放进去
|
||||||
-- for i, v in pairs(selectHeroData) do
|
for i, v in pairs(selectHeroData) do
|
||||||
-- local curHeroData = heroDatas[i]
|
local curHeroData = heroDatas[i]
|
||||||
-- if not curHeroData then
|
if not curHeroData then
|
||||||
-- return
|
return
|
||||||
-- end
|
end
|
||||||
-- local pId
|
local pId
|
||||||
-- if curHeroData.breakId == 0 then
|
if curHeroData.breakId == 0 then
|
||||||
-- pId=0
|
pId=0
|
||||||
-- else
|
else
|
||||||
-- pId= heroRankUpConfig[curHeroData.breakId].Phase[2]
|
pId= heroRankUpConfig[curHeroData.breakId].Phase[2]
|
||||||
-- end
|
end
|
||||||
-- local heroReturnConfig =
|
local heroReturnConfig =
|
||||||
-- ConfigManager.TryGetConfigDataByDoubleKey(
|
ConfigManager.TryGetConfigDataByDoubleKey(
|
||||||
-- ConfigName.HeroReturn,
|
ConfigName.HeroReturn,
|
||||||
-- "HeroId",
|
"HeroId",
|
||||||
-- curHeroData.id,
|
curHeroData.id,
|
||||||
-- "Star",
|
"Star",
|
||||||
-- pId
|
pId
|
||||||
-- )
|
)
|
||||||
-- local rewardShowStr1 = {}
|
local rewardShowStr1 = {}
|
||||||
-- if not heroReturnConfig then
|
if not heroReturnConfig then
|
||||||
-- LogRed("pId:"..pId.." curHeroData.breakId:"..curHeroData.breakId.." curHeroData.id:"..curHeroData.id)
|
LogRed("pId:"..pId.." curHeroData.breakId:"..curHeroData.breakId.." curHeroData.id:"..curHeroData.id)
|
||||||
-- else
|
else
|
||||||
-- ShowItemlist[heroReturnConfig.HeroId] = {heroReturnConfig.HeroId,1,curHeroData.star}
|
ShowItemlist[heroReturnConfig.HeroId] = {heroReturnConfig.HeroId,1,curHeroData.star}
|
||||||
-- rewardShowStr1 = heroReturnConfig.RankupReturn
|
rewardShowStr1 = heroReturnConfig.RankupReturn
|
||||||
-- if rewardShowStr1 then
|
if rewardShowStr1 then
|
||||||
-- for k,v in ipairs(rewardShowStr1) do
|
for k,v in ipairs(rewardShowStr1) do
|
||||||
-- if v[1] and v[2] then
|
if v[1] and v[2] then
|
||||||
-- if not ShowItemlist[v[1]] then
|
if not ShowItemlist[v[1]] then
|
||||||
-- ShowItemlist[v[1]] = {v[1], v[2] * specificValue}
|
ShowItemlist[v[1]] = {v[1], v[2] * specificValue}
|
||||||
-- else
|
else
|
||||||
-- ShowItemlist[v[1]] = {v[1],ShowItemlist[v[1]][2] + v[2] * specificValue}
|
ShowItemlist[v[1]] = {v[1],ShowItemlist[v[1]][2] + v[2] * specificValue}
|
||||||
-- end
|
end
|
||||||
-- end
|
end
|
||||||
-- end
|
end
|
||||||
-- end
|
end
|
||||||
-- end
|
end
|
||||||
-- rewardShowStr1 = ConfigManager.GetConfigData(ConfigName.HeroLevelConfig, v.lv).SumConsume
|
rewardShowStr1 = ConfigManager.GetConfigData(ConfigName.HeroLevelConfig, v.lv).SumConsume
|
||||||
-- if rewardShowStr1 then
|
if rewardShowStr1 then
|
||||||
-- for k,v in ipairs(rewardShowStr1) do
|
for k,v in ipairs(rewardShowStr1) do
|
||||||
-- if not ShowItemlist[v[1]] then
|
if not ShowItemlist[v[1]] then
|
||||||
-- ShowItemlist[v[1]] = {v[1], v[2] * specificValue}
|
ShowItemlist[v[1]] = {v[1], v[2] * specificValue}
|
||||||
-- else
|
else
|
||||||
-- ShowItemlist[v[1]] = {v[1],ShowItemlist[v[1]][2] + v[2] * specificValue}
|
ShowItemlist[v[1]] = {v[1],ShowItemlist[v[1]][2] + v[2] * specificValue}
|
||||||
-- end
|
end
|
||||||
-- end
|
end
|
||||||
-- end
|
end
|
||||||
-- --this.GetHeroReturnItems2(ShowItemlist,allRewardData)
|
--this.GetHeroReturnItems2(ShowItemlist,allRewardData)
|
||||||
-- end
|
end
|
||||||
-- local dropList = {}
|
local dropList = {}
|
||||||
-- for n,m in pairs(ShowItemlist) do
|
for n,m in pairs(ShowItemlist) do
|
||||||
-- local curReward = {}
|
local curReward = {}
|
||||||
-- curReward.id = m[1]
|
curReward.id = m[1]
|
||||||
-- curReward.num = math.floor(m[2])
|
curReward.num = math.floor(m[2])
|
||||||
-- curReward.itemConfig = itemConfig[curReward.id]
|
curReward.itemConfig = itemConfig[curReward.id]
|
||||||
-- curReward.star = m[3] or nil
|
curReward.star = m[3] or nil
|
||||||
-- table.insert(dropList, curReward)
|
table.insert(dropList, curReward)
|
||||||
-- end
|
end
|
||||||
-- return dropList
|
return dropList
|
||||||
-- else
|
elseif type == GENERAL_POPUP_TYPE.ResolveDismantle then
|
||||||
if type == GENERAL_POPUP_TYPE.ResolveDismantle or type== GENERAL_POPUP_TYPE.ResolveRecall then --献祭
|
|
||||||
|
--if type == GENERAL_POPUP_TYPE.ResolveDismantle or type== GENERAL_POPUP_TYPE.ResolveRecall then --献祭
|
||||||
local specificValue = tonumber(ConfigManager.GetConfigData(ConfigName.SpecialConfig, 35).Value) / 10000
|
local specificValue = tonumber(ConfigManager.GetConfigData(ConfigName.SpecialConfig, 35).Value) / 10000
|
||||||
for i, v in pairs(selectHeroData) do
|
for i, v in pairs(selectHeroData) do
|
||||||
--当英雄一次都未突破和进阶时
|
--当英雄一次都未突破和进阶时
|
||||||
|
|
@ -3199,7 +3211,7 @@ function this.GetReturnItemsByType(selectHeroData)
|
||||||
for i, v in pairs(selectHeroData) do
|
for i, v in pairs(selectHeroData) do
|
||||||
local curHeroData = heroDatas[i]
|
local curHeroData = heroDatas[i]
|
||||||
local temp = {}
|
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])
|
local temp1 =tonumber(ConfigManager.GetConfigData(ConfigName.HeroConfig, curHeroData.id).EquipTalismana[2])
|
||||||
for i = 1, curHeroData.talismanList - 1 do
|
for i = 1, curHeroData.talismanList - 1 do
|
||||||
temp = ConfigManager.GetConfigDataByDoubleKey(ConfigName.EquipTalismana,"TalismanaId",temp1,"Level",i).RankupBasicMaterial
|
temp = ConfigManager.GetConfigDataByDoubleKey(ConfigName.EquipTalismana,"TalismanaId",temp1,"Level",i).RankupBasicMaterial
|
||||||
|
|
@ -4247,6 +4259,19 @@ function this.GetHeroPotencyAddByType(_dyn,_type)
|
||||||
end
|
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)
|
function this.ResetHero(dynamicloadId)
|
||||||
if heroDatas[dynamicloadId] then
|
if heroDatas[dynamicloadId] then
|
||||||
|
|
|
||||||
|
|
@ -140,6 +140,7 @@ function RewardEquipSingleShowPopup2:BindEvent()
|
||||||
self:ClosePanel()
|
self:ClosePanel()
|
||||||
if heroId=="0" then
|
if heroId=="0" then
|
||||||
GiftManager.SetPlayerGift(idList)
|
GiftManager.SetPlayerGift(idList)
|
||||||
|
HeroManager.ChangeAllHeroGiftLV()
|
||||||
else
|
else
|
||||||
GiftManager.SetHeroGift(self.curHeroData.dynamicId,idList,1)
|
GiftManager.SetHeroGift(self.curHeroData.dynamicId,idList,1)
|
||||||
end
|
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]*GiftManager.GetPlayerGiftAdd()/100),GiftManager.GetPlayerGiftAdd())
|
||||||
..string.format(" 特训加成+%s (%s%%)",math.floor(prop[2]*HeroManager.ReturnGiftAtt()),HeroManager.ReturnGiftAtt())
|
..string.format(" 特训加成+%s (%s%%)",math.floor(prop[2]*HeroManager.ReturnGiftAtt()),HeroManager.ReturnGiftAtt())
|
||||||
elseif equipConfigData.Position<=4 and self.curHeroData then
|
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)
|
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)
|
vText.text = "+"..GetPropertyFormatStr(proConfigData.Style, prop[2])..string.format(" <color=#00ff00>潜能 +%s(%s%%)</color>",math.floor(prop[2]*potencyAdd+0.5),potencyAdd*100)
|
||||||
else
|
else
|
||||||
|
|
@ -553,6 +557,7 @@ function RewardEquipSingleShowPopup2:OnShow()
|
||||||
if self.curHeroData and (self.openType == 2 or self.openType == 5) then
|
if self.curHeroData and (self.openType == 2 or self.openType == 5) then
|
||||||
equipGoldSuite = HeroManager.GetCurHeroBaiJinEquipSuitPros(self.curHeroData.equipIdList)
|
equipGoldSuite = HeroManager.GetCurHeroBaiJinEquipSuitPros(self.curHeroData.equipIdList)
|
||||||
end
|
end
|
||||||
|
LogError("equipConfigData.Star===================="..equipConfigData.Star)
|
||||||
local curGoldSuitConFig = suitConFig[equipConfigData.Star]
|
local curGoldSuitConFig = suitConFig[equipConfigData.Star]
|
||||||
for k,v in ipairs(_superProList) do
|
for k,v in ipairs(_superProList) do
|
||||||
v.gameObject:SetActive(false)
|
v.gameObject:SetActive(false)
|
||||||
|
|
|
||||||
|
|
@ -556,7 +556,8 @@ function RewardTalismanSingleShowPopup2:SetPropertyShow1(_infos,_preList,_grid)
|
||||||
end
|
end
|
||||||
if self.curHeroData then
|
if self.curHeroData then
|
||||||
if proper.Style==1 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)
|
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)
|
str = str..GetLanguageStrById(proper.Info).."+".. value.currValue..string.format(" <color=#00ff00>潜能 +%s(%s%%)</color>",math.floor(value.currValue*(potencyAdd)+0.5),potencyAdd*100)
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -103,12 +103,12 @@ end
|
||||||
|
|
||||||
function RecruitEquipPanelNew:BindEvent()
|
function RecruitEquipPanelNew:BindEvent()
|
||||||
Util.AddOnceClick(self.lsth, function()
|
Util.AddOnceClick(self.lsth, function()
|
||||||
-- local isOpen =CheckFunctionOpen(FUNCTION_OPEN_TYPE.EquipWish)
|
local isOpen =CheckFunctionOpen(FUNCTION_OPEN_TYPE.EquipWish)
|
||||||
-- local tip=GetFunctionOpenTip(FUNCTION_OPEN_TYPE.EquipWish)
|
local tip=GetFunctionOpenTip(FUNCTION_OPEN_TYPE.EquipWish)
|
||||||
-- if isOpen==false then
|
if isOpen==false then
|
||||||
-- PopupTipPanel.ShowTip(tip)
|
PopupTipPanel.ShowTip(tip)
|
||||||
-- return
|
return
|
||||||
-- end
|
end
|
||||||
JumpManager.GoJump(40082)
|
JumpManager.GoJump(40082)
|
||||||
end)
|
end)
|
||||||
--帮助按钮
|
--帮助按钮
|
||||||
|
|
|
||||||
|
|
@ -484,6 +484,9 @@ local bType={
|
||||||
--点将台红点状态
|
--点将台红点状态
|
||||||
function this.GetAllRecruitBtnRedpoint(red)
|
function this.GetAllRecruitBtnRedpoint(red)
|
||||||
local index = {}
|
local index = {}
|
||||||
|
if red==RedPointType.Recruit_Friend and CheckFunctionOpen(FUNCTION_OPEN_TYPE.EquipWish)==false then
|
||||||
|
return false
|
||||||
|
end
|
||||||
if red == RedPointType.Recruit_Normal then
|
if red == RedPointType.Recruit_Normal then
|
||||||
index = {1,2}
|
index = {1,2}
|
||||||
elseif red == RedPointType.Recruit_Friend then
|
elseif red == RedPointType.Recruit_Friend then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue