diff options
Diffstat (limited to 'pokescripting/MapWildListWrapper.h')
| -rw-r--r-- | pokescripting/MapWildListWrapper.h | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/pokescripting/MapWildListWrapper.h b/pokescripting/MapWildListWrapper.h index 56ecb721..a7bd74f5 100644 --- a/pokescripting/MapWildListWrapper.h +++ b/pokescripting/MapWildListWrapper.h @@ -28,6 +28,7 @@ namespace Pokescripting { // Forward declarations +class MapWrapper; class MapWildListEncounterWrapper; class POKESCRIPTING_EXPORT MapWildListWrapper : public ObjectWrapper @@ -35,21 +36,16 @@ class POKESCRIPTING_EXPORT MapWildListWrapper : public ObjectWrapper Q_OBJECT public: - static MapWildListWrapper* create(const Pokemod::MapWildList* wildList, QObject* parent) - { - if (!m_instances.contains(wildList->id())) - m_instances[wildList->id()] = new MapWildListWrapper(wildList, parent); - return qobject_cast<MapWildListWrapper*>(m_instances[wildList->id()]); - } + static MapWildListWrapper* create(const Pokemod::MapWildList* wildList, MapWrapper* parent); Pokemod::Hat<MapWildListEncounterWrapper*> encounterHat(); - public slots: - QString name() const; - MapWildListEncounterWrapper* encounter(const int index); - int encounterCount() const; + Q_SCRIPTABLE QString name() const; + + Q_SCRIPTABLE MapWildListEncounterWrapper* encounter(const int index); + Q_SCRIPTABLE int encounterCount() const; private: - MapWildListWrapper(const Pokemod::MapWildList* wildList, QObject* parent); + MapWildListWrapper(const Pokemod::MapWildList* wildList, MapWrapper* parent); MapWildListWrapper& operator=(const MapWildListWrapper& rhs); const Pokemod::MapWildList* m_wildList; |
