From 9f033df196acad8b4feea58f8da94bb6f2fb65dd Mon Sep 17 00:00:00 2001 From: hg <4683435+hgtw@users.noreply.github.com> Date: Sat, 29 Oct 2022 19:48:27 -0400 Subject: [PATCH] [Cleanup] Send eqstr message in AddAAPoints (#2507) This api is only used by quests --- zone/client.cpp | 20 ++++++++++++++++++++ zone/client.h | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/zone/client.cpp b/zone/client.cpp index 8e134de31..3cf149df9 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -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(); +} diff --git a/zone/client.h b/zone/client.h index 16804a39a..f42951536 100644 --- a/zone/client.h +++ b/zone/client.h @@ -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();