报错修改

dev_chengFeng
jiaoyangna 2021-03-10 18:03:36 +08:00
parent 6b5b1f934e
commit 07adb69165
2 changed files with 11 additions and 5 deletions

View File

@ -637,12 +637,12 @@ function this.UpdateHeroSingleSoulPrint(heroDId, hasEquipSoulPrintId)
end
--获取单个英雄数据
function this.GetSingleHeroData(heroDId)
LogGreen("heroDId"..tostring(heroDId))
if heroDatas[heroDId] then
return heroDatas[heroDId]
elseif ExpeditionManager.GetSingleHeroData(heroDId) then
return ExpeditionManager.GetSingleHeroData(heroDId)
elseif MonsterCampManager.GetSingleHeroData(heroDId) then
LogGreen(heroDId)
return MonsterCampManager.GetSingleHeroData(heroDId)
else
return nil
@ -1655,6 +1655,7 @@ end
--_type==1 计算当前英雄的所有属性 _type==2 根据_heroDid之后_breakId传过来的值进行计算 _isAllHeroProVal==true 团体加成综合 用字段_allHeroProVal
function this.CalculateHeroAllProValList(_type, _heroDid, isWar, _breakId, _upStarId, _isAllHeroProVal, _allHeroProVal,formationHeroNum)
local curHeroData = this.GetSingleHeroData(_heroDid) or _heroDid
LogGreen("curHeroData:"..tostring(curHeroData).." curHeroData.dynamicId:"..tostring(curHeroData.dynamicId))
local curLvNum = curHeroData.lv -- heroLevelConfig[curHeroData.lv].CharacterLevelPara
--local speedNum = heroLevelConfig[curHeroData.lv].SpeedLevelPara
--if _type == 1 then

View File

@ -418,7 +418,7 @@ function this.GetFriendHelpHeros(trailType,func)
local tempdata = {}
tempdata.player = v
tempdata.hero = this.UpdateHeroDatas(v.hero)
LogGreen("好友的助战数据 v.trailType:"..v.trailType.." v.hero.id:"..v.hero.id)
LogGreen("好友的助战数据 v.trailType:"..v.trailType.." v.hero.id:"..v.hero.id .. " v.hero.dynamicId:" ..v.hero.id)
table.insert(this.friendHelpHeros[v.trailType],tempdata)
end
if func then
@ -530,9 +530,14 @@ end
--获取一个英雄信息
function this.GetSingleHeroData(did)
for k,v in pairs(this.friendHelpHero) do
if v and v.hero and v.hero.dynamicId == did then
return v.hero
if not this.friendHelpHeros then
this.friendHelpHeros = {}
end
for _,v in pairs(this.friendHelpHeros) do
for i = 1 ,#v do
if v[i] and v[i].hero and v[i].hero.dynamicId == did then
return v[i].hero
end
end
end
return nil