Luiz Deodato
New Member
- Joined
- Jun 17, 2015
- Messages
- 4
- Reaction score
- 1
Hello people of Otland.
I need to know if someone can help me put on my source of TFS 1.2 exp shared, already have, however want to improve. I need you to stay that way, if a player is alone in the party wins the overall experience of the monster if it add one or more members in the group will gain + 50% exp.
If anyone can help me, please
here is my source party.cpp
I need to know if someone can help me put on my source of TFS 1.2 exp shared, already have, however want to improve. I need you to stay that way, if a player is alone in the party wins the overall experience of the monster if it add one or more members in the group will gain + 50% exp.
If anyone can help me, please
here is my source party.cpp
/**
void Party::shareExperience(uint64_t experience, Creature* source/* = nullptr*/)
{
uint32_t shareExperience = static_cast<uint64_t>(std::ceil(((static_cast<double>(experience) / (memberList.size() + 1)) + (static_cast<double>(experience) * extraExpRate))));
for (Player* member : memberList) {
member->onGainSharedExperience(shareExperience, source);
}
leader->onGainSharedExperience(shareExperience, source);
}
void Party::shareExperience(uint64_t experience, Creature* source/* = nullptr*/)
{
uint32_t shareExperience = static_cast<uint64_t>(std::ceil(((static_cast<double>(experience) / (memberList.size() + 1)) + (static_cast<double>(experience) * extraExpRate))));
for (Player* member : memberList) {
member->onGainSharedExperience(shareExperience, source);
}
leader->onGainSharedExperience(shareExperience, source);
}