mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
Merge pull request #1200 from hgtw/fix/empty-expedition-invite
Verify expedition is not empty on invites
This commit is contained in:
commit
9713d62849
@ -781,12 +781,20 @@ bool Expedition::ProcessAddConflicts(Client* leader_client, Client* add_client,
|
||||
}
|
||||
}
|
||||
|
||||
// swapping ignores the max player count check since it's a 1:1 change
|
||||
if (!swapping && ExpeditionDatabase::GetMemberCount(m_id) >= m_max_players)
|
||||
// member swapping integrity is handled by invite response
|
||||
if (!swapping)
|
||||
{
|
||||
auto member_count = ExpeditionDatabase::GetMemberCount(m_id);
|
||||
if (member_count == 0)
|
||||
{
|
||||
has_conflict = true;
|
||||
}
|
||||
else if (member_count >= m_max_players)
|
||||
{
|
||||
SendLeaderMessage(leader_client, Chat::Red, DZADD_EXCEED_MAX, { fmt::format_int(m_max_players).str() });
|
||||
has_conflict = true;
|
||||
}
|
||||
}
|
||||
|
||||
auto invite_id = add_client->GetPendingExpeditionInviteID();
|
||||
if (invite_id)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user