|
|
@ -2295,7 +2295,7 @@ void CEntityCL::onStringAvailable(uint /* stringId */, const std::string &value)
|
|
|
|
womanTitle = ( c->getGender() == GSGENDER::female );
|
|
|
|
womanTitle = ( c->getGender() == GSGENDER::female );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
string replacement = STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(_TitleRaw.toUtf8(), womanTitle);
|
|
|
|
string replacement = STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(_TitleRaw, womanTitle);
|
|
|
|
|
|
|
|
|
|
|
|
// Sometimes translation contains another title
|
|
|
|
// Sometimes translation contains another title
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -2305,11 +2305,11 @@ void CEntityCL::onStringAvailable(uint /* stringId */, const std::string &value)
|
|
|
|
_EntityName = _EntityName = STRING_MANAGER::CStringManagerClient::getLocalizedName(sn.substr(0, pos));
|
|
|
|
_EntityName = _EntityName = STRING_MANAGER::CStringManagerClient::getLocalizedName(sn.substr(0, pos));
|
|
|
|
string::size_type pos2 = replacement.find('$', pos + 1);
|
|
|
|
string::size_type pos2 = replacement.find('$', pos + 1);
|
|
|
|
_TitleRaw = replacement.substr(pos+1, pos2 - pos - 1);
|
|
|
|
_TitleRaw = replacement.substr(pos+1, pos2 - pos - 1);
|
|
|
|
replacement = STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(_TitleRaw.toUtf8(), womanTitle);
|
|
|
|
replacement = STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(_TitleRaw, womanTitle);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
_Tags = STRING_MANAGER::CStringManagerClient::getTitleInfos(_TitleRaw.toUtf8(), womanTitle);
|
|
|
|
_Tags = STRING_MANAGER::CStringManagerClient::getTitleInfos(_TitleRaw, womanTitle);
|
|
|
|
|
|
|
|
|
|
|
|
if (!replacement.empty() || !ClientCfg.DebugStringManager)
|
|
|
|
if (!replacement.empty() || !ClientCfg.DebugStringManager)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -2320,7 +2320,7 @@ void CEntityCL::onStringAvailable(uint /* stringId */, const std::string &value)
|
|
|
|
_NameEx = replacement;
|
|
|
|
_NameEx = replacement;
|
|
|
|
newtitle = _NameEx.toUtf8();
|
|
|
|
newtitle = _NameEx.toUtf8();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
CHARACTER_TITLE::ECharacterTitle titleEnum = CHARACTER_TITLE::toCharacterTitle( _TitleRaw.toUtf8() );
|
|
|
|
CHARACTER_TITLE::ECharacterTitle titleEnum = CHARACTER_TITLE::toCharacterTitle( _TitleRaw );
|
|
|
|
if ( titleEnum >= CHARACTER_TITLE::BeginGmTitle && titleEnum <= CHARACTER_TITLE::EndGmTitle )
|
|
|
|
if ( titleEnum >= CHARACTER_TITLE::BeginGmTitle && titleEnum <= CHARACTER_TITLE::EndGmTitle )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_GMTitle = titleEnum - CHARACTER_TITLE::BeginGmTitle;
|
|
|
|
_GMTitle = titleEnum - CHARACTER_TITLE::BeginGmTitle;
|
|
|
@ -2352,13 +2352,13 @@ void CEntityCL::onStringAvailable(uint /* stringId */, const std::string &value)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
|
|
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
|
|
|
CViewText *pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:player:header_opened:player_title"));
|
|
|
|
CViewText *pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:player:header_opened:player_title"));
|
|
|
|
if (pVT != NULL) pVT->setText(_Title.toUtf8());
|
|
|
|
if (pVT != NULL) pVT->setText(_Title);
|
|
|
|
|
|
|
|
|
|
|
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:player"));
|
|
|
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:player"));
|
|
|
|
if (pGC != NULL) pGC->setUCTitle(_EntityName);
|
|
|
|
if (pGC != NULL) pGC->setUCTitle(_EntityName);
|
|
|
|
|
|
|
|
|
|
|
|
CSkillManager *pSM = CSkillManager::getInstance();
|
|
|
|
CSkillManager *pSM = CSkillManager::getInstance();
|
|
|
|
pSM->setPlayerTitle(_TitleRaw.toUtf8());
|
|
|
|
pSM->setPlayerTitle(_TitleRaw);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Must rebuild the in scene interface 'cause name has changed
|
|
|
|
// Must rebuild the in scene interface 'cause name has changed
|
|
|
|