[Cleanup] Send eqstr message in AddAAPoints (#2507)

This api is only used by quests
This commit is contained in:
hg 2022-10-29 19:48:27 -04:00 committed by GitHub
parent 16ee25224d
commit 9f033df196
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 1 deletions

View File

@ -11844,3 +11844,23 @@ void Client::SetLockSavePosition(bool lock_save_position)
{
Client::m_lock_save_position = lock_save_position;
}
void Client::AddAAPoints(uint32 points)
{
m_pp.aapoints += points;
if (points == 1 && m_pp.aapoints == 1)
{
MessageString(Chat::Yellow, GAIN_SINGLE_AA_SINGLE_AA, fmt::format_int(m_pp.aapoints).c_str());
}
else if (points == 1 && m_pp.aapoints > 1)
{
MessageString(Chat::Yellow, GAIN_SINGLE_AA_MULTI_AA, fmt::format_int(m_pp.aapoints).c_str());
}
else
{
MessageString(Chat::Yellow, GAIN_MULTI_AA_MULTI_AA, fmt::format_int(points).c_str(), fmt::format_int(m_pp.aapoints).c_str());
}
SendAlternateAdvancementStats();
}

View File

@ -903,7 +903,7 @@ public:
void ResetOnDeathAlternateAdvancement();
void SetAAPoints(uint32 points) { m_pp.aapoints = points; SendAlternateAdvancementStats(); }
void AddAAPoints(uint32 points) { m_pp.aapoints += points; SendAlternateAdvancementStats(); }
void AddAAPoints(uint32 points);
int GetAAPoints() { return m_pp.aapoints; }
int GetSpentAA() { return m_pp.aapoints_spent; }
uint32 GetRequiredAAExperience();