fix Core/Gossip: gossipMenuLocale doesn't work

This commit is contained in:
Alvin Zhu
2023-01-07 18:22:06 +08:00
committed by GitHub
parent 50e19cdabd
commit f59f07d150

View File

@@ -183,14 +183,14 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool
// if the language is not default and the texts weren't found, maybe they're in gossip_menu_option_locale table
if (locale != DEFAULT_LOCALE)
{
if (strOptionText.empty())
if (!optionBroadcastText)
{
/// Find localizations from database.
if (GossipMenuItemsLocale const* gossipMenuLocale = sObjectMgr->GetGossipMenuItemsLocale(MAKE_PAIR32(menuId, itr->second.OptionID)))
ObjectMgr::GetLocaleString(gossipMenuLocale->OptionText, locale, strOptionText);
}
if (strBoxText.empty())
if (!boxBroadcastText)
{
/// Find localizations from database.
if (GossipMenuItemsLocale const* gossipMenuLocale = sObjectMgr->GetGossipMenuItemsLocale(MAKE_PAIR32(menuId, itr->second.OptionID)))