mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +00:00
Revert "[BUG] Fix for Group Leader Disband Issue"
This reverts commit f854137ca0.
This commit is contained in:
+6
-32
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user