特训判断
parent
4f8f3955ce
commit
fee668a4d8
|
@ -5018,7 +5018,7 @@ function this.CheckTrainingCanLevelUp(heroData,trainingData)
|
||||||
end
|
end
|
||||||
local lock=false
|
local lock=false
|
||||||
local OtherCondition=trainingData.OtherCondition
|
local OtherCondition=trainingData.OtherCondition
|
||||||
local conditioncheckCount=0
|
local conditioncheckCount={}
|
||||||
if heroData.star>=trainingData.MyselfCondition then
|
if heroData.star>=trainingData.MyselfCondition then
|
||||||
lock=true
|
lock=true
|
||||||
end
|
end
|
||||||
|
@ -5029,11 +5029,17 @@ function this.CheckTrainingCanLevelUp(heroData,trainingData)
|
||||||
local t=OtherCondition[i]
|
local t=OtherCondition[i]
|
||||||
for j=1,#this.heroDataLists do
|
for j=1,#this.heroDataLists do
|
||||||
if this.heroDataLists[j].id==t[1] and this.heroDataLists[j].HeroTraining.trainingLv>=t[2] and #this.heroDataLists[j].HeroTraining.unlockIds >=t[3] then
|
if this.heroDataLists[j].id==t[1] and this.heroDataLists[j].HeroTraining.trainingLv>=t[2] and #this.heroDataLists[j].HeroTraining.unlockIds >=t[3] then
|
||||||
conditioncheckCount=conditioncheckCount+1
|
if not conditioncheckCount[this.heroDataLists[j].id] then
|
||||||
|
conditioncheckCount[this.heroDataLists[j].id]=1
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if conditioncheckCount==#OtherCondition then
|
local count=0
|
||||||
|
for k, v in pairs(conditioncheckCount) do
|
||||||
|
count=count+1
|
||||||
|
end
|
||||||
|
if count>=#OtherCondition then
|
||||||
lock=true
|
lock=true
|
||||||
else
|
else
|
||||||
lock=false
|
lock=false
|
||||||
|
|
Loading…
Reference in New Issue