summaryrefslogtreecommitdiffstats
path: root/pokescripting/TrainerWrapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pokescripting/TrainerWrapper.cpp')
-rw-r--r--pokescripting/TrainerWrapper.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/pokescripting/TrainerWrapper.cpp b/pokescripting/TrainerWrapper.cpp
index 7f19bfb1..d552070b 100644
--- a/pokescripting/TrainerWrapper.cpp
+++ b/pokescripting/TrainerWrapper.cpp
@@ -34,6 +34,19 @@ Pokescripting::TrainerWrapper::TrainerWrapper(const Pokemod::Trainer* trainer, P
{
}
+Pokemod::Trainer::Intelligence Pokescripting::TrainerWrapper::intelligence(const QString& name) const
+{
+ if (name == "Ignorant")
+ return Pokemod::Trainer::Ignorant;
+ else if (name == "Determine")
+ return Pokemod::Trainer::Determine;
+ else if (name == "Remember")
+ return Pokemod::Trainer::Remember;
+ else if (name == "Cheating")
+ return Pokemod::Trainer::Cheating;
+ return QVariant(-1).value<Pokemod::Trainer::Intelligence>();
+}
+
QString Pokescripting::TrainerWrapper::TrainerWrapper::name() const
{
return m_trainer->name();