[DiscordArchive] Hello guys, i got a question about leveling. If I´m level 1 and my friend is lvl 80 and goes with me
[DiscordArchive] Hello guys, i got a question about leveling. If I´m level 1 and my friend is lvl 80 and goes with me
Archived author: cyberpro98 • Posted: 2024-11-23T17:23:12.933000+00:00
Original source
is this only if the player is with a higher level in group ?
Archived author: Ryan Turner • Posted: 2024-11-23T17:23:50.776000+00:00
Original source
I can be wrong but changing the divition to 0 will give you a mathmatical error
Archived author: Revision • Posted: 2024-11-23T17:24:26.378000+00:00
Original source
```cpp
if (_maxNotGrayMember && player->IsAlive() &&
_maxNotGrayMember->GetLevel() >= player->GetLevel())
xp = _isFullXP ?
uint32(xp * rate) : // Reward FULL XP if all group members are not gray.
0; // Reward only HALF of XP if some of group members are gray.
else
xp = 0;
```
or
```cpp
if (_maxNotGrayMember && player->IsAlive() &&
_maxNotGrayMember->GetLevel() >= player->GetLevel() && _isFullXP)
xp = uint32(xp * rate)
else
xp = 0;
```
Archived author: Revision • Posted: 2024-11-23T17:24:58.019000+00:00
Original source
The second one makes more sense but if you don't feel comfortable changing the entire ifelse the first one is just setting the "Reward only HALF ..." to 0
Archived author: cyberpro98 • Posted: 2024-11-23T17:29:08.431000+00:00
Original source
So would be then like this
```js
void KillRewarder::_RewardXP(Player* player, float rate)
{
uint32 xp(_xp);
if (_group)
{
// 4.2.1. If player is in group, adjust XP:
// * set to 0 if player's level is more than maximum level of not gray member;
// * cut XP in half if _isFullXP is false.
if (_maxNotGrayMember && player->IsAlive() &&
_maxNotGrayMember->GetLevel() >= player->GetLevel() && _isFullXP)
xp = uint32(xp * rate)
else
xp = 0;
}
```
Archived author: Revision • Posted: 2024-11-23T17:30:19.911000+00:00
Original source
Yeah
Archived author: cyberpro98 • Posted: 2024-11-23T17:58:57.027000+00:00
Original source
and this would inflict only group
Archived author: cyberpro98 • Posted: 2024-11-23T17:59:23.829000+00:00
Original source
like if i am a player level 10 and u are level 4 and i kill for you mobs u will get some xp or not ?
Archived author: Tunitoo0 • Posted: 2024-11-23T17:59:30.686000+00:00
Original source
what is best requarimetns for host a server? I have host with 32GB ram and 4 CPU core