[法宝]======归元,进阶红点修改
parent
9e5e91d7c8
commit
3a1d522acd
|
@ -16,7 +16,8 @@ local equipsuite = ConfigManager.GetConfig(ConfigName.EquipSuiteConfig)
|
||||||
local jewelConfig = ConfigManager.GetConfig(ConfigName.JewelConfig)
|
local jewelConfig = ConfigManager.GetConfig(ConfigName.JewelConfig)
|
||||||
local jewelRankupConfig = ConfigManager.GetConfig(ConfigName.JewelRankupConfig)
|
local jewelRankupConfig = ConfigManager.GetConfig(ConfigName.JewelRankupConfig)
|
||||||
local jewelResonanceConfig = ConfigManager.GetConfig(ConfigName.JewelResonanceConfig)
|
local jewelResonanceConfig = ConfigManager.GetConfig(ConfigName.JewelResonanceConfig)
|
||||||
|
local EquipStrengthen = ConfigManager.GetConfig(ConfigName.EquipStrengthen)
|
||||||
|
local EquipRankUp = ConfigManager.GetConfig(ConfigName.EquipRankUp)
|
||||||
local heroDatas = {}
|
local heroDatas = {}
|
||||||
this.heroSortedDatas={}--排序后的英雄数据
|
this.heroSortedDatas={}--排序后的英雄数据
|
||||||
this.heroDataLists = {}
|
this.heroDataLists = {}
|
||||||
|
@ -142,6 +143,8 @@ function this.UpdateHeroDatas(_msgHeroData, isFindHandBook)
|
||||||
--LogError("_msgHeroData.soulPos=="..#_msgHeroData.soulPos)
|
--LogError("_msgHeroData.soulPos=="..#_msgHeroData.soulPos)
|
||||||
heroData.soulPrintList = this.SetSoulPrint(_msgHeroData.soulPos,heroData.dynamicId)
|
heroData.soulPrintList = this.SetSoulPrint(_msgHeroData.soulPos,heroData.dynamicId)
|
||||||
heroData.godPrintList = this.SetGodPrint(_msgHeroData.godSeals,heroData.dynamicId)
|
heroData.godPrintList = this.SetGodPrint(_msgHeroData.godSeals,heroData.dynamicId)
|
||||||
|
heroData.equipStrongList=this.GetEquipStrongData(_msgHeroData.equipStrong,_msgHeroData.equipAdvanceLv)
|
||||||
|
heroData.equipAdvanceLv =_msgHeroData.equipAdvanceLv
|
||||||
heroData.skillIdList = {}
|
heroData.skillIdList = {}
|
||||||
--主动技
|
--主动技
|
||||||
this.UpdateSkillIdList(heroData)
|
this.UpdateSkillIdList(heroData)
|
||||||
|
@ -210,11 +213,39 @@ function this.UpdateHeroDatas(_msgHeroData, isFindHandBook)
|
||||||
GodSoulManager.BindHeroDatas(_msgHeroData)
|
GodSoulManager.BindHeroDatas(_msgHeroData)
|
||||||
end
|
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()
|
function this.GetAllHeroList()
|
||||||
return heroDatas
|
return heroDatas
|
||||||
end
|
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)
|
function this.ChangeSkinId(heroId,skinId)
|
||||||
heroDatas[heroId].skinId = skinId
|
heroDatas[heroId].skinId = skinId
|
||||||
|
@ -827,6 +858,39 @@ function this.GetHeroCurUpStarInfo(heroDId)
|
||||||
end
|
end
|
||||||
return RankupConsumeMaterial
|
return RankupConsumeMaterial
|
||||||
end
|
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)
|
function this.GetUpStarHeroListData(heroRankUpGroupId, heroData)
|
||||||
local needHeroListData = {}
|
local needHeroListData = {}
|
||||||
|
@ -3871,10 +3935,10 @@ end
|
||||||
--单个英雄法宝红点
|
--单个英雄法宝红点
|
||||||
function this.GetIsShowTalismanRedPoint(curHeroData)
|
function this.GetIsShowTalismanRedPoint(curHeroData)
|
||||||
local isOpen = TalismanManager.GetCurHeroIsOpenTalisman(curHeroData)
|
local isOpen = TalismanManager.GetCurHeroIsOpenTalisman(curHeroData)
|
||||||
if HarmonyManager.IsChangeColor(curHeroData.dynamicId) then
|
-- if HarmonyManager.IsChangeColor(curHeroData.dynamicId) then
|
||||||
-- body
|
-- -- body
|
||||||
return false
|
-- return false
|
||||||
end
|
-- end
|
||||||
if not isOpen then
|
if not isOpen then
|
||||||
return false
|
return false
|
||||||
--功能未开启
|
--功能未开启
|
||||||
|
@ -3886,7 +3950,9 @@ function this.GetIsShowTalismanRedPoint(curHeroData)
|
||||||
end
|
end
|
||||||
--获取最大等级
|
--获取最大等级
|
||||||
TalismanManager.GetStartAndEndStar()
|
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)
|
local curLv = HeroManager.GetTalismanLv(curHeroData.dynamicId)
|
||||||
--获取当前等级与下一等级表数据
|
--获取当前等级与下一等级表数据
|
||||||
|
|
|
@ -92,10 +92,10 @@ function RoleTalismanPanelV2:BindEvent()
|
||||||
end)
|
end)
|
||||||
--进阶按钮
|
--进阶按钮
|
||||||
Util.AddClick(this.RecallBtn, function()
|
Util.AddClick(this.RecallBtn, function()
|
||||||
if HarmonyManager.IsChangeColor(curHeroData.dynamicId) then
|
-- if HarmonyManager.IsChangeColor(curHeroData.dynamicId) then
|
||||||
PopupTipPanel.ShowTip(Language[12184])
|
-- PopupTipPanel.ShowTip(Language[12184])
|
||||||
return
|
-- return
|
||||||
end
|
-- end
|
||||||
if curHeroData.talismanList and curHeroData.talismanList <= 1 then
|
if curHeroData.talismanList and curHeroData.talismanList <= 1 then
|
||||||
PopupTipPanel.ShowTip(Language[12265])
|
PopupTipPanel.ShowTip(Language[12265])
|
||||||
return
|
return
|
||||||
|
@ -176,7 +176,8 @@ end
|
||||||
--刷新界面
|
--刷新界面
|
||||||
function this.OnShowHeroAndTalisman()
|
function this.OnShowHeroAndTalisman()
|
||||||
--print(tostring(curHeroData.harmonyFaGongMing))
|
--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)
|
this.content:DOAnchorPosY(0, 0)
|
||||||
local data = ConfigManager.GetConfigData(ConfigName.HeroConfig,curHeroData.id).EquipTalismana--当前法宝数据 data[1]星级 data[2]法宝ID
|
local data = ConfigManager.GetConfigData(ConfigName.HeroConfig,curHeroData.id).EquipTalismana--当前法宝数据 data[1]星级 data[2]法宝ID
|
||||||
--获取法宝最大等级
|
--获取法宝最大等级
|
||||||
|
|
Loading…
Reference in New Issue