[Quest API] Add EVENT_AA_GAIN to AddAAPoints() (#3733)

# Notes
- Using this method did not call `EVENT_AA_GAIN`.
This commit is contained in:
Alex King 2023-12-03 12:41:06 -05:00 committed by GitHub
parent 11a81d8e8a
commit 7f54e26dec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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());
}