Skip to content

Commit

Permalink
Simplify code in Character::GetItemsBonus
Browse files Browse the repository at this point in the history
  • Loading branch information
captainurist committed Oct 10, 2023
1 parent e56071d commit d46a563
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Engine/Objects/Character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2677,11 +2677,7 @@ int Character::GetItemsBonus(CharacterAttributeType attr, bool getOnlyMainHandDm
} else if (currEquippedItem->attributeEnchantment) {
if (*currEquippedItem->attributeEnchantment == attr) {
// if (currEquippedItem->IsRegularEnchanmentForAttribute(attr))
if (attr > CHARACTER_ATTRIBUTE_RESIST_BODY &&
v5 < currEquippedItem->m_enchantmentStrength) // for skills bonuses
v5 = currEquippedItem->m_enchantmentStrength;
else // for resists and attributes bonuses
v5 += currEquippedItem->m_enchantmentStrength;
v5 += currEquippedItem->m_enchantmentStrength;
}
} else {
currEquippedItem->GetItemBonusSpecialEnchantment(this, attr, &v5, &v61);
Expand Down

0 comments on commit d46a563

Please sign in to comment.