mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
Core/Text: allow GENDER_NONE to use FemaleText in broadcast_text if not empty.
Otherwise it would only use MaleText, which breaks cases where female NPCs change model to one that has no gender.
This commit is contained in:
@@ -426,7 +426,7 @@ struct BroadcastText
|
||||
|
||||
std::string const& GetText(LocaleConstant locale = DEFAULT_LOCALE, uint8 gender = GENDER_MALE, bool forceGender = false) const
|
||||
{
|
||||
if (gender == GENDER_FEMALE && (forceGender || !FemaleText[DEFAULT_LOCALE].empty()))
|
||||
if ((gender == GENDER_FEMALE || gender == GENDER_NONE) && (forceGender || !FemaleText[DEFAULT_LOCALE].empty()))
|
||||
{
|
||||
if (FemaleText.size() > size_t(locale) && !FemaleText[locale].empty())
|
||||
return FemaleText[locale];
|
||||
|
||||
Reference in New Issue
Block a user