• 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!

Compiling Bless Sources TFs 1.0

zetibia

Member
Joined
Jun 23, 2013
Messages
109
Reaction score
11
Staff would like to know which part of the sources I modify the amount of EXP loss. For my TFS is bugged and is losing a lot of EXP for monsters.
 
I adjusted my Player.cpp in this area:

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;
    }
}
 
Back
Top