mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 01:08:35 +00:00
fix(Core/LFG): no longer apply Luck of the Draw to premade groups (#24186)
This commit is contained in:
@@ -1628,6 +1628,7 @@ namespace lfg
|
||||
}
|
||||
|
||||
ObjectGuid oldGroupGUID;
|
||||
bool hasRandomLfgMember = proposal.group.IsEmpty();
|
||||
for (LfgGuidList::const_iterator it = players.begin(); it != players.end(); ++it)
|
||||
{
|
||||
ObjectGuid pguid = (*it);
|
||||
@@ -1644,8 +1645,16 @@ namespace lfg
|
||||
SetState(grp->GetGUID(), LFG_STATE_PROPOSAL);
|
||||
}
|
||||
|
||||
if (auto const proposalPlayer = proposal.players.find(pguid); proposalPlayer != proposal.players.end())
|
||||
{
|
||||
if (!hasRandomLfgMember && (proposalPlayer->second.group.IsEmpty() || proposalPlayer->second.group != proposal.group))
|
||||
hasRandomLfgMember = true;
|
||||
}
|
||||
else
|
||||
hasRandomLfgMember = true;
|
||||
|
||||
// Xinef: Apply Random Buff
|
||||
if (grp && !grp->IsLfgWithBuff())
|
||||
if (grp && !grp->IsLfgWithBuff() && hasRandomLfgMember)
|
||||
{
|
||||
if (!group || group->GetGUID() != oldGroupGUID)
|
||||
grp->AddLfgBuffFlag();
|
||||
|
||||
Reference in New Issue
Block a user