diff --git a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp index 034a914b2..f83bd7dea 100644 --- a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp +++ b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp @@ -1531,10 +1531,14 @@ int CLuaIHMRyzom::getTargetTitle(CLuaState &ls) // *************************************************************************** int CLuaIHMRyzom::moveToTarget(CLuaState &ls) { - CLuaIHM::checkArgCount(ls, "moveToTarget", 0); + CLuaIHM::checkArgCount(ls, "moveToTarget", 1); + CLuaIHM::checkArgType(ls, "url", 1, LUA_TSTRING); + + const std::string &url = ls.toString(1); CEntityCL *target = getTargetEntity(); if (!target) return 0; - + + CLuaManager::getInstance().executeLuaScript("ArkTargetUrl = [["+url+"]]", 0); UserEntity->moveTo(UserEntity->selection(), 1.0, CUserEntity::OpenArkUrl); return 0; } diff --git a/code/ryzom/client/src/user_entity.cpp b/code/ryzom/client/src/user_entity.cpp index 652568255..67a31770f 100644 --- a/code/ryzom/client/src/user_entity.cpp +++ b/code/ryzom/client/src/user_entity.cpp @@ -1688,7 +1688,7 @@ void CUserEntity::moveToAction(CEntityCL *ent) break; // openArkUrl case CUserEntity::OpenArkUrl: - CLuaManager::getInstance().executeLuaScript("game:openTargetArkUrl()", 0); + CLuaManager::getInstance().executeLuaScript("getUI('ui:interface:web_transactions'):find('html'):browse(ArkTargetUrl)", 0); break; default: break;