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 88fce80e7..28194b6d4 100644 --- a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp +++ b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp @@ -551,6 +551,7 @@ void CLuaIHMRyzom::RegisterRyzomFunctions(NLGUI::CLuaState &ls) LUABIND_FUNC(getClientCfg), LUABIND_FUNC(sendMsgToServer), LUABIND_FUNC(sendMsgToServerPvpTag), + LUABIND_FUNC(sendMsgToServerUseItem), LUABIND_FUNC(isGuildQuitAvailable), LUABIND_FUNC(sortGuildMembers), LUABIND_FUNC(getNbGuildMembers), @@ -3399,6 +3400,16 @@ void CLuaIHMRyzom::sendMsgToServerPvpTag(bool pvpTag) ::sendMsgToServer("PVP:PVP_TAG", tag); } +// *************************************************************************** +void CLuaIHMRyzom::sendMsgToServerUseItem(sint32 slot) +{ + //H_AUTO(Lua_CLuaIHM_sendMsgToServerUseItem) + uint8 u8n1 = (uint8)((uint16)slot >> 8); + uint8 u8n2 = (uint8)((uint16)slot & 0x00FF); + + ::sendMsgToServer("ITEM:USE_ITEM", u8n1, u8n2); +} + // *************************************************************************** bool CLuaIHMRyzom::isGuildQuitAvailable() { 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 027b05b06..5e8f8d021 100644 --- a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.h +++ b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.h @@ -202,6 +202,7 @@ private: static std::string getClientCfg(const std::string &varName); static void sendMsgToServer(const std::string &msgName); static void sendMsgToServerPvpTag(bool pvpTag); + static void sendMsgToServerUseItem(sint32 slot); static bool isGuildQuitAvailable(); static void sortGuildMembers(); static sint32 getNbGuildMembers();