Merge branch 'china/dev_bt' into china/dev_bt_develop

dev_chengFeng
wangzhenxing 2023-03-10 13:33:07 +08:00
commit 4ad0ba6bf6
3 changed files with 65 additions and 4 deletions

View File

@ -17,6 +17,7 @@ this.CurOffsetIndex = -1
function this.Initialize()
this.allTreasures = {}
this.allFaXiangs = {}
this.friendHelpHeros = {}
this.isMaxMonsterWave = false
this.monsterWave = 0 -- 当前妖兽波次
@ -367,7 +368,13 @@ function this.UpdateHeroDatas(_msgHeroData,_msgPlayerData)
end
-- heroData.homeEquipLv=_msgHeroData.homeEquipLv
heroData.jewels=_msgHeroData.jewels
heroData.faxiang=_msgHeroData.faxiang
if heroData.faxiang then
--LogError("助战身上的法相 heroData.faxiang len==="..#heroData.faxiang.." "..heroData.faxiang[1].." "..heroData.faxiang[2])
end
this.InitBaoDatas(_msgPlayerData.jewels,_msgPlayerData.fourTotal,_msgPlayerData.treeLevel)
this.InitFaXiangDatas(_msgPlayerData.faxiang)
for i = 1 , #heroData.jewels do
this.SetEquipTreasureUpHeroDid(heroData.jewels[i],heroData.dynamicId)
end
@ -436,6 +443,53 @@ function this.InitBaoDatas(_soulEquips,_fourTotal,_treeLevel)
this.InitSingleTreasureData(_soulEquips[i],_fourTotal,_treeLevel)
end
end
function this.InitFaXiangDatas(_soulEquips)
if not this.allFaXiangs then
this.allFaXiangs = {}
end
if not _soulEquips then return end
for i = 1, #_soulEquips do
this.InitSingleFaXiangData(_soulEquips[i])
end
end
local faXiangConfig=ConfigManager.GetConfig(ConfigName.FaxiangConfig)
--初始化单个宝物的数据
function this.InitSingleFaXiangData(_singleData,herodata)
if _singleData == nil then
return
end
local single = {}
local staticId = _singleData.equipId
local currJewel = faXiangConfig[staticId]
single.faXiangConfig=currJewel
single.equipType = currJewel.Location
single.id = staticId
single.idDyn = _singleData.id
single.lv = _singleData.exp
single.refineLv = _singleData.rebuildLevel --星级
single.fourSpirit=_singleData.fourSpirit
single.maxLv = currJewel.LevelMax
single.maxRefineLv = currJewel.StarMax
--single.upHeroDid = herodata.dynamicId
-- single.race = currJewel.Race
single.itemConfig = itemConfig[staticId]
single.quantity = single.itemConfig.Quantity
single.name = GetLanguageStrById(itemConfig[staticId].Name)
single.frame = GetQuantityImageByquality(itemConfig[staticId].Quantity)
single.levelPool = currJewel.LevelUpPool
single.refinePool = currJewel.Star
single.equipType = currJewel.Type
local quantity = currJewel.Level
single.icon = GetResourcePath(itemConfig[staticId].ResourceID)
single.strongConfig = this.GetCurrTreasureLvConfig(currJewel.LevelUpPool, _singleData.exp)
single.refineConfig = this.GetCurrTreasureLvConfig(2, currJewel.Star, _singleData.rebuildLevel)
this.allFaXiangs[single.idDyn] = single
-- end
end
--初始化单个宝物的数据
function this.InitSingleTreasureData(_singleData,_fourTotal,_treeLevel)
if not _singleData or not _singleData.equipId then
@ -491,6 +545,14 @@ function this.GetSingleTreasureByIdDyn(_idDyn)
return this.allTreasures[_idDyn]
end
--根据动态id获取法相
function this.GetSingleFaXiangByIdDyn(_idDyn)
if not this.allFaXiangs[_idDyn] == nil then
return nil
end
return this.allFaXiangs[_idDyn]
end
--设置装备穿戴的英雄
function this.SetEquipTreasureUpHeroDid(_equipTreasureDid,_heroDid)
if this.allTreasures[_equipTreasureDid] then

View File

@ -502,7 +502,7 @@ function this.EquipInfo()
local did=curHeroData.faxiang[n]
local data = FaXiangManager.GetSingleTreasureByIdDyn(did)
if not data then
data = MonsterCampManager.GetSingleTreasureByIdDyn(did)
data = MonsterCampManager.GetSingleFaXiangByIdDyn(did)
end
if not data then
data = ExpeditionManager.GetSingleTreasureByIdDyn(did)
@ -549,7 +549,6 @@ function this.SoulPrintInfo()
value:SetActive(false)
end
end
LogError("curHeroData.soulPrintList lem=="..#curHeroData.soulPrintList)
for i,v in pairs(curHeroData.soulPrintList) do --生成预设
if not soulPrintPreList[i] then
soulPrintPreList[i]=newObjToParent(this.soulPrintPre,this.soulPrintGrid)
@ -648,7 +647,7 @@ function this.GodPrintInfo()
this.sc.transform.sizeDelta = Vector2.New(935, 1132)
return
end
LogError("#curHeroData.godPrintList lem=="..#curHeroData.godPrintList)
this.godPrintInfo.gameObject:SetActive(true)
this.backBtn.transform.localPosition = Vector2.New(432.5, 690)
this.bg.transform.sizeDelta = Vector2.New(935, 1450)

View File

@ -797,7 +797,7 @@ function ItemView:NoGetRewardShow(_reward, effectLayer, isShowAddImage)
else
local data = FaXiangManager.GetSingleTreasureByIdDyn(self.Did)
if not data then
data = MonsterCampManager.GetSingleTreasureByIdDyn(self.Did)
data = MonsterCampManager.GetSingleFaXiangByIdDyn(self.Did)
end
if not data then
data = ExpeditionManager.GetSingleTreasureByIdDyn(self.Did)