Untitled diff

Created Diff never expires
3 removals
4 lines
5 additions
6 lines
int32_t Weapons::getMaxWeaponDamage(uint32_t level, int32_t attackSkill, int32_t attackValue, float attackFactor)
int32_t Weapons::getMaxWeaponDamage(uint32_t level, int32_t attackSkill, int32_t attackValue, float attackFactor, uint16_t passiveDamageBonus)
{
{
return static_cast<int32_t>(std::round((level / 5) + (((((attackSkill / 4.) + 1) * (attackValue / 3.)) * 1.03) / attackFactor)));
// custom edit: passive damage bonus
int32_t value = static_cast<int32_t>(std::round((level / 5) + (((((attackSkill / 4.) + 1) * (attackValue / 3.)) * 1.03) / attackFactor)));
return value + static_cast<int32_t>(std::round(value + value * passiveDamageBonus / 100));
}
}