如果宝物被分解了,重复穿戴检测会报错

dev_chengFeng
gaoxin 2020-10-10 10:34:56 +08:00 committed by JieLing
parent b95a75310c
commit 77b3855221
1 changed files with 2 additions and 4 deletions

View File

@ -3081,8 +3081,6 @@ function this.CheckRepeatTreasure(func)
this._WearCount[jId] = 0
end
this._WearCount[jId] = this._WearCount[jId] + 1
LogRed(jId.."|"..this._WearCount[jId])
-- 判断最终穿戴的人(根据战斗力判断)
if not this._TreasureToTarget[jId] then
this._TreasureToTarget[jId] = {id = heroData.dynamicId, power = heroData.warPower}
@ -3116,8 +3114,8 @@ function this.UnloadRepeatTreasure(func)
local heroData = this.heroDataLists[this._CheckIndex]
if heroData and heroData.jewels and #heroData.jewels > 0 then
for _, jId in ipairs(heroData.jewels) do
if this._WearCount[jId] > 1 -- 重复
or this._NoTreasure[jId] == 1 then -- 没有这件装备
if this._NoTreasure[jId] == 1 -- 没有这件装备
or this._WearCount[jId] > 1 then-- 重复
table.insert(unloadList, jId)
end
end