From 6c1d44bc511ec470165ae196574bf5613a62c866 Mon Sep 17 00:00:00 2001 From: Inky Date: Tue, 8 Jan 2019 03:07:40 +0100 Subject: [PATCH] Added: sendMsgToServerUseItem lua bind --HG-- branch : develop --- code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp | 11 +++++++++++ code/ryzom/client/src/interface_v3/lua_ihm_ryzom.h | 1 + 2 files changed, 12 insertions(+) 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 36780f9e5..01b4dd786 100644 --- a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp +++ b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp @@ -540,6 +540,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), @@ -3326,6 +3327,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 fa8e57c9c..7a733f7aa 100644 --- a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.h +++ b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.h @@ -198,6 +198,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();