mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-03 17:14:46 +00:00
Added: New getGroundZ lua function
This commit is contained in:
parent
0b4f365d60
commit
e9f3fa6ba4
2 changed files with 13 additions and 0 deletions
|
@ -519,6 +519,7 @@ void CLuaIHMRyzom::RegisterRyzomFunctions( NLGUI::CLuaState &ls )
|
||||||
LUABIND_FUNC(getCharacterSheetRegionForce),
|
LUABIND_FUNC(getCharacterSheetRegionForce),
|
||||||
LUABIND_FUNC(getCharacterSheetRegionLevel),
|
LUABIND_FUNC(getCharacterSheetRegionLevel),
|
||||||
LUABIND_FUNC(getRegionByAlias),
|
LUABIND_FUNC(getRegionByAlias),
|
||||||
|
LUABIND_FUNC(getGroundZ),
|
||||||
LUABIND_FUNC(tell),
|
LUABIND_FUNC(tell),
|
||||||
LUABIND_FUNC(isRingAccessPointInReach),
|
LUABIND_FUNC(isRingAccessPointInReach),
|
||||||
LUABIND_FUNC(updateTooltipCoords),
|
LUABIND_FUNC(updateTooltipCoords),
|
||||||
|
@ -2614,6 +2615,17 @@ string CLuaIHMRyzom::getRegionByAlias(uint32 alias)
|
||||||
return ContinentMngr.getRegionNameByAlias(alias);
|
return ContinentMngr.getRegionNameByAlias(alias);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sint32 CLuaIHMRyzom::getGroundZ(uint32 x, sint32 y)
|
||||||
|
{
|
||||||
|
CVector vect = CVector(x, y, 0);
|
||||||
|
nlinfo("TEST");
|
||||||
|
UserEntity->getCollisionEntity()->snapToGround(vect);
|
||||||
|
nlinfo("Ground Z of (%d,%d) = %d", x, y, vect.z);
|
||||||
|
return vect.z;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
void CLuaIHMRyzom::tell(const ucstring &player, const ucstring &msg)
|
void CLuaIHMRyzom::tell(const ucstring &player, const ucstring &msg)
|
||||||
{
|
{
|
||||||
|
|
|
@ -201,6 +201,7 @@ private:
|
||||||
static sint getCharacterSheetRegionForce(const std::string &sheet);
|
static sint getCharacterSheetRegionForce(const std::string &sheet);
|
||||||
static sint getCharacterSheetRegionLevel(const std::string &sheet);
|
static sint getCharacterSheetRegionLevel(const std::string &sheet);
|
||||||
static std::string getRegionByAlias(uint32 alias);
|
static std::string getRegionByAlias(uint32 alias);
|
||||||
|
static sint getGroundZ(uint32 x, sint32 y);
|
||||||
// open the window to do a tell to 'player', if 'msg' is not empty, then the message will be sent immediatly
|
// open the window to do a tell to 'player', if 'msg' is not empty, then the message will be sent immediatly
|
||||||
// else, current command of the chat window will be replaced with tell 'player'
|
// else, current command of the chat window will be replaced with tell 'player'
|
||||||
static void tell(const ucstring &player, const ucstring &msg);
|
static void tell(const ucstring &player, const ucstring &msg);
|
||||||
|
|
Loading…
Reference in a new issue