summaryrefslogtreecommitdiffstats
path: root/pokemod/SpeciesEvolution.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-02-23 19:32:19 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-02-23 19:32:19 +0000
commit327cb610e065d9e02f176078b064c2780bb1ec03 (patch)
tree785b48e118be4812d1555302a909b15197c8fa5f /pokemod/SpeciesEvolution.cpp
parentaa1b8ec37833c1b538666f3fab1d426dd18f2907 (diff)
downloadsigen-327cb610e065d9e02f176078b064c2780bb1ec03.tar.gz
sigen-327cb610e065d9e02f176078b064c2780bb1ec03.tar.xz
sigen-327cb610e065d9e02f176078b064c2780bb1ec03.zip
[ADD] MapWarpUI.{h, cpp} added to repo
[ADD] MapWildListEncounter.{h, cpp} [ADD] Flag setting in UI forms a less work [FIX] Scope setting in MapWildList better [FIX] SpeciesUI form elements now disabled if not available git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@76 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/SpeciesEvolution.cpp')
-rw-r--r--pokemod/SpeciesEvolution.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/pokemod/SpeciesEvolution.cpp b/pokemod/SpeciesEvolution.cpp
index 28e53dbf..feba5543 100644
--- a/pokemod/SpeciesEvolution.cpp
+++ b/pokemod/SpeciesEvolution.cpp
@@ -80,10 +80,7 @@ bool SpeciesEvolution::validate() const
else
{
for (int i = 0; (i < pokemod->getItemByID(val1)->getEffectCount()) && !ok; ++i)
- {
- if (pokemod->getItemByID(val1)->getEffect(i)->getEffect() == ItemEffect::E_Evolution)
- ok = true;
- }
+ ok = (pokemod->getItemByID(val1)->getEffect(i)->getEffect() == ItemEffect::E_Evolution);
}
break;
}
@@ -181,10 +178,7 @@ void SpeciesEvolution::setVal1(const int v1) throw(Exception)
if (pokemod->getItemIndex(v1) == -1)
throw(BoundsException(className, "val1"));
for (int i = 0; (i < pokemod->getItemByID(v1)->getEffectCount()) && !ok; ++i)
- {
- if (pokemod->getItemByID(v1)->getEffect(i)->getEffect() == ItemEffect::E_Evolution)
- ok = true;
- }
+ ok = (pokemod->getItemByID(v1)->getEffect(i)->getEffect() == ItemEffect::E_Evolution);
if (!ok)
throw(BoundsException(className, "val1"));
break;