mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-17 18:41: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,8 +1514,6 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (group) {
|
if (group) {
|
||||||
// If the group leader is not set, pull the group leader infomrmation from the database.
|
|
||||||
if (!group->GetLeader()) {
|
|
||||||
char ln[64];
|
char ln[64];
|
||||||
char MainTankName[64];
|
char MainTankName[64];
|
||||||
char AssistName[64];
|
char AssistName[64];
|
||||||
@ -1526,9 +1524,14 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
|
|||||||
GroupLeadershipAA_Struct GLAA;
|
GroupLeadershipAA_Struct GLAA;
|
||||||
memset(ln, 0, 64);
|
memset(ln, 0, 64);
|
||||||
database.GetGroupLeadershipInfo(group->GetID(), ln, MainTankName, AssistName, PullerName, NPCMarkerName, mentoree_name, &mentor_percent, &GLAA);
|
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);
|
Client *c = entity_list.GetClientByName(ln);
|
||||||
if (c)
|
if (c) {
|
||||||
group->SetLeader(c);
|
group->SetLeader(c);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
group->SetMainTank(MainTankName);
|
group->SetMainTank(MainTankName);
|
||||||
group->SetMainAssist(AssistName);
|
group->SetMainAssist(AssistName);
|
||||||
@ -1536,8 +1539,6 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
|
|||||||
group->SetNPCMarker(NPCMarkerName);
|
group->SetNPCMarker(NPCMarkerName);
|
||||||
group->SetGroupAAs(&GLAA);
|
group->SetGroupAAs(&GLAA);
|
||||||
group->SetGroupMentor(mentor_percent, mentoree_name);
|
group->SetGroupMentor(mentor_percent, mentoree_name);
|
||||||
}
|
|
||||||
group->LearnMembers();
|
|
||||||
JoinGroupXTargets(group);
|
JoinGroupXTargets(group);
|
||||||
group->UpdatePlayer(this);
|
group->UpdatePlayer(this);
|
||||||
LFG = false;
|
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;
|
int memberIndex = 0;
|
||||||
for (const auto& member : rows) {
|
for (const auto& member : rows) {
|
||||||
if (memberIndex >= MAX_GROUP_MEMBERS) {
|
if (memberIndex >= MAX_GROUP_MEMBERS) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user