• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[TFS 1.0] BLESS Bug, Losing alot of EXP

  • Thread starter Thread starter Deleted member 141899
  • Start date Start date
D

Deleted member 141899

Guest
Hello,

hello, I have been researching and found that the system Bless both tfs 1.0 as 1.1 is bugged, losing alot of Exp when the player dies

Looking at the sources I found this function in player.cpp, but I have no idea how to reduce exp lost

someone help me?

Code:
double Player::getLostPercent() const
{
std::bitset<5> bitset(blessings);

const int32_t deathLosePercent = g_config.getNumber(ConfigManager::DEATH_LOSE_PERCENT);
if (deathLosePercent != -1) {
int32_t lossPercent = deathLosePercent;

if (isPromoted()) {
lossPercent -= 3;
}

lossPercent -= (int32_t)bitset.count();
return std::max<int32_t>(0, lossPercent) / (double)100;
} else {
double lossPercent;

if (level >= 25) {
double tmpLevel = level + (levelPercent / 100.);
lossPercent = (double)((tmpLevel + 50) * 40 * ((tmpLevel * tmpLevel) - (5 * tmpLevel) + 8)) / experience;
} else {
lossPercent = 10;
}

if (isPromoted()) {
lossPercent *= 0.7;
}

return lossPercent * pow(0.92, (int32_t)bitset.count()) / 100;
}
}
 

Similar threads

Back
Top