zabuzo
Well-Known Member
- Joined
- Jun 10, 2016
- Messages
- 238
- Reaction score
- 54
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
Can someone helps me?
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?