diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2007-06-02 18:12:48 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2007-06-02 18:12:48 +0000 |
| commit | c9afda3ab74614fb36986f96b7972c082f275eca (patch) | |
| tree | 1b7c0b31950597d6ed562d94158dd3f8701496da /pokemod/PokemonNature.cpp | |
| parent | f71140fae5218ee9839ffcd4ec83abfded5124f4 (diff) | |
Finished off all PokeMod classes, added move validations, fixed up some GUI, various other fixes
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@18 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/PokemonNature.cpp')
| -rw-r--r-- | pokemod/PokemonNature.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pokemod/PokemonNature.cpp b/pokemod/PokemonNature.cpp index 4987ee01..27c402a0 100644 --- a/pokemod/PokemonNature.cpp +++ b/pokemod/PokemonNature.cpp @@ -25,11 +25,11 @@ extern PokeGen::PokeMod::Pokemod curPokeMod;
-PokeGen::PokeMod::PokemonNature::PokemonNature(const unsigned _id)
+PokeGen::PokeMod::PokemonNature::PokemonNature(const unsigned _id) :
+ nature(UINT_MAX),
+ weight(1)
{
LogCtor("PokemonNature", _id);
- nature = UINT_MAX;
- weight = 1;
id = _id;
}
@@ -87,7 +87,7 @@ void PokeGen::PokeMod::PokemonNature::ImportIni(Ini &ini, const unsigned _id) LogImportStart("PokemonNature");
if (_id == UINT_MAX)
{
- ini.GetValue("id", id, UINT_MAX);
+ ini.GetValue("id", id);
// Was there an id associated with the element?
if (id == UINT_MAX)
LogIdNotFound("PokemonNature");
@@ -121,7 +121,7 @@ void PokeGen::PokeMod::PokemonNature::SetNature(const unsigned n) void PokeGen::PokeMod::PokemonNature::SetNature(const String &n)
{
LogSetVar("PokemonNature", id, "nature", n);
- if (Nature *temp = curPokeMod.GetNature(n))
+ if (const Nature *temp = curPokeMod.GetNature(n))
nature = temp->GetId();
}
@@ -141,7 +141,7 @@ unsigned PokeGen::PokeMod::PokemonNature::GetNature() const PokeGen::PokeMod::String PokeGen::PokeMod::PokemonNature::GetNatureString() const
{
LogFetchVar("PokemonNature", id, "nature string", nature);
- if (Nature *n = curPokeMod.GetNature(nature))
+ if (const Nature *n = curPokeMod.GetNature(nature))
return n->GetName();
return "";
}
|
