Implement OP_ClearAA and OP_ClearLeadershipAbilities for SoF+

This is nice since #resetaa will no longer require a kick
This commit is contained in:
Michael Cook (mackal) 2014-12-05 22:29:41 -05:00
parent 1ac92c603e
commit 51b997aa27
3 changed files with 24 additions and 7 deletions

View File

@ -74,7 +74,9 @@ N(OP_CharacterCreateRequest),
N(OP_CharInventory),
N(OP_Charm),
N(OP_ChatMessage),
N(OP_ClearAA),
N(OP_ClearBlockedBuffs),
N(OP_ClearLeadershipAbilities),
N(OP_ClearNPCMarks),
N(OP_ClearObject),
N(OP_ClearSurname),

View File

@ -1471,6 +1471,7 @@ bool ZoneDatabase::LoadAAEffects2() {
return true;
}
void Client::ResetAA(){
RefundAA();
uint32 i;
@ -1495,11 +1496,24 @@ void Client::ResetAA(){
database.DeleteCharacterAAs(this->CharacterID());
SaveAA();
SendClearAA();
SendAAList();
SendAATable();
SendAAStats();
database.DeleteCharacterLeadershipAAs(this->CharacterID());
// undefined for these clients
if (GetClientVersionBit & BIT_TitaniumAndEarlier)
Kick();
}
void Client::SendClearAA()
{
EQApplicationPacket *outapp = new EQApplicationPacket(OP_ClearLeadershipAbilities, 0);
FastQueuePacket(&outapp);
outapp = new EQApplicationPacket(OP_ClearAA, 0);
FastQueuePacket(&outapp);
}
int Client::GroupLeadershipAAHealthEnhancement()
{
if (IsRaidGrouped()) {

View File

@ -755,6 +755,7 @@ public:
//AA Methods
void SendAAList();
void ResetAA();
void SendClearAA();
void SendAA(uint32 id, int seq=1);
void SendPreviousAA(uint32 id, int seq=1);
void BuyAA(AA_Action* action);