diff --git a/zone/client.cpp b/zone/client.cpp index 16157c807..717b1afdb 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -7578,7 +7578,27 @@ void Client::JoinGroupXTargets(Group *g) if (!g) return; + // test code for merge crashes - hopefully gcc won't optimize these out... + auto c1 = GetXTargetAutoMgr()->get_list().empty(); + auto c2 = GetXTargetAutoMgr()->get_list().size(); + auto c3 = GetXTargetAutoMgr()->get_list().begin(); + auto c4 = GetXTargetAutoMgr()->get_list().end(); + auto c5 = GetXTargetAutoMgr()->get_list().rbegin(); + auto c6 = GetXTargetAutoMgr()->get_list().rend(); + + auto g1 = g->GetXTargetAutoMgr()->get_list().empty(); + auto g2 = g->GetXTargetAutoMgr()->get_list().size(); + auto g3 = g->GetXTargetAutoMgr()->get_list().begin(); + auto g4 = g->GetXTargetAutoMgr()->get_list().end(); + auto g5 = g->GetXTargetAutoMgr()->get_list().rbegin(); + auto g6 = g->GetXTargetAutoMgr()->get_list().rend(); + if (!GetXTargetAutoMgr()->empty()) { + Log(Logs::Detail, Logs::Error, "XTarget Merge[clt] empty=%s, size=%u, begin=0x%X, end=0x%X, rbegin=0x%X, rend=0x%X", + (c1?"true":"false"), c2, c3, c4, c5, c6); + Log(Logs::Detail, Logs::Error, "XTarget Merge[grp] empty=%s, size=%u, begin=0x%X, end=0x%X, rbegin=0x%X, rend=0x%X", + (g1?"true":"false"), g2, g3, g4, g5, g6); + g->GetXTargetAutoMgr()->merge(*GetXTargetAutoMgr()); GetXTargetAutoMgr()->clear(); RemoveAutoXTargets(); diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index e686784ce..fe8af2a98 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -6728,12 +6728,7 @@ void Client::Handle_OP_GroupFollow2(const EQApplicationPacket *app) // Inviter and Invitee are in the same zone if (inviter != nullptr && inviter->IsClient()) { - if (!inviter->CastToClient()->Connected()) - { - Log(Logs::General, Logs::Error, "%s attempted to join group while leader %s was zoning.", GetName(), inviter->GetName()); - Message(13, "Bubba said you can't follow him."); - } - else if (GroupFollow(inviter->CastToClient())) + if (GroupFollow(inviter->CastToClient())) { strn0cpy(gf->name1, inviter->GetName(), sizeof(gf->name1)); strn0cpy(gf->name2, GetName(), sizeof(gf->name2));