mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 05:21:29 +00:00
Actually remove expendable AAs from the DB
This commit is contained in:
parent
e5746c3b2e
commit
e86d11250b
@ -1240,6 +1240,10 @@ void Mob::ExpendAlternateAdvancementCharge(uint32 aa_id) {
|
||||
CastToClient()->GetEPP().expended_aa += r->cost;
|
||||
}
|
||||
}
|
||||
if (IsClient()) {
|
||||
auto c = CastToClient();
|
||||
c->RemoveExpendedAA(ability->first_rank_id);
|
||||
}
|
||||
aa_ranks.erase(iter.first);
|
||||
}
|
||||
|
||||
|
||||
@ -568,6 +568,11 @@ bool Client::SaveAA() {
|
||||
return true;
|
||||
}
|
||||
|
||||
void Client::RemoveExpendedAA(int aa_id)
|
||||
{
|
||||
database.QueryDatabase(StringFormat("DELETE from `character_alternate_abilities` WHERE `id` = %d and `aa_id` = %d", character_id, aa_id));
|
||||
}
|
||||
|
||||
bool Client::Save(uint8 iCommitNow) {
|
||||
if(!ClientDataLoaded())
|
||||
return false;
|
||||
|
||||
@ -328,6 +328,7 @@ public:
|
||||
/* New PP Save Functions */
|
||||
bool SaveCurrency(){ return database.SaveCharacterCurrency(this->CharacterID(), &m_pp); }
|
||||
bool SaveAA();
|
||||
void RemoveExpendedAA(int aa_id);
|
||||
|
||||
inline bool ClientDataLoaded() const { return client_data_loaded; }
|
||||
inline bool Connected() const { return (client_state == CLIENT_CONNECTED); }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user