From 5d94c9844a467daf457c801ed8e98a738f339bd1 Mon Sep 17 00:00:00 2001 From: Kinglykrab <89047260+Kinglykrab@users.noreply.github.com> Date: Sat, 2 Apr 2022 11:09:48 -0400 Subject: [PATCH] [Bug Fix] Clear title/suffix bug fix. (#2068) - Clearing uses title ID 0, so need to make sure title ID is valid when setting and based on that, either check and set, or just clear. --- zone/client_packet.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 24d384b2d..01a60f06e 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -12877,11 +12877,20 @@ void Client::Handle_OP_SetTitle(const EQApplicationPacket *app) SetTitle_Struct *sts = (SetTitle_Struct *)app->pBuffer; - if (!title_manager.HasTitle(this, sts->title_id)) { + if (sts->title_id && !title_manager.HasTitle(this, sts->title_id)) { return; } - std::string title = !sts->is_suffix ? title_manager.GetPrefix(sts->title_id) : title_manager.GetSuffix(sts->title_id); + std::string title = ( + sts->title_id ? + ( + !sts->is_suffix ? + title_manager.GetPrefix(sts->title_id) : + title_manager.GetSuffix(sts->title_id) + ) : + "" + ); + if (!sts->is_suffix) { SetAATitle(title.c_str()); } else {