Skip to content

Commit

Permalink
Merge pull request #6222 from jmcmorris/mob_party_clear
Browse files Browse the repository at this point in the history
Clear the mob's party when removing a party member
  • Loading branch information
claywar authored Sep 7, 2024
2 parents d79a273 + fe8d0bf commit b77fe93
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/map/party.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -370,7 +369,9 @@ void CParty::RemoveMember(CBattleEntity* PEntity)
PChar->PTreasurePool->UpdatePool(PChar);
}
}

members.erase(memberToDelete);
PEntity->PParty = nullptr;
}
}
}
Expand Down

0 comments on commit b77fe93

Please sign in to comment.