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/PokemonEvolution.cpp | |
| parent | f71140fae5218ee9839ffcd4ec83abfded5124f4 (diff) | |
| download | sigen-c9afda3ab74614fb36986f96b7972c082f275eca.tar.gz sigen-c9afda3ab74614fb36986f96b7972c082f275eca.tar.xz sigen-c9afda3ab74614fb36986f96b7972c082f275eca.zip | |
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/PokemonEvolution.cpp')
| -rw-r--r-- | pokemod/PokemonEvolution.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/pokemod/PokemonEvolution.cpp b/pokemod/PokemonEvolution.cpp index 26a40fdc..92ef1a8c 100644 --- a/pokemod/PokemonEvolution.cpp +++ b/pokemod/PokemonEvolution.cpp @@ -25,14 +25,14 @@ extern PokeGen::PokeMod::Pokemod curPokeMod;
-PokeGen::PokeMod::PokemonEvolution::PokemonEvolution(const unsigned _id)
+PokeGen::PokeMod::PokemonEvolution::PokemonEvolution(const unsigned _id) :
+ species(UINT_MAX),
+ style(UINT_MAX),
+ level(0),
+ item(UINT_MAX),
+ happiness(0)
{
LogCtor("PokemonEvolution", _id);
- species = UINT_MAX;
- style = UINT_MAX;
- level = 0;
- item = UINT_MAX;
- happiness = 0;
id = _id;
}
@@ -112,7 +112,7 @@ void PokeGen::PokeMod::PokemonEvolution::ImportIni(Ini &ini, const unsigned _id) LogImportStart("PokemonEvolution");
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("PokemonEvolution");
@@ -152,7 +152,7 @@ void PokeGen::PokeMod::PokemonEvolution::SetSpecies(const unsigned s) void PokeGen::PokeMod::PokemonEvolution::SetSpecies(const String &s)
{
LogSetVar("PokemonEvolution", id, "species", s);
- if (Pokemon *temp = curPokeMod.GetPokemon(s))
+ if (const Pokemon *temp = curPokeMod.GetPokemon(s))
species = temp->GetId();
}
@@ -180,7 +180,7 @@ void PokeGen::PokeMod::PokemonEvolution::SetItem(const unsigned i) void PokeGen::PokeMod::PokemonEvolution::SetItem(const String &i)
{
LogSetVar("PokemonEvolution", id, "item", i);
- if (Item *temp = curPokeMod.GetItem(i))
+ if (const Item *temp = curPokeMod.GetItem(i))
item = temp->GetId();
}
@@ -199,7 +199,7 @@ unsigned PokeGen::PokeMod::PokemonEvolution::GetSpecies() const PokeGen::PokeMod::String PokeGen::PokeMod::PokemonEvolution::GetSpeciesString() const
{
LogFetchVar("PokemonEvolution", id, "species string", species);
- if (Pokemon *s = curPokeMod.GetPokemon(species))
+ if (const Pokemon *s = curPokeMod.GetPokemon(species))
return s->GetName();
return "";
}
@@ -233,7 +233,7 @@ unsigned PokeGen::PokeMod::PokemonEvolution::GetItem() const PokeGen::PokeMod::String PokeGen::PokeMod::PokemonEvolution::GetItemString() const
{
LogFetchVar("PokemonEvolution", id, "item string", item);
- if (Item *i = curPokeMod.GetItem(item))
+ if (const Item *i = curPokeMod.GetItem(item))
return i->GetName();
return "";
}
|
