From 5296202e56013fadd21641a127c572372ae35876 Mon Sep 17 00:00:00 2001 From: Alex King <89047260+Kinglykrab@users.noreply.github.com> Date: Fri, 28 Feb 2025 16:05:57 -0500 Subject: [PATCH] [Bug Fix] Fix Issue with Suffixes/Prefixes (#4723) --- zone/titles.cpp | 16 ++++++++-------- zone/titles.h | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/zone/titles.cpp b/zone/titles.cpp index 5eb61c8a0..bd2d42298 100644 --- a/zone/titles.cpp +++ b/zone/titles.cpp @@ -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; } ); diff --git a/zone/titles.h b/zone/titles.h index 0edfc5a67..5486e49c5 100644 --- a/zone/titles.h +++ b/zone/titles.h @@ -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 GetEligibleTitles(Client* c); bool IsNewAATitleAvailable(int aa_points, int class_id); bool IsNewTradeSkillTitleAvailable(int t, int skill_value);