mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 10:31:29 +00:00
[Bug Fix] Fix issue with Group Pointers/Member roles (#3374)
* [Bug Fix] Fix issue with Group Corruption * cleanup * Fix for Group Roles * Fix for Group Roles
This commit is contained in:
parent
39d0772a01
commit
290c58741e
@ -1514,30 +1514,31 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
|
||||
}
|
||||
|
||||
if (group) {
|
||||
// If the group leader is not set, pull the group leader infomrmation from the database.
|
||||
if (!group->GetLeader()) {
|
||||
char ln[64];
|
||||
char MainTankName[64];
|
||||
char AssistName[64];
|
||||
char PullerName[64];
|
||||
char NPCMarkerName[64];
|
||||
char mentoree_name[64];
|
||||
int mentor_percent;
|
||||
GroupLeadershipAA_Struct GLAA;
|
||||
memset(ln, 0, 64);
|
||||
database.GetGroupLeadershipInfo(group->GetID(), ln, MainTankName, AssistName, PullerName, NPCMarkerName, mentoree_name, &mentor_percent, &GLAA);
|
||||
Client *c = entity_list.GetClientByName(ln);
|
||||
if (c)
|
||||
group->SetLeader(c);
|
||||
|
||||
group->SetMainTank(MainTankName);
|
||||
group->SetMainAssist(AssistName);
|
||||
group->SetPuller(PullerName);
|
||||
group->SetNPCMarker(NPCMarkerName);
|
||||
group->SetGroupAAs(&GLAA);
|
||||
group->SetGroupMentor(mentor_percent, mentoree_name);
|
||||
}
|
||||
char ln[64];
|
||||
char MainTankName[64];
|
||||
char AssistName[64];
|
||||
char PullerName[64];
|
||||
char NPCMarkerName[64];
|
||||
char mentoree_name[64];
|
||||
int mentor_percent;
|
||||
GroupLeadershipAA_Struct GLAA;
|
||||
memset(ln, 0, 64);
|
||||
database.GetGroupLeadershipInfo(group->GetID(), ln, MainTankName, AssistName, PullerName, NPCMarkerName, mentoree_name, &mentor_percent, &GLAA);
|
||||
group->LearnMembers();
|
||||
|
||||
if (!group->GetLeader()) {
|
||||
Client *c = entity_list.GetClientByName(ln);
|
||||
if (c) {
|
||||
group->SetLeader(c);
|
||||
}
|
||||
}
|
||||
|
||||
group->SetMainTank(MainTankName);
|
||||
group->SetMainAssist(AssistName);
|
||||
group->SetPuller(PullerName);
|
||||
group->SetNPCMarker(NPCMarkerName);
|
||||
group->SetGroupAAs(&GLAA);
|
||||
group->SetGroupMentor(mentor_percent, mentoree_name);
|
||||
JoinGroupXTargets(group);
|
||||
group->UpdatePlayer(this);
|
||||
LFG = false;
|
||||
|
||||
@ -1156,6 +1156,13 @@ bool Group::LearnMembers() {
|
||||
);
|
||||
}
|
||||
|
||||
for(int i = 0; i < MAX_GROUP_MEMBERS; ++i)
|
||||
{
|
||||
members[i] = nullptr;
|
||||
memset(membername[i],0,64);
|
||||
MemberRoles[i] = 0;
|
||||
}
|
||||
|
||||
int memberIndex = 0;
|
||||
for (const auto& member : rows) {
|
||||
if (memberIndex >= MAX_GROUP_MEMBERS) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user