Enable gaining of group leadership while in raids

Note: raid leaders can only gain raid leadership, so they won't
ever gain group leadership while leading a raid, even if they don't
end up gaining group due to the restrictions.

From what I can tell, this should be in line with live
This commit is contained in:
Michael Cook (mackal)
2014-10-18 13:27:33 -04:00
parent e8eb774458
commit 3f056462d6
3 changed files with 45 additions and 20 deletions
+18 -2
View File
@@ -4256,12 +4256,28 @@ bool Client::IsLeadershipEXPOn() {
Group *g = GetGroup();
if(g && g->IsLeader(this) && (g->GroupCount() > 2))
if (g && g->IsLeader(this) && g->GroupCount() > 2)
return true;
Raid *r = GetRaid();
if(r && r->IsLeader(this) && (r->RaidCount() > 17))
if (!r)
return false;
// raid leaders can only gain raid AA XP
if (r->IsLeader(this)) {
if (r->RaidCount() > 17)
return true;
else
return false;
}
uint32 gid = r->GetGroup(this);
if (gid > 11) // not in a group
return false;
if (r->IsGroupLeader(GetName()) && r->GroupCount(gid) > 2)
return true;
return false;