Fix issues with purchasing raid AAs

This commit is contained in:
Michael Cook (mackal) 2014-10-09 23:30:08 -04:00
parent ea4c23efcf
commit 3e1c917f11

View File

@ -10565,8 +10565,9 @@ void Client::Handle_OP_PurchaseLeadershipAA(const EQApplicationPacket *app)
//sell them the ability. //sell them the ability.
m_pp.raid_leadership_points -= cost; m_pp.raid_leadership_points -= cost;
m_pp.leader_abilities.ranks[aaid]++; m_pp.leader_abilities.ranks[aaid]++;
}
else { database.SaveCharacterLeadershipAA(this->CharacterID(), &m_pp);
} else {
//it is a group ability. //it is a group ability.
if (cost > m_pp.group_leadership_points) { if (cost > m_pp.group_leadership_points) {
Message(13, "You do not have enough points to purchase this ability."); Message(13, "You do not have enough points to purchase this ability.");
@ -10585,7 +10586,10 @@ void Client::Handle_OP_PurchaseLeadershipAA(const EQApplicationPacket *app)
UpdateLeadershipAA_Struct *u = (UpdateLeadershipAA_Struct *)outapp->pBuffer; UpdateLeadershipAA_Struct *u = (UpdateLeadershipAA_Struct *)outapp->pBuffer;
u->ability_id = aaid; u->ability_id = aaid;
u->new_rank = m_pp.leader_abilities.ranks[aaid]; u->new_rank = m_pp.leader_abilities.ranks[aaid];
u->pointsleft = m_pp.group_leadership_points; // FIXME: Take into account raid abilities if (aaid >= raidAAMarkNPC) // raid AA
u->pointsleft = m_pp.raid_leadership_points;
else // group AA
u->pointsleft = m_pp.group_leadership_points;
FastQueuePacket(&outapp); FastQueuePacket(&outapp);
Group *g = GetGroup(); Group *g = GetGroup();