fix(Core/LFG): implement ERR_PARTY_LFG_BOOT_NOT_ELIGIBLE_S and lower … (#8243)

This commit is contained in:
Skjalf
2021-10-07 08:09:02 -03:00
committed by GitHub
parent 72de7a9a22
commit 78a2f73825
4 changed files with 33 additions and 11 deletions
+9 -2
View File
@@ -12127,7 +12127,7 @@ Player* Player::GetNextRandomRaidMember(float radius)
return nearMembers[randTarget];
}
PartyResult Player::CanUninviteFromGroup() const
PartyResult Player::CanUninviteFromGroup(ObjectGuid targetPlayerGUID) const
{
Group const* grp = GetGroup();
if (!grp)
@@ -12157,9 +12157,16 @@ PartyResult Player::CanUninviteFromGroup() const
if (itr->GetSource() && itr->GetSource()->IsInMap(this) && itr->GetSource()->IsInCombat())
return ERR_PARTY_LFG_BOOT_IN_COMBAT;
if (Player* target = ObjectAccessor::FindConnectedPlayer(targetPlayerGUID))
{
if (target->HasAura(lfg::LFG_SPELL_DUNGEON_COOLDOWN))
{
return ERR_PARTY_LFG_BOOT_NOT_ELIGIBLE_S;
}
}
/* Missing support for these types
return ERR_PARTY_LFG_BOOT_COOLDOWN_S;
return ERR_PARTY_LFG_BOOT_NOT_ELIGIBLE_S;
*/
}
else
+1 -1
View File
@@ -2431,7 +2431,7 @@ public:
[[nodiscard]] uint64 GetAuraUpdateMaskForRaid() const { return m_auraRaidUpdateMask; }
void SetAuraUpdateMaskForRaid(uint8 slot) { m_auraRaidUpdateMask |= (uint64(1) << slot); }
Player* GetNextRandomRaidMember(float radius);
[[nodiscard]] PartyResult CanUninviteFromGroup() const;
[[nodiscard]] PartyResult CanUninviteFromGroup(ObjectGuid targetPlayerGUID = ObjectGuid::Empty) const;
// Battleground Group System
void SetBattlegroundOrBattlefieldRaid(Group* group, int8 subgroup = -1);