Added: setTargetAsInterlocutor and unsetTargetAsInterlocutor lua functions

--HG--
branch : compatibility-develop
hg/compatibility-develop
ulukyn 6 years ago
parent a42d3bc598
commit fc15c778fe

@ -474,6 +474,8 @@ void CLuaIHMRyzom::RegisterRyzomFunctions(NLGUI::CLuaState &ls)
ls.registerFunc("getUserRace", getUserRace); ls.registerFunc("getUserRace", getUserRace);
ls.registerFunc("getSheet2idx", getSheet2idx); ls.registerFunc("getSheet2idx", getSheet2idx);
ls.registerFunc("getTargetSlot", getTargetSlot); ls.registerFunc("getTargetSlot", getTargetSlot);
ls.registerFunc("setTargetAsInterlocutor", setTargetAsInterlocutor);
ls.registerFunc("unsetTargetAsInterlocutor", unsetTargetAsInterlocutor);
ls.registerFunc("getSlotDataSetId", getSlotDataSetId); ls.registerFunc("getSlotDataSetId", getSlotDataSetId);
ls.registerFunc("addShape", addShape); ls.registerFunc("addShape", addShape);
ls.registerFunc("moveShape", moveShape); ls.registerFunc("moveShape", moveShape);
@ -1591,6 +1593,22 @@ int CLuaIHMRyzom::getTargetSlot(CLuaState &ls)
return 1; 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) int CLuaIHMRyzom::getSlotDataSetId(CLuaState &ls)
{ {

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

Loading…
Cancel
Save