Update action_handler_item.cpp

develop
Jan Boon 4 years ago committed by GitHub
parent 9d3891f1aa
commit f859a39da4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -305,27 +305,28 @@ void CInterfaceItemEdition::CItemEditionWindow::begin()
// Finish the display or add the waiter
if (getInventory().isItemInfoUpToDate(ItemSlotId))
{
const char *localDesc = STRING_MANAGER::CStringManagerClient::getItemLocalizedDescription(pIS->Id);
if (itemInfo.CustomText.empty())
display->setTextFormatTaged(STRING_MANAGER::CStringManagerClient::getItemLocalizedDescription(pIS->Id));
display->setTextFormatTaged(localDesc);
else
{
ucstring text = itemInfo.CustomText;
string text = itemInfo.CustomText.toUtf8();
if (text.size() > 3 && text[0]=='@' && text[1]=='W' && text[2]=='E' && text[3]=='B')
{
CGroupHTML *pGH = dynamic_cast<CGroupHTML*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:web_transactions:content:html"));
if (pGH)
pGH->browse(text.substr(4, text.size()-4).toUtf8().c_str());
pGH->browse(text.substr(4, text.size()-4).c_str());
text = localDesc;
}
else if (text.size() > 3 && text[0]=='@' && text[1]=='L' && text[2]=='U' && text[3]=='A')
{
string code = text.substr(4, text.size()-4).toUtf8();
string code = text.substr(4, text.size()-4);
if (!code.empty())
CLuaManager::getInstance().executeLuaScript(code);
text = localDesc;
}
if (!text.empty())
display->setTextFormatTaged(text.toUtf8());
display->setTextFormatTaged(text);
}
}
else

Loading…
Cancel
Save