summaryrefslogtreecommitdiffstats
path: root/sigscript/TrainerWrapper.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-09-07 18:49:29 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-09-07 18:49:29 +0000
commitf80268eb885e28c603cc88523cfce2751d1448e1 (patch)
treed3e0a8b482f7d2a4bd177ecc300aa407177a42de /sigscript/TrainerWrapper.cpp
parent48f9e57b1638ba047ca2dcd6d3251ee90bf9ef69 (diff)
downloadsigen-f80268eb885e28c603cc88523cfce2751d1448e1.tar.gz
sigen-f80268eb885e28c603cc88523cfce2751d1448e1.tar.xz
sigen-f80268eb885e28c603cc88523cfce2751d1448e1.zip
[FIX] Added a static poll method to Fraction
[FIX] More Arena stuff fleshed out [FIX] Added priority scripts to Ability and Move [FIX] A SigmodWrapper pointer is now passed around the containments [FIX] Config now has templated methods for retrieving values git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@253 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'sigscript/TrainerWrapper.cpp')
-rw-r--r--sigscript/TrainerWrapper.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/sigscript/TrainerWrapper.cpp b/sigscript/TrainerWrapper.cpp
index 7d60be1e..bc937058 100644
--- a/sigscript/TrainerWrapper.cpp
+++ b/sigscript/TrainerWrapper.cpp
@@ -54,8 +54,8 @@ QString Sigscript::TrainerWrapper::TrainerWrapper::name() const
int Sigscript::TrainerWrapper::TrainerWrapper::moneyFactor() const
{
- if (value("moneyFactor").canConvert<int>())
- return value("moneyFactor").toInt();
+ if (hasValueOfType<int>("moneyFactor"))
+ return valueOfType<int>("moneyFactor");
return m_trainer->moneyFactor();
}
@@ -66,8 +66,8 @@ Sigscript::SkinWrapper* Sigscript::TrainerWrapper::TrainerWrapper::skin()
int Sigscript::TrainerWrapper::TrainerWrapper::depth() const
{
- if (value("depth").canConvert<int>())
- return value("depth").toInt();
+ if (hasValueOfType<int>("depth"))
+ return valueOfType<int>("depth");
return m_trainer->depth();
}