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:
1 parent
9a08815526
commit
28aba933d6
1 file changed
+1
-1
@@ -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