Added: setTargetAsInterlocutor and unsetTargetAsInterlocutor lua functions

--HG--
branch : patches-from-atys
hg/hotfix/patches-from-atys
ulukyn 6 years ago
parent d73ea16682
commit a7e75b1c6c

@ -474,6 +474,8 @@ void CLuaIHMRyzom::RegisterRyzomFunctions(NLGUI::CLuaState &ls)
ls.registerFunc("getUserRace", getUserRace);
ls.registerFunc("getSheet2idx", getSheet2idx);
ls.registerFunc("getTargetSlot", getTargetSlot);
ls.registerFunc("setTargetAsInterlocutor", setTargetAsInterlocutor);
ls.registerFunc("unsetTargetAsInterlocutor", unsetTargetAsInterlocutor);
ls.registerFunc("getSlotDataSetId", getSlotDataSetId);
ls.registerFunc("addShape", addShape);
ls.registerFunc("moveShape", moveShape);
@ -1591,6 +1593,22 @@ int CLuaIHMRyzom::getTargetSlot(CLuaState &ls)
return 1;
}
// ***************************************************************************
int CLuaIHMRyzom::setTargetAsInterlocutor(CLuaState &ls)
{
uint32 slot = (uint32)getTargetSlotNr();
UserEntity->interlocutor(slot);
return 0;
}
// ***************************************************************************
int CLuaIHMRyzom::unsetTargetAsInterlocutor(CLuaState &ls)
{
uint32 slot = (uint32)getTargetSlotNr();
UserEntity->interlocutor(CLFECOMMON::INVALID_SLOT);
return 0;
}
// ***************************************************************************
int CLuaIHMRyzom::getSlotDataSetId(CLuaState &ls)
{
@ -4231,4 +4249,4 @@ int CLuaIHMRyzom::displayChatMessage(CLuaState &ls)
ci.DynamicChat[id].displayMessage(ucstring(msg), prop.getRGBA());
}
return 1;
}
}

@ -98,6 +98,8 @@ private:
static int getUserRace(CLuaState &ls);
static int getSheet2idx(CLuaState &ls);
static int getTargetSlot(CLuaState &ls);
static int setTargetAsInterlocutor(CLuaState &ls);
static int unsetTargetAsInterlocutor(CLuaState &ls);
static int getSlotDataSetId(CLuaState &ls);
//
static int getMaxDynChan(CLuaState &ls);

Loading…
Cancel
Save