minor workaround due dirty/incorrect group handling playerbots

This commit is contained in:
bash
2026-01-23 11:37:20 +01:00
parent d909d4be4e
commit b3b103b93f

View File

@@ -350,14 +350,21 @@ bool Group::AddLeaderInvite(Player* player)
void Group::RemoveInvite(Player* player)
{
if (player)
{
if (!m_invitees.empty())
m_invitees.erase(player);
player->SetGroupInvite(nullptr);
}
if (!player)
return;
// mod_playerbots: double invite hack workaround
if (player->GetGroupInvite() != this)
return;
auto itr = m_invitees.find(player);
if (itr != m_invitees.end())
m_invitees.erase(itr);
player->SetGroupInvite(nullptr);
}
void Group::RemoveAllInvites()
{
for (InvitesList::iterator itr = m_invitees.begin(); itr != m_invitees.end(); ++itr)