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

Party shared Distro OTX version.3.8 protocol 10.98

jonataxz

New Member
Joined
Apr 14, 2019
Messages
11
Reaction score
0
I have custom vocations on my server, I'm having a problem with shared.
how can i change this piece of code to instead of just taking the previous vocation it search for the base vocation?

party.cpp

Lua:
void Party::updateVocationsList()
{
    std::set<uint32_t> vocationIds;
    uint32_t vocationId = leader->getVocation()->getFromVocation();
    if (vocationId != VOCATION_NONE) {
        vocationIds.insert(vocationId);
    }
    for (const Player* member : memberList) {
        vocationId = member->getVocation()->getFromVocation();
        if (vocationId != VOCATION_NONE) {
            vocationIds.insert(vocationId);
        }
    }
    size_t size = vocationIds.size();
    if (size > 1) {
        extraExpRate = static_cast<float>(size * (10 + (size - 1) * 5)) / 100.f;
    } else {
        extraExpRate = 0.20f;
    }
}
 
Back
Top