Merge pull request #158 from hermensbas/fix/minor_crash_fixes
Workaround and minor core safety check
This commit is contained in:
@@ -350,13 +350,20 @@ bool Group::AddLeaderInvite(Player* player)
|
|||||||
|
|
||||||
void Group::RemoveInvite(Player* player)
|
void Group::RemoveInvite(Player* player)
|
||||||
{
|
{
|
||||||
if (player)
|
if (!player)
|
||||||
{
|
return;
|
||||||
if (!m_invitees.empty())
|
|
||||||
m_invitees.erase(player);
|
// 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);
|
player->SetGroupInvite(nullptr);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void Group::RemoveAllInvites()
|
void Group::RemoveAllInvites()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user