CastorFlynn
Member
- Joined
- Aug 29, 2021
- Messages
- 88
- Reaction score
- 8
Would it be possible to include a check in the source so that, if the player has a storage 12345 = 1 he receives a reduction in the loss percentage, as it already happens if he has promotion and bless?
C++:
double Player::getLostPercent() const
{
int32_t blessingCount = std::bitset<5>(blessings).count();
double lossPercent;
if (level >= 25) {
double tmpLevel = level + (levelPercent / 100.);
lossPercent = static_cast<double>((tmpLevel + 50) * 50 * ((tmpLevel * tmpLevel) - (5 * tmpLevel) + 8)) / experience;
} else {
lossPercent = 10;
}
double percentReduction = g_config.getNumber(ConfigManager::DEATH_LOSE_PERCENT_REDUCTION);
if (isPromoted()) {
percentReduction += 30;
}
percentReduction += blessingCount * 8;
return lossPercent * (1 - (percentReduction / 100.)) / 100.;
}