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 e011f6e15..d88d08d41 100644 --- a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp +++ b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp @@ -592,6 +592,8 @@ void CLuaIHMRyzom::RegisterRyzomFunctions(NLGUI::CLuaState &ls) LUABIND_FUNC(isCtrlKeyDown), LUABIND_FUNC(encodeURLUnicodeParam), LUABIND_FUNC(encodeURLParam), + LUABIND_FUNC(encodeToHexa), + LUABIND_FUNC(decodeFromHexa), LUABIND_FUNC(getPlayerLevel), LUABIND_FUNC(getPlayerVpa), LUABIND_FUNC(getPlayerVpb), @@ -3780,6 +3782,24 @@ std::string CLuaIHMRyzom::encodeURLParam(const string &text) return convertToHTML(text); } + +// *************************************************************************** +std::string CLuaIHMRyzom::encodeToHexa(const string &text) +{ + return toHexa(text); +} + + + +// *************************************************************************** +std::string CLuaIHMRyzom::decodeFromHexa(const string &text) +{ + string hexa; + fromHexa(text, hexa); + return hexa; +} + + // *************************************************************************** sint32 CLuaIHMRyzom::getPlayerLevel() { diff --git a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.h b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.h index 3a9eed78a..31cda63b1 100644 --- a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.h +++ b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.h @@ -261,6 +261,9 @@ private: static std::string encodeURLUnicodeParam(const ucstring &text); static std::string encodeURLParam(const std::string &text); + static std::string encodeToHexa(const std::string &text); + static std::string decodeFromHexa(const std::string &text); + static sint32 getPlayerLevel(); // get max level among player skills (magi, combat, crafting ,foraging) static std::string getPlayerVpaHex(); static std::string getPlayerVpbHex();