[DiscordArchive] Hello. I am trying to run the authserver for the first time to populate the database, but it's tryin
[DiscordArchive] Hello. I am trying to run the authserver for the first time to populate the database, but it's tryin
Archived author: Chimba • Posted: 2024-03-29T18:42:25.050000+00:00
Original source
Hello. I am trying to run the authserver for the first time to populate the database, but it's trying to use some directory that never existed and I don't recall adding it anywhere. Is there a way to edit/fix this?
Archived author: Rymercyble • Posted: 2024-03-29T18:44:32.275000+00:00
Original source
show that path
Archived author: Chimba • Posted: 2024-03-29T18:46:13.870000+00:00
Original source
C:/Users/me/Desktop/ACore-build/azerothcore-wotlk/data/sql/base/db_auth/
Archived author: Chimba • Posted: 2024-03-29T19:06:51.063000+00:00
Original source
Okay I am an idiot, I renamed the libraries folder so the auth couldn't access it
Archived author: BreakingBeaker • Posted: 2024-03-29T19:45:14.703000+00:00
Original source
Hello all! I'm working on a module that's a fork of mod-dynamic-xp. The idea is to increase the dynamic XP when people are in a group. I'm hosting the server for a small group and we just want to make sure that if someone stays on after everyone that they don't get to far ahead or that it'll be easier for everyone else to catch up. Unfortunately, I'm having an issue with a section of the code that sets the dynamic XP rate based either on the lowest or highest player's level in the group.
I wanted to create a for-loop that iterates through each Player in Group but I can't see any sort of GetMembers() / GetAllMembers() function in the docs. Is there a class other than Group I should be using?
TL;DR looking for a way to iterate through all Players in a Group
Relevant Code:
```
void OnGiveXP(Player* player, uint32& amount, Unit* /*victim*/, uint8 /*xpSource*/){
uint32 level = player->GetLevel();
Group* group = player->GetGroup();
if(group != nullptr){
//Incentivize group play over solo leveling
if(sConfigMgr->GetOption<bool>("Dynamic.XP.Group", true)){
uint32 partySize = group->GetMembersCount();
amount *= partySize * 2;
}
//Keep level gaps of group standard
uint32 groupScale = sConfigMgr->GetOption<uint32>("Dynamic.XP.Group.Scale", 1);
if(groupScale == 1){
//Set group level scaling to the LOWEST LEVELLED PLAYER
for (auto member : group->GetMembers()) {
if (member->IsPlayer() && member->GetLevel() < level) {
level = member->GetLevel();
}
}
}else if(groupScale == 2){
//Set group level scaling to the HIGHEST LEVELLED PLAYER
for (auto member : group->GetMembers()) {
if (member->IsPlayer() && member->GetLevel() > level) {
level = member->GetLevel();
}
}
}
...
```
Error during docker compose build:
```fatal error: no member named 'GetMembers' in 'Group'
52.40 for (auto member : group->GetMembers()) {
52.40 ~~~~~ ^
52.40 1 error generated.```
First time in the Discord not sure if this goes for support or <#353919176714354698> or if I was supposed to post it to SO, let me know so I know for next time
layerList const &player_list = player->GetMap()->GetPlayers();Archived author: Rymercyble • Posted: 2024-03-29T19:47:09.561000+00:00
Original source
```cpp
Map:
layerList const &player_list = player->GetMap()->GetPlayers();
```
Archived author: Honey • Posted: 2024-03-29T19:48:31.743000+00:00
Original source
That's all players in a map. The question was about all members of a party/raid.
Archived author: Rymercyble • Posted: 2024-03-29T19:48:50.391000+00:00
Original source
oh well
Archived author: Revision • Posted: 2024-03-29T19:50:29.536000+00:00
Original source
One alternative is this:
```cpp
for (GroupReference* groupRef = group->GetFirstMember(); groupRef != nullptr; groupRef = groupRef->next())
{
if (Player* member = groupRef->GetSource())
{
// Code goes here, obviously
}
}
```
Archived author: Honey • Posted: 2024-03-29T19:50:36.218000+00:00
Original source
But as you already guessed, <#353919176714354698> is a better place for custom things.