Implement group mentor, leadership exp sharing (SoF+ only)

Currently only works in normal groups
Some decisions: the EXP will be rounded in the favor of the group leader
No idea how live actually handles it.
This commit is contained in:
Michael Cook (mackal)
2014-10-18 00:17:46 -04:00
parent 223d06645d
commit e8eb774458
17 changed files with 131 additions and 15 deletions
+4 -1
View File
@@ -1001,9 +1001,11 @@ void WorldServer::Process() {
char AssistName[64];
char PullerName[64];
char NPCMarkerName[64];
char mentoree_name[64];
int mentor_percent;
GroupLeadershipAA_Struct GLAA;
memset(ln, 0, 64);
strcpy(ln, database.GetGroupLeadershipInfo(group->GetID(), ln, MainTankName, AssistName, PullerName, NPCMarkerName, &GLAA));
strcpy(ln, database.GetGroupLeadershipInfo(group->GetID(), ln, MainTankName, AssistName, PullerName, NPCMarkerName, mentoree_name, &mentor_percent, &GLAA));
Client *lc = entity_list.GetClientByName(ln);
if(lc)
group->SetLeader(lc);
@@ -1013,6 +1015,7 @@ void WorldServer::Process() {
group->SetPuller(PullerName);
group->SetNPCMarker(NPCMarkerName);
group->SetGroupAAs(&GLAA);
group->SetGroupMentor(mentor_percent, mentoree_name);
}
}