|
|
|
@ -1906,11 +1906,19 @@ void getItemText (CDBCtrlSheet *item, string &itemText, const CItemSheet*pIS)
|
|
|
|
|
// Custom text
|
|
|
|
|
const CClientItemInfo &itemInfo = getInventory().getItemInfo(getInventory().getItemSlotId(item) );
|
|
|
|
|
if (!itemInfo.CustomText.empty())
|
|
|
|
|
{
|
|
|
|
|
std::string text = itemInfo.CustomText.toUtf8();
|
|
|
|
|
if (text.size() > 3 && text[0]=='@' && ((text[1]=='W' && text[2]=='E' && text[3]=='B') || (text[1]=='L' && text[2]=='U' && text[3]=='A')))
|
|
|
|
|
{
|
|
|
|
|
strFindReplace(itemText, "%custom_text", string() );
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
strFindReplace(itemText, "%custom_text", "\n@{FFFF}" + itemInfo.CustomText.toUtf8() + "\n");
|
|
|
|
|
string itemMFC = CI18N::get("uiItemTextMessageFromCrafter");
|
|
|
|
|
strFindReplace(itemText, "%mfc", itemMFC);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
strFindReplace(itemText, "%custom_text", string() );
|
|
|
|
|
|
|
|
|
|