diff options
Diffstat (limited to 'pokescripting/MoveWrapper.h')
| -rw-r--r-- | pokescripting/MoveWrapper.h | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/pokescripting/MoveWrapper.h b/pokescripting/MoveWrapper.h index cd5d0f43..c17ff555 100644 --- a/pokescripting/MoveWrapper.h +++ b/pokescripting/MoveWrapper.h @@ -34,25 +34,20 @@ class POKESCRIPTING_EXPORT MoveWrapper : public ObjectWrapper Q_OBJECT public: - static MoveWrapper* create(const Pokemod::Move* move, QObject* parent) - { - if (!m_instances.contains(move->id())) - m_instances[move->id()] = new MoveWrapper(move, parent); - return qobject_cast<MoveWrapper*>(m_instances[move->id()]); - } - public slots: - QString name() const; - Pokemod::Fraction accuracy() const; - int power() const; - TypeWrapper* type(); - bool special() const; - int powerPoints() const; - int priority() const; - QString description() const; - Pokemod::Script battleScript() const; - Pokemod::Script worldScript() const; + static MoveWrapper* create(const Pokemod::Move* move, PokemodWrapper* parent); + + Q_SCRIPTABLE QString name() const; + Q_SCRIPTABLE Pokemod::Fraction accuracy() const; + Q_SCRIPTABLE int power() const; + Q_SCRIPTABLE TypeWrapper* type(); + Q_SCRIPTABLE bool special() const; + Q_SCRIPTABLE int powerPoints() const; + Q_SCRIPTABLE int priority() const; + Q_SCRIPTABLE QString description() const; + Q_SCRIPTABLE Pokemod::Script battleScript() const; + Q_SCRIPTABLE Pokemod::Script worldScript() const; private: - MoveWrapper(const Pokemod::Move* move, QObject* parent); + MoveWrapper(const Pokemod::Move* move, PokemodWrapper* parent); MoveWrapper& operator=(const MoveWrapper& rhs); const Pokemod::Move* m_move; |
