|
|
@ -112,6 +112,7 @@
|
|
|
|
#include "../entities.h"
|
|
|
|
#include "../entities.h"
|
|
|
|
#include "../misc.h"
|
|
|
|
#include "../misc.h"
|
|
|
|
#include "../gabarit.h"
|
|
|
|
#include "../gabarit.h"
|
|
|
|
|
|
|
|
#include "../view.h"
|
|
|
|
|
|
|
|
|
|
|
|
#include "bot_chat_page_all.h"
|
|
|
|
#include "bot_chat_page_all.h"
|
|
|
|
#include "bot_chat_page_ring_sessions.h"
|
|
|
|
#include "bot_chat_page_ring_sessions.h"
|
|
|
@ -442,6 +443,8 @@ void CLuaIHMRyzom::RegisterRyzomFunctions(NLGUI::CLuaState &ls)
|
|
|
|
ls.registerFunc("enableModalWindow", enableModalWindow);
|
|
|
|
ls.registerFunc("enableModalWindow", enableModalWindow);
|
|
|
|
ls.registerFunc("getPlayerPos", getPlayerPos);
|
|
|
|
ls.registerFunc("getPlayerPos", getPlayerPos);
|
|
|
|
ls.registerFunc("getGroundAtMouse", getGroundAtMouse),
|
|
|
|
ls.registerFunc("getGroundAtMouse", getGroundAtMouse),
|
|
|
|
|
|
|
|
ls.registerFunc("moveCam", moveCam),
|
|
|
|
|
|
|
|
ls.registerFunc("setCamMode", setCamMode),
|
|
|
|
ls.registerFunc("getMousePos", getMousePos),
|
|
|
|
ls.registerFunc("getMousePos", getMousePos),
|
|
|
|
ls.registerFunc("getMouseDown", getMouseDown),
|
|
|
|
ls.registerFunc("getMouseDown", getMouseDown),
|
|
|
|
ls.registerFunc("getMouseMiddleDown", getMouseMiddleDown),
|
|
|
|
ls.registerFunc("getMouseMiddleDown", getMouseMiddleDown),
|
|
|
@ -588,6 +591,9 @@ void CLuaIHMRyzom::RegisterRyzomFunctions(NLGUI::CLuaState &ls)
|
|
|
|
LUABIND_FUNC(updateTooltipCoords),
|
|
|
|
LUABIND_FUNC(updateTooltipCoords),
|
|
|
|
LUABIND_FUNC(isCtrlKeyDown),
|
|
|
|
LUABIND_FUNC(isCtrlKeyDown),
|
|
|
|
LUABIND_FUNC(encodeURLUnicodeParam),
|
|
|
|
LUABIND_FUNC(encodeURLUnicodeParam),
|
|
|
|
|
|
|
|
LUABIND_FUNC(encodeURLParam),
|
|
|
|
|
|
|
|
LUABIND_FUNC(encodeToHexa),
|
|
|
|
|
|
|
|
LUABIND_FUNC(decodeFromHexa),
|
|
|
|
LUABIND_FUNC(getPlayerLevel),
|
|
|
|
LUABIND_FUNC(getPlayerLevel),
|
|
|
|
LUABIND_FUNC(getPlayerVpa),
|
|
|
|
LUABIND_FUNC(getPlayerVpa),
|
|
|
|
LUABIND_FUNC(getPlayerVpb),
|
|
|
|
LUABIND_FUNC(getPlayerVpb),
|
|
|
@ -1331,6 +1337,39 @@ int CLuaIHMRyzom::getGroundAtMouse(CLuaState &ls)
|
|
|
|
return 3;
|
|
|
|
return 3;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int CLuaIHMRyzom::moveCam(CLuaState &ls)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
const char *funcName = "moveCam";
|
|
|
|
|
|
|
|
CLuaIHM::checkArgCount(ls, funcName, 3);
|
|
|
|
|
|
|
|
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER);
|
|
|
|
|
|
|
|
CLuaIHM::checkArgType(ls, funcName, 2, LUA_TNUMBER);
|
|
|
|
|
|
|
|
CLuaIHM::checkArgType(ls, funcName, 3, LUA_TNUMBER);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
float x = (float)ls.toNumber(1);
|
|
|
|
|
|
|
|
float y = (float)ls.toNumber(2);
|
|
|
|
|
|
|
|
float z = (float)ls.toNumber(3);
|
|
|
|
|
|
|
|
CVector moves(x, y, z);
|
|
|
|
|
|
|
|
UserEntity->setCameraMoves(moves);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int CLuaIHMRyzom::setCamMode(CLuaState &ls)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
const char *funcName = "setCamMode";
|
|
|
|
|
|
|
|
CLuaIHM::checkArgCount(ls, funcName, 1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool aiMode = ls.toBoolean(1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(aiMode)
|
|
|
|
|
|
|
|
UserControls.mode(CUserControls::AIMode);
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
UserEntity->viewMode(UserEntity->viewMode());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
// ***************************************************************************
|
|
|
|
int CLuaIHMRyzom::getPlayerPos(CLuaState &ls)
|
|
|
|
int CLuaIHMRyzom::getPlayerPos(CLuaState &ls)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -3736,6 +3775,31 @@ std::string CLuaIHMRyzom::encodeURLUnicodeParam(const ucstring &text)
|
|
|
|
return convertToHTML(text.toUtf8());
|
|
|
|
return convertToHTML(text.toUtf8());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
|
|
|
std::string CLuaIHMRyzom::encodeURLParam(const string &text)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//H_AUTO(Lua_CLuaIHM_encodeURLUnicodeParam)
|
|
|
|
|
|
|
|
return convertToHTML(text);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
|
|
|
std::string CLuaIHMRyzom::encodeToHexa(const string &text)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return toHexa(text);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
|
|
|
std::string CLuaIHMRyzom::decodeFromHexa(const string &text)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
string hexa;
|
|
|
|
|
|
|
|
fromHexa(text, hexa);
|
|
|
|
|
|
|
|
return hexa;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
// ***************************************************************************
|
|
|
|
sint32 CLuaIHMRyzom::getPlayerLevel()
|
|
|
|
sint32 CLuaIHMRyzom::getPlayerLevel()
|
|
|
|
{
|
|
|
|
{
|
|
|
|