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

@@ -340,7 +340,11 @@ void WorldSession::HandleGroupUninviteGuidOpcode(WorldPacket& recvData)
{
if (Aura* dungeonCooldownAura = kickTarget->GetAura(lfg::LFG_SPELL_DUNGEON_COOLDOWN))
{
SendPartyResult(PARTY_OP_UNINVITE, name, res, dungeonCooldownAura->GetDuration() / 1000);
int32 elapsedTime = dungeonCooldownAura->GetMaxDuration() - dungeonCooldownAura->GetDuration();
if (static_cast<int32>(sWorld->getIntConfig(CONFIG_LFG_KICK_PREVENTION_TIMER)) > elapsedTime)
{
SendPartyResult(PARTY_OP_UNINVITE, name, res, (sWorld->getIntConfig(CONFIG_LFG_KICK_PREVENTION_TIMER) - elapsedTime) / 1000);
}
}
}
} else