羁绊添加潜能等级提交

PC-202302260912\Administrator 2024-04-10 16:52:46 +08:00
parent 34859033ce
commit e404e42f5c
6 changed files with 40 additions and 8 deletions

View File

@ -27,6 +27,8 @@ local ManagerNames = {
"Battle/BattleRecordManager",
--鸿蒙阵
"Harmony/Manager/HarmonyManager",
--天枢密卷管理器
"TianShuMiJuan/TianShuMiJuanManger",
--英雄数据管理
"Hero/HeroManager",
"Hero/HeroPowerManager",
@ -192,8 +194,6 @@ local ManagerNames = {
"NiuQiChongTian/NiuQiChongTianManager",
--福星高照管理器
"FuXingGaoZhao/FuXingGaoZhaoManager",
--天枢密卷管理器
"TianShuMiJuan/TianShuMiJuanManger",
--十五日登录管理器
"FifteenDayGift/FifteenDayGiftManager",
--一般活动界面管理器

View File

@ -264,6 +264,7 @@ function this.GetHeroPotencyLvById(did)
end
end
--LogError("礼物增加 潜能 lv====================================="..lv)
lv=lv+TianShuMiJuanManger.GetAddPotentialLV()
return lv
end
--获取主角礼物添加的潜能等级

View File

@ -374,7 +374,7 @@ function this.ResetHeroPotentialData(_did)
heroDatas[_did].potential={}
heroDatas[_did].potential[1]={}
heroDatas[_did].potential[1].lv=1
heroDatas[_did].potential[1].giftLv=0
heroDatas[_did].potential[1].giftLv=TianShuMiJuanManger.GetAddPotentialLV()
end
end
@ -4264,8 +4264,8 @@ end
function this.GetHeroPotencyAddByType(_dyn,_type)
if heroDatas[_dyn] and heroDatas[_dyn].potential and heroDatas[_dyn].potential[_type] then
local poten=heroDatas[_dyn].potential[_type]
local allLv=poten.lv+poten.giftLv
--LogError("poten.lv====="..poten.lv.." poten.giftLv=="..poten.giftLv)
local allLv=poten.lv+poten.giftLv --+TianShuMiJuanManger.GetAddPotentialLV()
LogError("poten.lv====="..poten.lv.." poten.giftLv=="..poten.giftLv.." TianShuMiJuanManger.GetAddPotentialLV()=="..TianShuMiJuanManger.GetAddPotentialLV())
local config=ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.PotentialNew,"Type",_type,"Level",allLv)
if config then
local pro=config.Attribute/10000
@ -4279,7 +4279,7 @@ 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 allLv=aaa.lv+aaa.giftLv+TianShuMiJuanManger.GetAddPotentialLV()
local config=ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.PotentialNew,"Type",_type,"Level",allLv)
if config then
local pro=config.Attribute/10000

View File

@ -672,7 +672,7 @@ function this.ExecuteLoading()
-- [[[4] = ]]function() NetManager.AllEquipRequest(0, LoadingPanel.OnStep) end, -- 装备(走背包了)
--[[[5] = ]]function() NetManager.AllEquipTreasureRequest(0, LoadingPanel.OnStep) end, -- 宝物
--[[[5] = ]]function() NetManager.GetAllFaXiangRequest(1, LoadingPanel.OnStep) end, -- 法相
-- [[[6] = ]]function() NetManager.GetSoulPrintDataRequest(0, LoadingPanel.OnStep) end, -- 魂印(走背包了)
--[[[6] =]]function() NetManager.AllBookEnableResponse(LoadingPanel.OnStep) end, --天枢密卷
--[[[7] = ]]function() NetManager.DiffMonsterRequest(0,LoadingPanel.OnStep) end, -- 异妖
--[[[8] = ]]function() NetManager.HeroInfoRequest(0, LoadingPanel.OnStep) end, -- 神将信息
--[[[9] = ]]function() NetManager.TeamInfoRequest(LoadingPanel.OnStep) end, -- 编队
@ -706,7 +706,7 @@ function this.ExecuteLoading()
--[[[35] =]]function() NetManager.GetChallengeCopyInfo(LoadingPanel.OnStep) end, --挑战副本
--[[[36] =]]function() MonsterCampManager.SetMyHelpHeroData(nil,nil,LoadingPanel.OnStep) end,--助战神将
--[[[37] =]]function() NetManager.HongMengInfoResponse(LoadingPanel.OnStep) end, --鸿蒙阵
--[[[38] =]]function() NetManager.AllBookEnableResponse(LoadingPanel.OnStep) end, --天枢密卷
--[--[[38] =]]function() NetManager.AllBookEnableResponse(LoadingPanel.OnStep) end, --天枢密卷
--[[[39] =]]function() NetManager.AllEndLessHeroDataResponse(0, LoadingPanel.OnStep) end,--无尽英雄数据
--[[[40] =]]function() NetManager.GetEndlessTreasureInfoResponse(LoadingPanel.OnStep) end,--无尽密保
--[[[41] =]]function() MyGuildManager.ReuqsetRedPackage(LoadingPanel.OnStep) end, --请求红包

