From 61cee990fcaf6f1c5d5aac7d2ca004b1a8c3dbf7 Mon Sep 17 00:00:00 2001 From: ulukyn Date: Wed, 21 Feb 2018 20:34:17 +0100 Subject: [PATCH] Changed: Fix @WEB customtext items --HG-- branch : patches-from-atys --- .../src/interface_v3/action_handler_item.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/action_handler_item.cpp b/code/ryzom/client/src/interface_v3/action_handler_item.cpp index bbb21d2c6..4b177128a 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_item.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_item.cpp @@ -166,12 +166,12 @@ void CInterfaceItemEdition::CItemEditionWindow::infoReceived() { CGroupHTML *pGH = dynamic_cast(CWidgetManager::getInstance()->getElementFromId("ui:interface:web_transactions:content:html")); if (pGH) - pGH->browse(text.substr(4, text.size()-4).toString().c_str()); + pGH->browse(text.substr(3, text.size()-3).toString().c_str()); text = localDesc; } - else if (text.size() > 4 && text[0]=='@' && text[1]=='L' && text[2]=='U' && text[3]=='A' && text[4]==' ') + else if (text.size() > 3 && text[0]=='@' && text[1]=='L' && text[2]=='U' && text[3]=='A') { - string code = text.substr(4, text.size()-4).toString(); + string code = text.substr(3, text.size()-3).toString(); if (!code.empty()) CLuaManager::getInstance().executeLuaScript(code); text = localDesc; @@ -306,16 +306,16 @@ void CInterfaceItemEdition::CItemEditionWindow::begin() else { ucstring text = itemInfo.CustomText; - if (text.size() > 4 && text[0]=='@' && text[1]=='W' && text[2]=='E' && text[3]=='B' && text[4]==' ') + 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).toString().c_str()); + pGH->browse(text.substr(3, text.size()-3).toString().c_str()); text = localDesc; } - else if (text.size() > 4 && text[0]=='@' && text[1]=='L' && text[2]=='U' && text[3]=='A' && text[4]==' ') + else if (text.size() > 3 && text[0]=='@' && text[1]=='L' && text[2]=='U' && text[3]=='A') { - string code = text.substr(4, text.size()-4).toString(); + string code = text.substr(3, text.size()-3).toString(); if (!code.empty()) CLuaManager::getInstance().executeLuaScript(code); text = localDesc;