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

C++ Skill Tries, little problem

Ascuas Funkeln

Rakkedo Game
Joined
Apr 14, 2013
Messages
549
Solutions
32
Reaction score
304
Location
Poland
GitHub
AscuasFunkeln
Hello, need little help with understand some c++ lines.
Code:
uint32_t Vocation::skillBase[SKILL_LAST + 1] = {50, 50, 50, 50, 30, 100, 20};

uint64_t Vocation::getReqSkillTries(uint8_t skill, uint16_t level)
{
    if (skill > SKILL_LAST) {
        return 0;
    }

    auto it = cacheSkill[skill].find(level);
    if (it != cacheSkill[skill].end()) {
        return it->second;
    }

    uint64_t tries = static_cast<uint64_t>(skillBase[skill] * std::pow(static_cast<double>(skillMultipliers[skill]), level - 11));
    cacheSkill[skill][level] = tries;
    return tries;
}
In this line
Code:
    uint64_t tries = static_cast<uint64_t>(skillBase[skill] * std::pow(static_cast<double>(skillMultipliers[skill]), level - 11));
i dont get this part
How this calculate?
Example Fist Fighting with 1,1 multiple:
tries = 50*(1,1 and im stuck...
 
Last edited:
Back
Top