SEGS  0.6.1-develop [d2cac982]
Super Entity Game Server
Go to the documentation of this file.
1 /*
2  * SEGS - Super Entity Game Server
3  *
4  * Copyright (c) 2006 - 2019 SEGS Team (see
5  * This software is licensed under the terms of the 3-clause BSD License. See for details.
6  */
8 #pragma once
9 #include <memory>
10 #include <string>
13 class QString;
14 struct MapClientSession;
15 struct MapInstance;
18 {
19 public:
22  void registerTypes();
23  int loadAndRunFile(const QString &path);
24  void callFuncWithMapInstance(MapInstance *mi, const char *name, int arg1);
25  std::string callFuncWithClientContext(MapClientSession *client,const char *name,int arg1);
26  std::string callFuncWithClientContext(MapClientSession *client,const char *name,int arg1, glm::vec3 loc);
27  std::string callFuncWithClientContext(MapClientSession *client, const char *name, const char *arg1, glm::vec3 loc);
28  std::string callFunc(const char *name,int arg1);
29  std::string callFunc(const char *name,int arg1, glm::vec3 loc);
30  std::string callFunc(const char *name, const char *arg1, glm::vec3 loc);
31  std::string callFunc(const char *name, std::vector<Contact> contact_list);
32  void updateMapInstance(MapInstance * instance);
34  int runScript(const QString &script_contents,const char *script_name="unnamed script");
35  int runScript(MapClientSession *client,const QString &script_contents,const char *script_name="unnamed script");
36  bool setIncludeDir(const QString &path);
37 private:
40  std::unique_ptr<ScriptingEnginePrivate> m_private;
41 #endif
42 };
Definition: MapClientSession.h:32
int loadAndRunFile(const QString &path)
Definition: ScriptingEngine.cpp:757
int runScript(const QString &script_contents, const char *script_name="unnamed script")
Definition: ScriptingEngine.cpp:936
bool setIncludeDir(const QString &path)
Definition: ScriptingEngine.cpp:954
void registerTypes()
Definition: ScriptingEngine.cpp:125
void callFuncWithMapInstance(MapInstance *mi, const char *name, int arg1)
Definition: ScriptingEngine.cpp:778
Definition: MapInstance.h:132
Definition: ScriptingEngine_Null.cpp:18
std::string callFuncWithClientContext(MapClientSession *client, const char *name, int arg1)
Definition: ScriptingEngine.cpp:786
Definition: ScriptingEngine.cpp:61
Definition: ScriptingEngine.h:17
Definition: ScriptingEngine.cpp:110
void updateClientContext(MapClientSession *client)
Definition: ScriptingEngine.cpp:971
void updateMapInstance(MapInstance *instance)
Definition: ScriptingEngine.cpp:966
std::string callFunc(const char *name, int arg1)
Definition: ScriptingEngine.cpp:836