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;
|
ObjectGuid oldGroupGUID;
|
||||||
|
bool hasRandomLfgMember = proposal.group.IsEmpty();
|
||||||
for (LfgGuidList::const_iterator it = players.begin(); it != players.end(); ++it)
|
for (LfgGuidList::const_iterator it = players.begin(); it != players.end(); ++it)
|
||||||
{
|
{
|
||||||
ObjectGuid pguid = (*it);
|
ObjectGuid pguid = (*it);
|
||||||
@@ -1644,8 +1645,16 @@ namespace lfg
|
|||||||
SetState(grp->GetGUID(), LFG_STATE_PROPOSAL);
|
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
|
// Xinef: Apply Random Buff
|
||||||
if (grp && !grp->IsLfgWithBuff())
|
if (grp && !grp->IsLfgWithBuff() && hasRandomLfgMember)
|
||||||
{
|
{
|
||||||
if (!group || group->GetGUID() != oldGroupGUID)
|
if (!group || group->GetGUID() != oldGroupGUID)
|
||||||
grp->AddLfgBuffFlag();
|
grp->AddLfgBuffFlag();
|
||||||
|
|||||||
Reference in New Issue
Block a user