Skip to content

Commit

Permalink
Fix crash on login with wrong armor in slots. Closes #1060. (#1061)
Browse files Browse the repository at this point in the history
  • Loading branch information
Doloment authored Jun 7, 2023
1 parent e81177a commit ecacb7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mods/lord/lottarmor/armor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ local function collect_armor_data(player)
for slot, stack in equipment.for_player(player):items(equipment.Kind.ARMOR) do
if stack:get_count() == 1 then
local item_groups = stack:get_definition().groups
armor_level = armor_level + item_groups["armor_" .. ARMOR_PURPOSE[slot]]
armor_level = armor_level + (item_groups["armor_" .. ARMOR_PURPOSE[slot]] or 0)
armor_wear = armor_wear + stack:get_wear()
armor_count = armor_count + 1
armor_heal = armor_heal + (item_groups["armor_heal"] or 0)
Expand Down

0 comments on commit ecacb7f

Please sign in to comment.