summaryrefslogtreecommitdiffstats
path: root/pokescripting/ObjectWrapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pokescripting/ObjectWrapper.cpp')
-rw-r--r--pokescripting/ObjectWrapper.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/pokescripting/ObjectWrapper.cpp b/pokescripting/ObjectWrapper.cpp
index 0e5b734a..1158c46f 100644
--- a/pokescripting/ObjectWrapper.cpp
+++ b/pokescripting/ObjectWrapper.cpp
@@ -19,3 +19,19 @@
#include "ObjectWrapper.h"
QMap<int, Pokescripting::ObjectWrapper*> Pokescripting::ObjectWrapper::m_instances;
+
+Pokescripting::ObjectWrapper::ObjectWrapper(const Pokemod::Object* object, QObject* parent) :
+ Config(parent),
+ m_object(object)
+{
+}
+
+int Pokescripting::ObjectWrapper::id() const
+{
+ return m_object->id();
+}
+
+const Pokemod::Pokemod* Pokescripting::ObjectWrapper::pokemod() const
+{
+ return qobject_cast<const Pokemod::Pokemod*>(m_object->pokemod());
+}