From 7f54e26dece2814edfd5a8eb4fe1ee2d855ccf04 Mon Sep 17 00:00:00 2001 From: Alex King <89047260+Kinglykrab@users.noreply.github.com> Date: Sun, 3 Dec 2023 12:41:06 -0500 Subject: [PATCH] [Quest API] Add EVENT_AA_GAIN to AddAAPoints() (#3733) # Notes - Using this method did not call `EVENT_AA_GAIN`. --- zone/client.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/zone/client.cpp b/zone/client.cpp index da1a5bf2d..367e481c2 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -11127,16 +11127,15 @@ void Client::AddAAPoints(uint32 points) { m_pp.aapoints += points; - if (points == 1 && m_pp.aapoints == 1) - { + if (parse->PlayerHasQuestSub(EVENT_AA_GAIN)) { + parse->EventPlayer(EVENT_AA_GAIN, this, std::to_string(points), 0); + } + + 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) - { + } 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 - { + } else { MessageString(Chat::Yellow, GAIN_MULTI_AA_MULTI_AA, fmt::format_int(points).c_str(), fmt::format_int(m_pp.aapoints).c_str()); }