From f859a39da483f602db24f5d7ffd751eab6b7be4d Mon Sep 17 00:00:00 2001 From: Jan Boon Date: Sun, 1 Nov 2020 10:34:51 +0800 Subject: [PATCH] Update action_handler_item.cpp --- ryzom/client/src/interface_v3/action_handler_item.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ryzom/client/src/interface_v3/action_handler_item.cpp b/ryzom/client/src/interface_v3/action_handler_item.cpp index 8cbeaf678..1f8cd61b0 100644 --- a/ryzom/client/src/interface_v3/action_handler_item.cpp +++ b/ryzom/client/src/interface_v3/action_handler_item.cpp @@ -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(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