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:
SnapperRy
2016-10-16 11:28:30 +02:00
committed by Aokromes
parent 9a08815526
commit 28aba933d6

View File

@@ -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];