mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 02:50:29 +00:00
fix(Core/Player): clear current title if the player loses it (#8827)
This commit is contained in:
@@ -12486,6 +12486,12 @@ void Player::SetTitle(CharTitlesEntry const* title, bool lost)
|
||||
if (!HasFlag(PLAYER__FIELD_KNOWN_TITLES + fieldIndexOffset, flag))
|
||||
return;
|
||||
|
||||
// Clear the current title if it is the one being removed.
|
||||
if (title->bit_index == GetUInt32Value(PLAYER_CHOSEN_TITLE))
|
||||
{
|
||||
SetCurrentTitle(nullptr, true);
|
||||
}
|
||||
|
||||
RemoveFlag(PLAYER__FIELD_KNOWN_TITLES + fieldIndexOffset, flag);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user