mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-07 21:32:26 +00:00
Verify expedition is not empty on invites
Fixes an edge case where a member could accept a pending invite into an empty expedition before world could invalidate it
This commit is contained in:
parent
b74edd9dc2
commit
62e480fed7
@ -781,11 +781,19 @@ bool Expedition::ProcessAddConflicts(Client* leader_client, Client* add_client,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// swapping ignores the max player count check since it's a 1:1 change
|
// member swapping integrity is handled by invite response
|
||||||
if (!swapping && ExpeditionDatabase::GetMemberCount(m_id) >= m_max_players)
|
if (!swapping)
|
||||||
{
|
{
|
||||||
SendLeaderMessage(leader_client, Chat::Red, DZADD_EXCEED_MAX, { fmt::format_int(m_max_players).str() });
|
auto member_count = ExpeditionDatabase::GetMemberCount(m_id);
|
||||||
has_conflict = true;
|
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();
|
auto invite_id = add_client->GetPendingExpeditionInviteID();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user