TFS 0.X change some things in bonus party share exp x4

zabuzo

Active Member
Joined
Jun 10, 2016
Messages
159
Best answers
0
Reaction score
26
I found here on forum the famous party x4 bonus EXP to 8.60

When u have the 4 vocations (knight,paladin,sorcerer,druid) u have 200% exp bonus (+50% for each vocation)

But i'm trying to make a custom project, with new vocations

0 no vocation (soul)
1 human, 2 vampire, 3 werewolf
4,5,6,7 humans subclasses
8,9,10 vampires subclasses
11,12,13,14,15,16,17 vampires subclasses

I would like to change to instead of each new vocation add more 50%
Add more 50% each base vocation, i mean, if have 1 human, 1 vampire, 1 werewolf (doesn't matter if it is vocation 1,2,3,4,5,6...)

And after have one of each race (the 150% bonus), add more 10% to each different vocation

I mean if there is a voc4(human), voc2(vampire), voc13(werewolf), it add 150% exp bonus
after this it only count the new different vocations, and instead add 50%, add 10%

The part i have to edit is in player.cpp, but idk how to edit
Code:
uint32_t Player::getBaseVoc() {
    uint32_t curVoc = vocationId;
    Vocation* voc = Vocations::getInstance()->getVocation(curVoc);
    while(voc->getFromVocation() != curVoc) {
        curVoc = voc->getFromVocation();
        voc = Vocations::getInstance()->getVocation(curVoc);
    }
    return curVoc;
}
double Player::getPartyBonus() {
    double bonus = 1;
    bool vocations[] = {false, false, false, false, false, false, false, false};
    if(Party* party = this->getParty()) {
        if(party->isSharedExperienceEnabled() && party->isSharedExperienceActive()) {
            PlayerVector list = party->getMembers();
            list.push_back(party->getLeader());
            for(PlayerVector::const_iterator it = list.begin(); it != list.end(); ++it) {
                uint32_t vocId = (*it)->getBaseVoc();
                if(!vocations[vocId]) {
                    vocations[vocId] = true;
                    bonus += 0.50;
                }
            }
        }
    }
    return bonus;
}
Can someone helps me?
 
OP
zabuzo

zabuzo

Active Member
Joined
Jun 10, 2016
Messages
159
Best answers
0
Reaction score
26
The base i was talking about is that:
Code:
            local voc = getPlayerVocation(pid)
            if voc == 1 or voc == 4 or voc == 5 or voc == 6 or voc == 7 then
                HUMAN = true
            elseif voc == 2 or voc == 8 or voc == 9 or voc == 10 then
                VAMPIRE = true
            elseif voc == 3 or voc == 11 or voc == 12 or voc == 13 or voc == 14 or voc == 15 or voc == 16 or voc == 17 then
                WEREWOLF = true
            end
after have one human,werewolf,vampire (150% bonus)
add more 10% to each different vocation
 
Top