mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 22:01:30 +00:00
[Bug Fix] Fix #findaa and GetAAName(). (#2774)
# Notes - These were not properly checking every possible AA ID.
This commit is contained in:
parent
d0edb93d62
commit
0a11eaa092
@ -35,7 +35,7 @@ void command_findaa(Client *c, const Seperator *sep)
|
||||
std::map<int, std::string> 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;
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user