From fd2f210c5bf674b383bc418536a7716fe5900f5e Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Tue, 29 Sep 2020 11:30:52 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90ID1010112=E3=80=91=E3=80=90=E9=AD=82?= =?UTF-8?q?=E5=8D=B0=E3=80=91=E5=9C=A8=E5=A4=A7=E9=97=B9=E5=A4=A9=E5=AE=AB?= =?UTF-8?q?=E4=B8=AD=E6=8B=9B=E5=8B=9F=E7=A5=9E=E5=B0=86=E5=90=8E=EF=BC=8C?= =?UTF-8?q?=E7=A5=9E=E5=B0=86=E8=BA=AB=E4=B8=8A=E7=9A=84=E9=AD=82=E5=8D=B0?= =?UTF-8?q?=E4=BC=9A=E6=98=BE=E7=A4=BA=E5=9C=A8=E7=8E=A9=E5=AE=B6=E8=A3=85?= =?UTF-8?q?=E5=A4=87=E9=AD=82=E5=8D=B0=E6=97=B6=E7=9A=84=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua | 7 +++++++ .../~Lua/Modules/SoulPrint/SoulPrintManager.lua | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua b/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua index d76eccbeb6..ac61c74d31 100644 --- a/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua @@ -556,6 +556,13 @@ function this.GetSingleHeroData(heroDId) return ExpeditionManager.GetSingleHeroData(heroDId) end end + +function this.IsHaveHero(heroDId) + if heroDatas[heroDId] then + return true + end + return false +end --获取当前升星信息 function this.GetHeroCurUpStarInfo(heroDId) local indexStar = 0 diff --git a/Assets/ManagedResources/~Lua/Modules/SoulPrint/SoulPrintManager.lua b/Assets/ManagedResources/~Lua/Modules/SoulPrint/SoulPrintManager.lua index 84c6f22cee..c9f7017db6 100644 --- a/Assets/ManagedResources/~Lua/Modules/SoulPrint/SoulPrintManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/SoulPrint/SoulPrintManager.lua @@ -793,19 +793,19 @@ function this.GetAllSoulPrint(isUpHero,heroSId,_heroDid) local Range = equipConfig[soulPrintSid].Range if Range and #Range > 0 and Range[1] > 0 then for k = 1, #Range do - if Range[k] == heroSId and heroDid ~= heroDids[i] then --这个魂印能装在这个英雄身上并且没有装在这个英雄身上 + if Range[k] == heroSId and heroDid ~= heroDids[i] and HeroManager.IsHaveHero(heroDids[i]) then --这个魂印能装在这个英雄身上并且没有装在这个英雄身上 local singleSoulPrint = {id = soulPrintSid,upHero = heroDids[i]} table.insert(allData,singleSoulPrint) end end else - if heroDid ~= heroDids[i] then --这个魂印能装在所有英雄身上并且没有装在这个英雄身上 + if heroDid ~= heroDids[i] and HeroManager.IsHaveHero(heroDids[i]) then --这个魂印能装在所有英雄身上并且没有装在这个英雄身上 local singleSoulPrint = {id = soulPrintSid,upHero = heroDids[i]} table.insert(allData,singleSoulPrint) end end else --这个魂印没有装在这个英雄身上 - if heroDid ~= heroDids[i] then + if heroDid ~= heroDids[i] and HeroManager.IsHaveHero(heroDids[i]) then local singleSoulPrint = {id = soulPrintSid,upHero = heroDids[i]} table.insert(allData,singleSoulPrint) end