mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-28 05:43:43 +01:00
Fix crash with armor enchantments
This commit is contained in:
parent
727d7be6ab
commit
8931ffb7d3
@ -43,7 +43,7 @@ function mcl_armor.damage_modifier(obj, hp_change, reason)
|
|||||||
for _, enchantment in pairs(tbl) do
|
for _, enchantment in pairs(tbl) do
|
||||||
local level = enchantments[enchantment.id]
|
local level = enchantments[enchantment.id]
|
||||||
|
|
||||||
if level > 0 then
|
if level and level > 0 then
|
||||||
enchantment_protection_factor = enchantment_protection_factor + level * enchantment.factor
|
enchantment_protection_factor = enchantment_protection_factor + level * enchantment.factor
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user