Added: sendMsgToServerUseItem lua bind

--HG--
branch : develop
This commit is contained in:
Inky 2019-01-08 03:07:40 +01:00
parent a7b931353c
commit 6c1d44bc51
2 changed files with 12 additions and 0 deletions

View file

@ -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()
{

View file

@ -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();