[法宝]======归元,进阶红点修改

dev_chengFeng
wangzhenxing 2022-08-31 14:21:28 +08:00
parent 9e5e91d7c8
commit 3a1d522acd
2 changed files with 78 additions and 11 deletions

View File

@ -16,7 +16,8 @@ local equipsuite = ConfigManager.GetConfig(ConfigName.EquipSuiteConfig)
local jewelConfig = ConfigManager.GetConfig(ConfigName.JewelConfig)
local jewelRankupConfig = ConfigManager.GetConfig(ConfigName.JewelRankupConfig)
local jewelResonanceConfig = ConfigManager.GetConfig(ConfigName.JewelResonanceConfig)
local EquipStrengthen = ConfigManager.GetConfig(ConfigName.EquipStrengthen)
local EquipRankUp = ConfigManager.GetConfig(ConfigName.EquipRankUp)
local heroDatas = {}
this.heroSortedDatas={}--排序后的英雄数据
this.heroDataLists = {}
@ -142,6 +143,8 @@ function this.UpdateHeroDatas(_msgHeroData, isFindHandBook)
--LogError("_msgHeroData.soulPos=="..#_msgHeroData.soulPos)
heroData.soulPrintList = this.SetSoulPrint(_msgHeroData.soulPos,heroData.dynamicId)
heroData.godPrintList = this.SetGodPrint(_msgHeroData.godSeals,heroData.dynamicId)
heroData.equipStrongList=this.GetEquipStrongData(_msgHeroData.equipStrong,_msgHeroData.equipAdvanceLv)
heroData.equipAdvanceLv =_msgHeroData.equipAdvanceLv
heroData.skillIdList = {}
--主动技
this.UpdateSkillIdList(heroData)
@ -210,11 +213,39 @@ function this.UpdateHeroDatas(_msgHeroData, isFindHandBook)
GodSoulManager.BindHeroDatas(_msgHeroData)
end
function this.GetCurIndex()
for i = 1, 4 do
if this.EquipData[i].configData.Limit2 == EquipRankUp[this.levelProId].Level then
if this.EquipData[i].configData.Cost and this.EquipData[i].configData.Cost[1][2] <= BagManager.GetTotalItemNum(this.EquipData[i].configData.Cost[1][1]) then
this.curEquip = i
return
end
end
end
end
-- 获取所有英雄数据
function this.GetAllHeroList()
return heroDatas
end
function this.GetEquipStrongData(msg,level)
local list={}
if msg.infos and #msg.infos > 0 then
for index, value in ipairs(msg.infos) do
-- value.lvId = 1022
-- LogYellow("Location:"..tostring(value.location).." lvId:"..tostring(value.lvId).." 突破等级Id"..tostring(this.levelProId))
if value.location and value.location > 0 and value.location < 5 then
list[value.location].Id = value.strongLv
list[value.location].configData = EquipStrengthen[value.strongLv]
list[value.location].configPro = EquipRankUp[level]
end
end
end
return list
end
function this.ChangeSkinId(heroId,skinId)
heroDatas[heroId].skinId = skinId
@ -827,6 +858,39 @@ function this.GetHeroCurUpStarInfo(heroDId)
end
return RankupConsumeMaterial
end
--获取当前升星信息
function this.GetHeroCurUpStarInfo2(heroDId)
local indexStar = 0
local RankupConsumeMaterial = {}
local config=heroConfig[heroDId]
if config then
if config.RankupConsumeMaterial then
for j = 1, #config.RankupConsumeMaterial do
if #config.RankupConsumeMaterial[j] > 1 then
if config.RankupConsumeMaterial[j][1] > v.star then
if indexStar == 0 then
indexStar = config.RankupConsumeMaterial[j][1]
end
if config.RankupConsumeMaterial[j][1] == indexStar then
local heroUpStarMaterialsData = {}
heroUpStarMaterialsData.upStarData = config.RankupConsumeMaterial[j]
heroUpStarMaterialsData.upStarMaterialsData =heroRankUpGroup[config.RankupConsumeMaterial[j][3]]
table.insert(RankupConsumeMaterial, heroUpStarMaterialsData)
end
end
else
return nil
end
end
end
end
return RankupConsumeMaterial
end
--检测卡库中的英雄是否有满足当前升星条件
function this.GetUpStarHeroListData(heroRankUpGroupId, heroData)
local needHeroListData = {}
@ -3871,10 +3935,10 @@ end
--单个英雄法宝红点
function this.GetIsShowTalismanRedPoint(curHeroData)
local isOpen = TalismanManager.GetCurHeroIsOpenTalisman(curHeroData)
if HarmonyManager.IsChangeColor(curHeroData.dynamicId) then
-- body
return false
end
-- if HarmonyManager.IsChangeColor(curHeroData.dynamicId) then
-- -- body
-- return false
-- end
if not isOpen then
return false
--功能未开启
@ -3886,7 +3950,9 @@ function this.GetIsShowTalismanRedPoint(curHeroData)
end
--获取最大等级
TalismanManager.GetStartAndEndStar()
local maxLv = TalismanManager.AllTalismanEndStar[equipTalismana[2]]
--local maxLv = TalismanManager.AllTalismanEndStar[equipTalismana[2]]
local maxLv = 50
LogError("maxlv===="..maxLv)
--获取当前法宝等级
local curLv = HeroManager.GetTalismanLv(curHeroData.dynamicId)
--获取当前等级与下一等级表数据

View File

@ -92,10 +92,10 @@ function RoleTalismanPanelV2:BindEvent()
end)
--进阶按钮
Util.AddClick(this.RecallBtn, function()
if HarmonyManager.IsChangeColor(curHeroData.dynamicId) then
PopupTipPanel.ShowTip(Language[12184])
return
end
-- if HarmonyManager.IsChangeColor(curHeroData.dynamicId) then
-- PopupTipPanel.ShowTip(Language[12184])
-- return
-- end
if curHeroData.talismanList and curHeroData.talismanList <= 1 then
PopupTipPanel.ShowTip(Language[12265])
return
@ -176,7 +176,8 @@ end
--刷新界面
function this.OnShowHeroAndTalisman()
--print(tostring(curHeroData.harmonyFaGongMing))
this.advanceBtnRedPot:SetActive(teamHero[curHeroData.dynamicId] and HeroManager.GetIsShowTalismanRedPoint(curHeroData) and (not HarmonyManager.IsChangeColor(curHeroData.dynamicId)))
--this.advanceBtnRedPot:SetActive(teamHero[curHeroData.dynamicId] and HeroManager.GetIsShowTalismanRedPoint(curHeroData) and (not HarmonyManager.IsChangeColor(curHeroData.dynamicId)))
this.advanceBtnRedPot:SetActive(teamHero[curHeroData.dynamicId] and HeroManager.GetIsShowTalismanRedPoint(curHeroData))
this.content:DOAnchorPosY(0, 0)
local data = ConfigManager.GetConfigData(ConfigName.HeroConfig,curHeroData.id).EquipTalismana--当前法宝数据 data[1]星级 data[2]法宝ID
--获取法宝最大等级