mirror of
https://github.com/edubart/otclient.git
synced 2025-12-22 00:17:10 +01:00
scripting rework
This commit is contained in:
@@ -30,14 +30,16 @@
|
||||
class Scriptable : public boost::enable_shared_from_this<Scriptable>
|
||||
{
|
||||
public:
|
||||
Scriptable() : m_luaTableRef(-1) { }
|
||||
|
||||
virtual const char *getScriptableName() const { return NULL; }
|
||||
|
||||
void associateLuaRef(const std::string& refName, int refId);
|
||||
int getLuaRef(const std::string& refName);
|
||||
void clearLuaRefs();
|
||||
int getLuaTableRef();
|
||||
void releaseLuaTableRef();
|
||||
void callLuaTableField(const std::string& field);
|
||||
|
||||
private:
|
||||
std::map<std::string, int> m_luaRefs;
|
||||
int m_luaTableRef;
|
||||
};
|
||||
|
||||
typedef boost::shared_ptr<Scriptable> ScriptablePtr;
|
||||
|
||||
Reference in New Issue
Block a user