mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
Implement OP_ClearAA and OP_ClearLeadershipAbilities for SoF+
This is nice since #resetaa will no longer require a kick
This commit is contained in:
parent
1ac92c603e
commit
51b997aa27
@ -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),
|
||||
|
||||
28
zone/aa.cpp
28
zone/aa.cpp
@ -1471,21 +1471,22 @@ bool ZoneDatabase::LoadAAEffects2() {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Client::ResetAA(){
|
||||
RefundAA();
|
||||
RefundAA();
|
||||
uint32 i;
|
||||
for(i=0;i<MAX_PP_AA_ARRAY;i++){
|
||||
for (i=0; i < MAX_PP_AA_ARRAY; i++) {
|
||||
aa[i]->AA = 0;
|
||||
aa[i]->value = 0;
|
||||
m_pp.aa_array[MAX_PP_AA_ARRAY].AA = 0;
|
||||
m_pp.aa_array[MAX_PP_AA_ARRAY].value = 0;
|
||||
m_pp.aa_array[MAX_PP_AA_ARRAY].value = 0;
|
||||
}
|
||||
|
||||
std::map<uint32,uint8>::iterator itr;
|
||||
for(itr=aa_points.begin();itr!=aa_points.end();++itr)
|
||||
for(itr = aa_points.begin(); itr != aa_points.end(); ++itr)
|
||||
aa_points[itr->first] = 0;
|
||||
|
||||
for(int i = 0; i < _maxLeaderAA; ++i)
|
||||
for(int i = 0; i < _maxLeaderAA; ++i)
|
||||
m_pp.leader_abilities.ranks[i] = 0;
|
||||
|
||||
m_pp.group_leadership_points = 0;
|
||||
@ -1494,10 +1495,23 @@ void Client::ResetAA(){
|
||||
m_pp.raid_leadership_exp = 0;
|
||||
|
||||
database.DeleteCharacterAAs(this->CharacterID());
|
||||
SaveAA();
|
||||
SaveAA();
|
||||
SendClearAA();
|
||||
SendAAList();
|
||||
SendAATable();
|
||||
SendAAStats();
|
||||
database.DeleteCharacterLeadershipAAs(this->CharacterID());
|
||||
Kick();
|
||||
// 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()
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user