Skip to content

Commit

Permalink
Bugfix: Items over 255 durability
Browse files Browse the repository at this point in the history
  • Loading branch information
kphoenix137 committed Feb 10, 2023
1 parent 8955700 commit eddb5e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/items.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ int SaveItemPower(const Player &player, Item &item, ItemPower &power)
RedrawComponent(PanelDrawComponent::Mana);
break;
case IPL_DUR: {
int bonus = r * item._iMaxDur / 100;
int bonus = clamp(r * item._iMaxDur / 100, 0, DUR_INDESTRUCTIBLE - item._iMaxDur);
item._iMaxDur += bonus;
item._iDurability += bonus;
} break;
Expand Down

0 comments on commit eddb5e7

Please sign in to comment.