From fe8d0bf28c3c0dc2599e70c5ed07b39e80a9a63f Mon Sep 17 00:00:00 2001 From: Jasson McMorris Date: Fri, 6 Sep 2024 19:39:57 -0700 Subject: [PATCH] Clear the mob's party when removing a party member --- src/map/party.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/map/party.cpp b/src/map/party.cpp index ebcde3ac283..2e1a2c468f9 100644 --- a/src/map/party.cpp +++ b/src/map/party.cpp @@ -346,7 +346,6 @@ void CParty::RemoveMember(CBattleEntity* PEntity) PChar->pushPacket(new CPartyDefinePacket(nullptr)); PChar->pushPacket(new CPartyMemberUpdatePacket(PChar, 0, 0, PChar->getZone())); PChar->pushPacket(new CCharUpdatePacket(PChar)); - PChar->PParty = nullptr; _sql->Query("DELETE FROM accounts_parties WHERE charid = %u", PChar->id); @@ -370,7 +369,9 @@ void CParty::RemoveMember(CBattleEntity* PEntity) PChar->PTreasurePool->UpdatePool(PChar); } } + members.erase(memberToDelete); + PEntity->PParty = nullptr; } } }