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