Added: encodeToHexa and decodeFromHexa

ryzom/ark/features
Ulukyn 5 years ago
parent 2f27af125e
commit c22f8776f4

@ -592,6 +592,8 @@ void CLuaIHMRyzom::RegisterRyzomFunctions(NLGUI::CLuaState &ls)
LUABIND_FUNC(isCtrlKeyDown), LUABIND_FUNC(isCtrlKeyDown),
LUABIND_FUNC(encodeURLUnicodeParam), LUABIND_FUNC(encodeURLUnicodeParam),
LUABIND_FUNC(encodeURLParam), LUABIND_FUNC(encodeURLParam),
LUABIND_FUNC(encodeToHexa),
LUABIND_FUNC(decodeFromHexa),
LUABIND_FUNC(getPlayerLevel), LUABIND_FUNC(getPlayerLevel),
LUABIND_FUNC(getPlayerVpa), LUABIND_FUNC(getPlayerVpa),
LUABIND_FUNC(getPlayerVpb), LUABIND_FUNC(getPlayerVpb),
@ -3780,6 +3782,24 @@ std::string CLuaIHMRyzom::encodeURLParam(const string &text)
return convertToHTML(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() sint32 CLuaIHMRyzom::getPlayerLevel()
{ {

@ -261,6 +261,9 @@ private:
static std::string encodeURLUnicodeParam(const ucstring &text); static std::string encodeURLUnicodeParam(const ucstring &text);
static std::string encodeURLParam(const std::string &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 sint32 getPlayerLevel(); // get max level among player skills (magi, combat, crafting ,foraging)
static std::string getPlayerVpaHex(); static std::string getPlayerVpaHex();
static std::string getPlayerVpbHex(); static std::string getPlayerVpbHex();

Loading…
Cancel
Save