玉虚谭升星修改
parent
254c85f3de
commit
934d262918
|
@ -273,24 +273,15 @@ function this.UpdateHeroUpStarData(_curUpStarData)
|
||||||
end
|
end
|
||||||
--分析设置升星界面显示的英雄list数据 如果当前升星材料的坑位的英雄数据与 以其他坑位有重合并且选择上的英雄不显示 如果是当前坑位显示的英雄显示对勾
|
--分析设置升星界面显示的英雄list数据 如果当前升星材料的坑位的英雄数据与 以其他坑位有重合并且选择上的英雄不显示 如果是当前坑位显示的英雄显示对勾
|
||||||
function this.SetShowHeroListData(upStarConsumeMaterial,curHeroList,isFirstPos)--1 消耗的总消耗组 2 当前坑位可选择的所有英雄
|
function this.SetShowHeroListData(upStarConsumeMaterial,curHeroList,isFirstPos)--1 消耗的总消耗组 2 当前坑位可选择的所有英雄
|
||||||
-- local curEndShowHeroListData={}
|
|
||||||
-- for i = 1, #curHeroList do
|
|
||||||
-- if curHeroList[i].dynamicId ~= curSelectHero.dynamicId then
|
|
||||||
-- curHeroList[i].isSelect=2
|
|
||||||
-- table.insert(curEndShowHeroListData,curHeroList[i])
|
|
||||||
-- elseif isFirstPos then
|
|
||||||
-- curHeroList[i].isSelect=1
|
|
||||||
-- table.insert(curEndShowHeroListData,curHeroList[i])
|
|
||||||
-- end
|
|
||||||
-- end
|
|
||||||
local curEndShowHeroListData2={}
|
|
||||||
for i = 1, #curHeroList do
|
|
||||||
table.insert(curEndShowHeroListData2,curHeroList[i])
|
|
||||||
end
|
|
||||||
local curEndShowHeroListData={}
|
local curEndShowHeroListData={}
|
||||||
for i, v in pairs(curEndShowHeroListData2) do
|
for i = 1, #curHeroList do
|
||||||
v.isSelect=2
|
if curHeroList[i].dynamicId ~= curSelectHero.dynamicId then
|
||||||
table.insert(curEndShowHeroListData,v)
|
curHeroList[i].isSelect=2
|
||||||
|
table.insert(curEndShowHeroListData,curHeroList[i])
|
||||||
|
elseif isFirstPos then
|
||||||
|
curHeroList[i].isSelect=1
|
||||||
|
table.insert(curEndShowHeroListData,curHeroList[i])
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if isFirstPos then
|
if isFirstPos then
|
||||||
return curEndShowHeroListData
|
return curEndShowHeroListData
|
||||||
|
@ -298,32 +289,15 @@ function this.SetShowHeroListData(upStarConsumeMaterial,curHeroList,isFirstPos)-
|
||||||
for j = 1, #upStarConsumeMaterial do
|
for j = 1, #upStarConsumeMaterial do
|
||||||
if upStarConsumeMaterial[j] and #upStarConsumeMaterial[j]>0 then
|
if upStarConsumeMaterial[j] and #upStarConsumeMaterial[j]>0 then
|
||||||
for k = 1, #upStarConsumeMaterial[j] do
|
for k = 1, #upStarConsumeMaterial[j] do
|
||||||
-- if j==curSelectUpStarData[2] then--curSelectUpStarData 当前坑位选择的英雄信息
|
|
||||||
-- for _, v in pairs(curEndShowHeroListData) do
|
|
||||||
-- if v.dynamicId==upStarConsumeMaterial[j][k] then
|
|
||||||
-- v.isSelect=1
|
|
||||||
-- end
|
|
||||||
-- end
|
|
||||||
-- else
|
|
||||||
-- for i, v in pairs(curEndShowHeroListData) do
|
|
||||||
-- if v.dynamicId==upStarConsumeMaterial[j][k] then
|
|
||||||
-- curEndShowHeroListData[i] = nil
|
|
||||||
-- end
|
|
||||||
-- end
|
|
||||||
-- end
|
|
||||||
if j==curSelectUpStarData[2] then--curSelectUpStarData 当前坑位选择的英雄信息
|
if j==curSelectUpStarData[2] then--curSelectUpStarData 当前坑位选择的英雄信息
|
||||||
for _, v in pairs(curEndShowHeroListData) do
|
for _, v in pairs(curEndShowHeroListData) do
|
||||||
if v.type == RoleUpStarMatType.hero and v.dynamicId==upStarConsumeMaterial[j][k].dynamicId then
|
if v.dynamicId==upStarConsumeMaterial[j][k] then
|
||||||
v.isSelect=1
|
|
||||||
elseif v.type == RoleUpStarMatType.item and v.id==upStarConsumeMaterial[j][k].id and v.index==upStarConsumeMaterial[j][k].index then
|
|
||||||
v.isSelect=1
|
v.isSelect=1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
for i, v in pairs(curEndShowHeroListData) do
|
for i, v in pairs(curEndShowHeroListData) do
|
||||||
if v.type == RoleUpStarMatType.hero and v.dynamicId==upStarConsumeMaterial[j][k].dynamicId then
|
if v.dynamicId==upStarConsumeMaterial[j][k] then
|
||||||
curEndShowHeroListData[i] = nil
|
|
||||||
elseif v.type == RoleUpStarMatType.item and v.id==upStarConsumeMaterial[j][k].id and v.index==upStarConsumeMaterial[j][k].index then
|
|
||||||
curEndShowHeroListData[i] = nil
|
curEndShowHeroListData[i] = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -354,9 +328,7 @@ function this.AutoSelectUpStarHeroList(_curUpStarData)
|
||||||
-- curSelectUpStarGo = needHeros[i + 1]
|
-- curSelectUpStarGo = needHeros[i + 1]
|
||||||
for j = 1, LengthOfTable(upStarHeroListData) do
|
for j = 1, LengthOfTable(upStarHeroListData) do
|
||||||
if #curSelectHeroList < _curUpStarData.upStarData[i][4] then
|
if #curSelectHeroList < _curUpStarData.upStarData[i][4] then
|
||||||
-- if upStarHeroListData[j] and upStarHeroListData[j].dynamicId and upStarHeroListData[j].lockState == 0 and (curSelectHero.heroConfig and upStarHeroListData[j].dynamicId ~= curSelectHero.dynamicId) and upStarHeroListData[j].isFormation == ""
|
if upStarHeroListData[j] and upStarHeroListData[j].dynamicId and upStarHeroListData[j].lockState == 0 and (curSelectHero.heroConfig and upStarHeroListData[j].dynamicId ~= curSelectHero.dynamicId) and upStarHeroListData[j].isFormation == ""
|
||||||
if upStarHeroListData[j].type == RoleUpStarMatType.item or upStarHeroListData[j].type == RoleUpStarMatType.hero and upStarHeroListData[j].lockState == 0 and upStarHeroListData[j].isFormation == ""
|
|
||||||
|
|
||||||
and not HarmonyManager.IsChangeColor(upStarHeroListData[j].dynamicId) and not HarmonyManager:IsEnvoy(upStarHeroListData[j].dynamicId) then
|
and not HarmonyManager.IsChangeColor(upStarHeroListData[j].dynamicId) and not HarmonyManager:IsEnvoy(upStarHeroListData[j].dynamicId) then
|
||||||
table.insert(curSelectHeroList,upStarHeroListData[j])
|
table.insert(curSelectHeroList,upStarHeroListData[j])
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue