initialize actives table for all players better

This commit is contained in:
Buurazu authored and GitHub committed 2024-07-30 07:01:34 -04:00
1 parent a0151bb472
commit 1a00ec8582
1 file changed
+4 -6
+4 -6
View File
@@ -1621,12 +1621,10 @@ local function AddActiveItemProgress(player, isD4)
local maxSlot = 3 local maxSlot = 3
if isD4 then maxSlot = 1 end if isD4 then maxSlot = 1 end
for i = 0, maxSlot do for i = 0, maxSlot do
local itemID = tostring(player:GetActiveItem(i)) local itemIDStr = tostring(player:GetActiveItem(i))
if itemID ~= "0" then if itemIDStr ~= "0" then
if not activesTable[itemID] then EID:InitActiveItemInteraction(itemIDStr)
activesTable[itemID] = 0 activesTable[itemIDStr] = activesTable[itemIDStr] + 1
end
activesTable[itemID] = activesTable[itemID] + 1
end end
end end
end end