summaryrefslogtreecommitdiffstats
path: root/pokescripting/TrainerWrapper.h
diff options
context:
space:
mode:
Diffstat (limited to 'pokescripting/TrainerWrapper.h')
-rw-r--r--pokescripting/TrainerWrapper.h29
1 files changed, 12 insertions, 17 deletions
diff --git a/pokescripting/TrainerWrapper.h b/pokescripting/TrainerWrapper.h
index e55497cb..da84fdbb 100644
--- a/pokescripting/TrainerWrapper.h
+++ b/pokescripting/TrainerWrapper.h
@@ -34,24 +34,19 @@ class POKESCRIPTING_EXPORT TrainerWrapper : public ObjectWrapper
Q_OBJECT
public:
- static TrainerWrapper* create(const Pokemod::Trainer* trainer, QObject* parent)
- {
- if (!m_instances.contains(trainer->id()))
- m_instances[trainer->id()] = new TrainerWrapper(trainer, parent);
- return qobject_cast<TrainerWrapper*>(m_instances[trainer->id()]);
- }
- public slots:
- QString name() const;
- int moneyFactor() const;
- SkinWrapper* skin();
- int depth() const;
- int teamIntel() const;
- int moveIntel() const;
- int itemIntel() const;
- int abilityIntel() const;
- int statIntel() const;
+ static TrainerWrapper* create(const Pokemod::Trainer* trainer, PokemodWrapper* parent);
+
+ Q_SCRIPTABLE QString name() const;
+ Q_SCRIPTABLE int moneyFactor() const;
+ Q_SCRIPTABLE SkinWrapper* skin();
+ Q_SCRIPTABLE int depth() const;
+ Q_SCRIPTABLE Pokemod::Trainer::Intelligence teamIntel() const;
+ Q_SCRIPTABLE Pokemod::Trainer::Intelligence moveIntel() const;
+ Q_SCRIPTABLE Pokemod::Trainer::Intelligence itemIntel() const;
+ Q_SCRIPTABLE Pokemod::Trainer::Intelligence abilityIntel() const;
+ Q_SCRIPTABLE Pokemod::Trainer::Intelligence statIntel() const;
private:
- TrainerWrapper(const Pokemod::Trainer* trainer, QObject* parent);
+ TrainerWrapper(const Pokemod::Trainer* trainer, PokemodWrapper* parent);
TrainerWrapper& operator=(const TrainerWrapper& rhs);
const Pokemod::Trainer* m_trainer;