Revert "[BUG] Fix for Group Leader Disband Issue"

This reverts commit f854137ca0.
This commit is contained in:
Akkadius
2021-02-12 02:05:20 -06:00
parent 507bbe83f3
commit 6e765e7ddc
8 changed files with 59 additions and 147 deletions
+6 -32
View File
@@ -4250,7 +4250,7 @@ void EntityList::ForceGroupUpdate(uint32 gid)
}
}
void EntityList::SendGroupLeave(uint32 gid, const char *name, bool checkleader)
void EntityList::SendGroupLeave(uint32 gid, const char *name)
{
auto it = client_list.begin();
while (it != client_list.end()) {
@@ -4266,39 +4266,13 @@ void EntityList::SendGroupLeave(uint32 gid, const char *name, bool checkleader)
gj->action = groupActLeave;
strcpy(gj->yourname, c->GetName());
Mob *Leader = g->GetLeader();
if (Leader) {
if (Leader)
Leader->CastToClient()->GetGroupAAs(&gj->leader_aas);
}
c->QueuePacket(outapp);
safe_delete(outapp);
g->DelMemberOOZ(name, checkleader);
if (g->IsLeader(c) && c->IsLFP()) {
g->DelMemberOOZ(name);
if (g->IsLeader(c) && c->IsLFP())
c->UpdateLFP();
}
}
}
}
++it;
}
}
void EntityList::SendGroupLeader(uint32 gid, const char *lname, const char *oldlname)
{
auto it = client_list.begin();
while (it != client_list.end()) {
if (it->second){
Group *g = nullptr;
g = it->second->GetGroup();
if (g) {
if (g->GetID() == gid) {
EQApplicationPacket* outapp = new EQApplicationPacket(OP_GroupUpdate,sizeof(GroupJoin_Struct));
GroupJoin_Struct* gj = (GroupJoin_Struct*) outapp->pBuffer;
gj->action = groupActMakeLeader;
strcpy(gj->membername, lname);
strcpy(gj->yourname, oldlname);
it->second->QueuePacket(outapp);
Log(Logs::Detail, Logs::Group, "SendGroupLeader(): Entity loop leader update packet sent to: %s .", it->second->GetName());
safe_delete(outapp);
}
}
}
@@ -4321,9 +4295,9 @@ void EntityList::SendGroupJoin(uint32 gid, const char *name)
gj->action = groupActJoin;
strcpy(gj->yourname, it->second->GetName());
Mob *Leader = g->GetLeader();
if (Leader) {
if (Leader)
Leader->CastToClient()->GetGroupAAs(&gj->leader_aas);
}
it->second->QueuePacket(outapp);
safe_delete(outapp);
}