[Bug Fix] Fix Issue with Suffixes/Prefixes (#4723)

This commit is contained in:
Alex King 2025-02-28 16:05:57 -05:00 committed by GitHub
parent e2db8ffea8
commit 5296202e56
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 10 deletions

View File

@ -57,34 +57,34 @@ EQApplicationPacket* TitleManager::MakeTitlesPacket(Client* c)
return outapp;
}
std::string TitleManager::GetPrefix(int title_set)
std::string TitleManager::GetPrefix(int title_id)
{
if (!title_set) {
if (!title_id) {
return "";
}
auto e = std::find_if(
titles.begin(),
titles.end(),
[title_set](const auto& t) {
return t.title_set == title_set;
[title_id](const auto& t) {
return t.id == title_id;
}
);
return e != titles.end() ? e->prefix : "";
}
std::string TitleManager::GetSuffix(int title_set)
std::string TitleManager::GetSuffix(int title_id)
{
if (!title_set) {
if (!title_id) {
return "";
}
auto e = std::find_if(
titles.begin(),
titles.end(),
[title_set](const auto& t) {
return t.title_set == title_set;
[title_id](const auto& t) {
return t.id == title_id;
}
);

View File

@ -15,8 +15,8 @@ public:
bool LoadTitles();
EQApplicationPacket* MakeTitlesPacket(Client* c);
std::string GetPrefix(int title_set);
std::string GetSuffix(int title_set);
std::string GetPrefix(int title_id);
std::string GetSuffix(int title_id);
std::vector<TitlesRepository::Titles> GetEligibleTitles(Client* c);
bool IsNewAATitleAvailable(int aa_points, int class_id);
bool IsNewTradeSkillTitleAvailable(int t, int skill_value);