From 0a11eaa092b21632aa520ee961e43e4a3e060c3e Mon Sep 17 00:00:00 2001 From: Alex King <89047260+Kinglykrab@users.noreply.github.com> Date: Sun, 22 Jan 2023 12:56:49 -0500 Subject: [PATCH] [Bug Fix] Fix #findaa and GetAAName(). (#2774) # Notes - These were not properly checking every possible AA ID. --- zone/gm_commands/findaa.cpp | 2 +- zone/zone.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/zone/gm_commands/findaa.cpp b/zone/gm_commands/findaa.cpp index c5d15437c..0774e2e49 100755 --- a/zone/gm_commands/findaa.cpp +++ b/zone/gm_commands/findaa.cpp @@ -35,7 +35,7 @@ void command_findaa(Client *c, const Seperator *sep) std::map ordered_aas; for (const auto& a : zone->aa_abilities) { - ordered_aas[a.second.get()->id] = a.second.get()->name; + ordered_aas[a.second.get()->first->id] = a.second.get()->name; } int found_count = 0; diff --git a/zone/zone.cpp b/zone/zone.cpp index 8005c6537..8444b1e95 100644 --- a/zone/zone.cpp +++ b/zone/zone.cpp @@ -2984,6 +2984,12 @@ std::string Zone::GetAAName(int aa_id) const auto& a = aa_abilities.find(current_aa_id); if (a != aa_abilities.end()) { return a->second.get()->name; + } else { + for (const auto& b : aa_abilities) { + if (b.second.get()->first->id == aa_id) { + return b.second.get()->name; + } + } } }