mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-11 03:31:08 +00:00
[Bug Fix] Fix issue where you can set your title to titles you don't have. (#1917)
* [Bug Fix] Fix issue where you can set your title to titles you don't have. * Fixes. * Fix missing logic check for HasTitle Co-authored-by: Natedog2012 <jwalters_06@yahoo.com>
This commit is contained in:
+8
-10
@@ -12838,17 +12838,15 @@ void Client::Handle_OP_SetTitle(const EQApplicationPacket *app)
|
||||
|
||||
SetTitle_Struct *sts = (SetTitle_Struct *)app->pBuffer;
|
||||
|
||||
std::string Title;
|
||||
|
||||
if (!sts->is_suffix)
|
||||
{
|
||||
Title = title_manager.GetPrefix(sts->title_id);
|
||||
SetAATitle(Title.c_str());
|
||||
if (!title_manager.HasTitle(this, sts->title_id)) {
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
Title = title_manager.GetSuffix(sts->title_id);
|
||||
SetTitleSuffix(Title.c_str());
|
||||
|
||||
std::string title = !sts->is_suffix ? title_manager.GetPrefix(sts->title_id) : title_manager.GetSuffix(sts->title_id);
|
||||
if (!sts->is_suffix) {
|
||||
SetAATitle(title.c_str());
|
||||
} else {
|
||||
SetTitleSuffix(title.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user