Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] did u try without specifying clang 14 ?

[DiscordArchive] did u try without specifying clang 14 ?

[DiscordArchive] did u try without specifying clang 14 ?

Pages (4): Previous 1 2 3 4
rektbyfaith
Administrator
0
04-15-2024, 10:04 PM
#31
Archived author: Archer • Posted: 2024-04-15T22:04:08.102000+00:00
Original source

Hi. I was wondering if anyone could help me out with a script that would do a precheck of a group to ensure that everyone is the same faction before allowed into a BG Queue? I have tired a few things but nothing seems to work.
rektbyfaith
04-15-2024, 10:04 PM #31

Archived author: Archer • Posted: 2024-04-15T22:04:08.102000+00:00
Original source

Hi. I was wondering if anyone could help me out with a script that would do a precheck of a group to ensure that everyone is the same faction before allowed into a BG Queue? I have tired a few things but nothing seems to work.

rektbyfaith
Administrator
0
04-15-2024, 10:08 PM
#32
Archived author: Anchy • Posted: 2024-04-15T22:08:35.787000+00:00
Original source

are you using Eluna
rektbyfaith
04-15-2024, 10:08 PM #32

Archived author: Anchy • Posted: 2024-04-15T22:08:35.787000+00:00
Original source

are you using Eluna

rektbyfaith
Administrator
0
04-15-2024, 10:12 PM
#33
Archived author: Archer • Posted: 2024-04-15T22:12:32.795000+00:00
Original source

I am.
rektbyfaith
04-15-2024, 10:12 PM #33

Archived author: Archer • Posted: 2024-04-15T22:12:32.795000+00:00
Original source

I am.

rektbyfaith
Administrator
0
04-15-2024, 10:14 PM
#34
Archived author: Anchy • Posted: 2024-04-15T22:14:12.022000+00:00
Original source

actually, I am looking at the Eluna docs and I do not see the `CanJoinInBattlegroundQueue` hook/event implemented so you would need to write a module
rektbyfaith
04-15-2024, 10:14 PM #34

Archived author: Anchy • Posted: 2024-04-15T22:14:12.022000+00:00
Original source

actually, I am looking at the Eluna docs and I do not see the `CanJoinInBattlegroundQueue` hook/event implemented so you would need to write a module

rektbyfaith
Administrator
0
04-15-2024, 10:15 PM
#35
Archived author: Anchy • Posted: 2024-04-15T22:15:09.209000+00:00
Original source

otherwise you can submit a PR to the mod-eluna fork of Eluna to get the hook implemented
rektbyfaith
04-15-2024, 10:15 PM #35

Archived author: Anchy • Posted: 2024-04-15T22:15:09.209000+00:00
Original source

otherwise you can submit a PR to the mod-eluna fork of Eluna to get the hook implemented

rektbyfaith
Administrator
0
04-15-2024, 10:26 PM
#36
Archived author: Anchy • Posted: 2024-04-15T22:26:27.384000+00:00
Original source

```cpp
bool CanJoinInBattlegroundQueue(Player* player, ObjectGuid /*BattlemasterGuid*/, BattlegroundTypeId /*BGTypeID*/, uint8 joinAsGroup, GroupJoinBattlegroundResult& err)
{
if (!joinAsGroup || !player)
{
return true;
}

auto group = player->GetGroup();
if (!group)
{
return true;
}

bool sameFaction = true;
uint32 leaderFaction = player->GetFaction();

for (GroupReference* itr = group->GetFirstMember(); itr != nullptr; itr = itr->next())
{
Player* member = itr->GetSource();
if (!member)
{
continue;
}

if (member->GetFaction() != leaderFaction)
{
sameFaction = false;
}
}

if (!sameFaction)
{
err = GroupJoinBattlegroundResult::ERR_BATTLEGROUND_JOIN_FAILED;
}

return sameFaction;
}```
rektbyfaith
04-15-2024, 10:26 PM #36

Archived author: Anchy • Posted: 2024-04-15T22:26:27.384000+00:00
Original source

```cpp
bool CanJoinInBattlegroundQueue(Player* player, ObjectGuid /*BattlemasterGuid*/, BattlegroundTypeId /*BGTypeID*/, uint8 joinAsGroup, GroupJoinBattlegroundResult& err)
{
if (!joinAsGroup || !player)
{
return true;
}

auto group = player->GetGroup();
if (!group)
{
return true;
}

bool sameFaction = true;
uint32 leaderFaction = player->GetFaction();

for (GroupReference* itr = group->GetFirstMember(); itr != nullptr; itr = itr->next())
{
Player* member = itr->GetSource();
if (!member)
{
continue;
}

if (member->GetFaction() != leaderFaction)
{
sameFaction = false;
}
}

if (!sameFaction)
{
err = GroupJoinBattlegroundResult::ERR_BATTLEGROUND_JOIN_FAILED;
}

return sameFaction;
}```

rektbyfaith
Administrator
0
04-15-2024, 10:26 PM
#37
Archived author: Anchy • Posted: 2024-04-15T22:26:30.352000+00:00
Original source

something like this might work
rektbyfaith
04-15-2024, 10:26 PM #37

Archived author: Anchy • Posted: 2024-04-15T22:26:30.352000+00:00
Original source

something like this might work

rektbyfaith
Administrator
0
04-15-2024, 10:26 PM
#38
Archived author: Anchy • Posted: 2024-04-15T22:26:45.989000+00:00
Original source

i havent tested it
rektbyfaith
04-15-2024, 10:26 PM #38

Archived author: Anchy • Posted: 2024-04-15T22:26:45.989000+00:00
Original source

i havent tested it

rektbyfaith
Administrator
0
04-15-2024, 10:27 PM
#39
Archived author: Anchy • Posted: 2024-04-15T22:27:23.984000+00:00
Original source

it might be a good idea to send the leader a system message as well telling them why the join failed
rektbyfaith
04-15-2024, 10:27 PM #39

Archived author: Anchy • Posted: 2024-04-15T22:27:23.984000+00:00
Original source

it might be a good idea to send the leader a system message as well telling them why the join failed

rektbyfaith
Administrator
0
04-15-2024, 10:35 PM
#40
Archived author: Archer • Posted: 2024-04-15T22:35:27.031000+00:00
Original source

I'll give it a shot. I will let you know! Thanks!
rektbyfaith
04-15-2024, 10:35 PM #40

Archived author: Archer • Posted: 2024-04-15T22:35:27.031000+00:00
Original source

I'll give it a shot. I will let you know! Thanks!

Pages (4): Previous 1 2 3 4
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)