feat(Core/LFG): move the LFG max kick count & kick prevention timers … (#8683)

This commit is contained in:
Skjalf
2021-10-25 05:17:12 -03:00
committed by GitHub
parent d72b741fbf
commit fffdb31c05
7 changed files with 47 additions and 12 deletions

View File

@@ -12183,9 +12183,13 @@ PartyResult Player::CanUninviteFromGroup(ObjectGuid targetPlayerGUID) const
if (Player* target = ObjectAccessor::FindConnectedPlayer(targetPlayerGUID))
{
if (target->HasAura(lfg::LFG_SPELL_DUNGEON_COOLDOWN))
if (Aura* dungeonCooldownAura = target->GetAura(lfg::LFG_SPELL_DUNGEON_COOLDOWN))
{
return ERR_PARTY_LFG_BOOT_NOT_ELIGIBLE_S;
int32 elapsedTime = dungeonCooldownAura->GetMaxDuration() - dungeonCooldownAura->GetDuration();
if (static_cast<int32>(sWorld->getIntConfig(CONFIG_LFG_KICK_PREVENTION_TIMER)) > elapsedTime)
{
return ERR_PARTY_LFG_BOOT_NOT_ELIGIBLE_S;
}
}
}