View File

@ -49,6 +49,7 @@ function this.CreatSingleConfigData(configData)
local data = {}
data.id = configData.Id
data.name = GetLanguageStrById(configData.Name)
data.Potential=configData.Potential
data.teamers = configData.Teamers
data.activePara = configData.ActivePara
data.activeParaTip = ""--Language[12277]
@ -83,6 +84,20 @@ function this.UpdateFetterId(ids)
this.CheckFetterStatus(5)
end
--获取加成的羁绊等级
function this.GetAddPotentialLV()
local lv=0
for k,v in pairs(this.fetterData) do
if v.enabled==1 then
lv=lv+v.Potential
end
end
return lv
end
--检测条件变化,判断羁绊是否可激活
function this.CheckFetterStatus(fetterType)
if fetterType == 1 then

View File

@ -15,6 +15,7 @@ function FetterItem:InitComponent()
self.mask = Util.GetGameObject(self.gameObject,"bg/mask")
self.grid = Util.GetGameObject(self.gameObject,"scroll")
self.tipText = Util.GetGameObject(self.gameObject,"tip/tipText"):GetComponent("Text")
self.infoTxt=Util.GetGameObject(self.gameObject,"infoTxt"):GetComponent("Text")
self.activeBtn = Util.GetGameObject(self.gameObject,"activeBtn")
self.activeBtnRed = Util.GetGameObject(self.gameObject,"redpot")
self.reward = Util.GetGameObject(self.gameObject,"reward")
@ -34,7 +35,20 @@ function FetterItem:BindEvent()
local item = msg.drop.itemlist[1]
PopupTipPanel.ShowTip(string.format(Language[12278],item.itemNum,GetLanguageStrById(ConfigManager.GetConfigData(ConfigName.ItemConfig,item.itemId).Name)))
end
--LogError("潜能等级============================="..TianShuMiJuanManger.GetAddPotentialLV())
TianShuMiJuanManger.UpdateFetterId({self.itemData.id})
--LogError("潜能等级111111111111111============================="..TianShuMiJuanManger.GetAddPotentialLV())
HeroManager.ChangeAllHeroGiftLV()
--local lv=TianShuMiJuanManger.GetAddPotentialLV()
--LogError("lv==============================="..lv)
local formationList = FormationManager.GetFormationByID(FormationTypeDef.FORMATION_NORMAL)
for i = 1, 6 do
if formationList.teamHeroInfos[i] then
HeroPropManager.SetDirtyByType(formationList.teamHeroInfos[i].heroId, Hero_Prop_Type.Equip)
HeroPropManager.SetDirtyByType(formationList.teamHeroInfos[i].heroId, Hero_Prop_Type.EquipTreasure)
HeroPropManager.SetDirtyByType(formationList.teamHeroInfos[i].heroId, Hero_Prop_Type.FaXiang)
end
end
local newWarPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL)
UIManager.OpenPanel(UIName.WarPowerChangeNotifyPanelV2,{oldValue = oldWarPower,newValue = newWarPower})
parent:RefreshData()
@ -105,6 +119,8 @@ function FetterItem:SetData(data,_parent,_index)
Util.SetGray(self.itemList[i].gameObject,true)
end
end
self.infoTxt.gameObject:SetActive(self.itemData.Potential>0)
self.infoTxt.text="潜能等级+"..self.itemData.Potential
end
function FetterItem:SetIcon(status)