aboutsummaryrefslogtreecommitdiff
path: root/src/game/Group.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Group.cpp')
-rw-r--r--src/game/Group.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/game/Group.cpp b/src/game/Group.cpp
index e877e7acb4c..acd19e02838 100644
--- a/src/game/Group.cpp
+++ b/src/game/Group.cpp
@@ -34,7 +34,7 @@
#include "InstanceSaveMgr.h"
#include "MapInstanced.h"
#include "Util.h"
-#include "LFG.h"
+#include "LFGMgr.h"
Group::Group()
{
@@ -346,6 +346,9 @@ uint32 Group::RemoveMember(const uint64 &guid, const uint8 &method)
{
BroadcastGroupUpdate();
+ if (!isBGGroup())
+ sLFGMgr.Leave(NULL, this);
+
// remove member and change leader (if need) only if strong more 2 members _before_ member remove
if (GetMembersCount() > (isBGGroup() ? 1 : 2)) // in BG group case allow 1 members group
{
@@ -362,6 +365,7 @@ uint32 Group::RemoveMember(const uint64 &guid, const uint8 &method)
if (method == 1)
{
data.Initialize(SMSG_GROUP_UNINVITE, 0);
+ player->GetSession()->SendLfgUpdateParty(LFG_UPDATETYPE_LEADER);
player->GetSession()->SendPacket(&data);
}
@@ -434,6 +438,7 @@ void Group::Disband(bool hideDestroy)
player->SetOriginalGroup(NULL);
else
player->SetGroup(NULL);
+
player->GetSession()->SendLfgUpdateParty(LFG_UPDATETYPE_GROUP_DISBAND);
player->GetSession()->SendLfgUpdateParty(LFG_UPDATETYPE_LEADER);
}