Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] Hello, I'm new around AzerothCore project. Is there any reason why AzerothCore doesn't have .clang-f

[DiscordArchive] Hello, I'm new around AzerothCore project. Is there any reason why AzerothCore doesn't have .clang-f

[DiscordArchive] Hello, I'm new around AzerothCore project. Is there any reason why AzerothCore doesn't have .clang-f

rektbyfaith
Administrator
0
11-24-2024, 06:52 PM
#1
Archived author: Gualtiero • Posted: 2024-11-24T18:52:47.897000+00:00
Original source

Hello, I'm new around AzerothCore project. Is there any reason why AzerothCore doesn't have .clang-format?
rektbyfaith
11-24-2024, 06:52 PM #1

Archived author: Gualtiero • Posted: 2024-11-24T18:52:47.897000+00:00
Original source

Hello, I'm new around AzerothCore project. Is there any reason why AzerothCore doesn't have .clang-format?

rektbyfaith
Administrator
0
11-24-2024, 08:03 PM
#2
Archived author: cyberpro98 • Posted: 2024-11-24T20:03:30.307000+00:00
Original source

Excuse me for disturb and ping. Do you think this could fix the problem with that xp giving in the group ?
```js
void KillRewarder::_RewardXP(Player* player, float rate)
{
uint32 xp(_xp);
if (_group)
{
// 4.2.1. Adjust XP for group conditions:
if (_maxNotGrayMember && player->IsAlive())
{
// Fetch the level difference between the highest and smallest members
uint32 highestLevel = _maxNotGrayMember->GetLevel();
uint32 smallestLevel = _minNotGrayMember ? _minNotGrayMember->GetLevel() : player->GetLevel(); // Assuming _minNotGrayMember is properly set

// Check if the player is eligible for XP
if (highestLevel >= player->GetLevel())
{
// If the level difference is significant, reduce XP for the smallest-level player
if (highestLevel - smallestLevel > LEVEL_DIFFERENCE_THRESHOLD) // Replace with an appropriate threshold value
{
if (player->GetLevel() == smallestLevel) // Apply the reduction to the smallest-level player
xp = uint32(xp * rate * 0.75f); // Smallest player gets 75% XP
else
xp = _isFullXP ? // Reward FULL XP for others
uint32(xp * rate) :
uint32(xp * rate * 0.5f); // Reward HALF XP if some members are gray
}
else
{
xp = _isFullXP ?
uint32(xp * rate) : // Reward FULL XP if all group members are not gray
uint32(xp * rate * 0.5f); // Reward HALF XP otherwise
}
}
else
{
xp = 0; // No XP if the player is not eligible
}
}
else
{
xp = 0; // No XP if conditions are not met
}
}

// Reward XP to the player
if (xp > 0)
player->GiveXP(xp, nullptr, false);
}
```
rektbyfaith
11-24-2024, 08:03 PM #2

Archived author: cyberpro98 • Posted: 2024-11-24T20:03:30.307000+00:00
Original source

Excuse me for disturb and ping. Do you think this could fix the problem with that xp giving in the group ?
```js
void KillRewarder::_RewardXP(Player* player, float rate)
{
uint32 xp(_xp);
if (_group)
{
// 4.2.1. Adjust XP for group conditions:
if (_maxNotGrayMember && player->IsAlive())
{
// Fetch the level difference between the highest and smallest members
uint32 highestLevel = _maxNotGrayMember->GetLevel();
uint32 smallestLevel = _minNotGrayMember ? _minNotGrayMember->GetLevel() : player->GetLevel(); // Assuming _minNotGrayMember is properly set

// Check if the player is eligible for XP
if (highestLevel >= player->GetLevel())
{
// If the level difference is significant, reduce XP for the smallest-level player
if (highestLevel - smallestLevel > LEVEL_DIFFERENCE_THRESHOLD) // Replace with an appropriate threshold value
{
if (player->GetLevel() == smallestLevel) // Apply the reduction to the smallest-level player
xp = uint32(xp * rate * 0.75f); // Smallest player gets 75% XP
else
xp = _isFullXP ? // Reward FULL XP for others
uint32(xp * rate) :
uint32(xp * rate * 0.5f); // Reward HALF XP if some members are gray
}
else
{
xp = _isFullXP ?
uint32(xp * rate) : // Reward FULL XP if all group members are not gray
uint32(xp * rate * 0.5f); // Reward HALF XP otherwise
}
}
else
{
xp = 0; // No XP if the player is not eligible
}
}
else
{
xp = 0; // No XP if conditions are not met
}
}

// Reward XP to the player
if (xp > 0)
player->GiveXP(xp, nullptr, false);
}
```

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)