diff options
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 "";
}
|
