From 377c5696358d72a3056700c4e1e903f148553d36 Mon Sep 17 00:00:00 2001 From: Uleat Date: Sat, 24 Aug 2019 21:54:46 -0400 Subject: [PATCH] Fix for clients not dropping group after camping bots --- zone/bot.cpp | 6 +++++- zone/client_packet.cpp | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/zone/bot.cpp b/zone/bot.cpp index 9cce41c2f..ff6ee42d1 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -7465,9 +7465,13 @@ void Bot::DoEnduranceUpkeep() { void Bot::Camp(bool databaseSave) { Sit(); - if(IsGrouped()) + auto group = GetGroup(); + if(group) RemoveBotFromGroup(this, GetGroup()); + if (group->GroupCount() < 2) + group->DisbandGroup(); + LeaveHealRotationMemberPool(); if(databaseSave) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 38e7aaff4..ccb4ee96a 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -3952,6 +3952,9 @@ void Client::Handle_OP_Camp(const EQApplicationPacket *app) #ifdef BOTS // This block is necessary to clean up any bot objects owned by a Client Bot::BotOrderCampAll(this); + auto group = GetGroup(); + if (group && group->GroupCount() < 2) + group->DisbandGroup(); #endif if (IsLFP()) worldserver.StopLFP(CharacterID());