Untitled diff

Créé Le diff n'expire jamais
1 suppression
4 lignes
5 ajouts
6 lignes
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));
}
}