Merge remote-tracking branch 'origin/master' into eqstream

This commit is contained in:
KimLS
2017-02-25 15:31:40 -08:00
25 changed files with 11829 additions and 3046 deletions
+11 -7
View File
@@ -6505,6 +6505,16 @@ void Client::Handle_OP_GroupDisband(const EQApplicationPacket *app)
if (!group) //We must recheck this here.. incase the final bot disbanded the party..otherwise we crash
return;
#endif
Mob* memberToDisband = GetTarget();
if (!memberToDisband)
memberToDisband = entity_list.GetMob(gd->name2);
if (memberToDisband) {
auto group2 = memberToDisband->GetGroup();
if (group2 != group) // they're not in our group!
memberToDisband = this;
}
if (group->GroupCount() < 3)
{
@@ -6526,7 +6536,7 @@ void Client::Handle_OP_GroupDisband(const EQApplicationPacket *app)
GetMerc()->Suspend();
}
}
else if (group->IsLeader(this) && GetTarget() == this)
else if (group->IsLeader(this) && (GetTarget() == this || memberToDisband == this))
{
LeaveGroup();
if (GetMerc() && !GetMerc()->IsSuspended())
@@ -6536,12 +6546,6 @@ void Client::Handle_OP_GroupDisband(const EQApplicationPacket *app)
}
else
{
Mob* memberToDisband = nullptr;
memberToDisband = GetTarget();
if (!memberToDisband)
memberToDisband = entity_list.GetMob(gd->name2);
if (memberToDisband)
{
if (group->IsLeader(this))