summaryrefslogtreecommitdiffstats
path: root/pokemod/MapTrainerTeam.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2007-05-29 01:02:16 +0000
committerBen Boeckel <MathStuf@gmail.com>2007-05-29 01:02:16 +0000
commit9e28e6ecd358a9801ad25914d3e8cca7b6d7f4f7 (patch)
tree8f200e87bc1fa3f1bbd2152dad0e62924c33ae12 /pokemod/MapTrainerTeam.cpp
parentdc9682d704118840457aa3434711eba6e003eafc (diff)
downloadsigen-9e28e6ecd358a9801ad25914d3e8cca7b6d7f4f7.tar.gz
sigen-9e28e6ecd358a9801ad25914d3e8cca7b6d7f4f7.tar.xz
sigen-9e28e6ecd358a9801ad25914d3e8cca7b6d7f4f7.zip
Lots of minor fixes, added TODO file, Move methods
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@16 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/MapTrainerTeam.cpp')
-rw-r--r--pokemod/MapTrainerTeam.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/pokemod/MapTrainerTeam.cpp b/pokemod/MapTrainerTeam.cpp
index f9b3e781..239210bb 100644
--- a/pokemod/MapTrainerTeam.cpp
+++ b/pokemod/MapTrainerTeam.cpp
@@ -53,20 +53,17 @@ void PokeGen::PokeMod::MapTrainerTeam::Validate()
LogValidateStart("MapTrainerTeam", id);
if (!curPokeMod.GetPokemon(species))
{
- LogVarNotValid("MapTrainerTeam", id, "species", species);
- output.Append(ConsoleLogVarNotValid("MapTrainerTeam", id, "species", species));
+ LogVarNotValid("MapTrainerTeam", id, "species");
isValid = false;
}
if (curPokeMod.GetMaxLevel() <= level)
{
- LogVarOutOfRange("MapTrainerTeam", id, "level", level, GetSpeciesString());
- output.Append(ConsoleLogVarOutOfRange("MapTrainerTeam", id, "level", level, GetSpeciesString()));
+ LogOutOfRange("MapTrainerTeam", id, "level", level, GetSpeciesString());
isValid = false;
}
if ((item != -1) && !curPokeMod.GetItem(item))
{
- LogVarNotValid("MapTrainerTeam", id, "item", item);
- output.Append(ConsoleLogVarNotValid("MapTrainerTeam", id, "item", item));
+ LogVarNotValid("MapTrainerTeam", id, "item");
isValid = false;
}
LogValidateOver("MapTrainerTeam", id, isValid, GetSpeciesString());
@@ -117,7 +114,7 @@ void PokeGen::PokeMod::MapTrainerTeam::ImportIni(Ini &ini, const unsigned _id)
LogImportOver("MapTrainerTeam", id);
}
-void PokeGen::PokeMod::MapTrainerTeam::ExportIni(Ini &ini, const String &map, const unsigned trainerId) const
+void PokeGen::PokeMod::MapTrainerTeam::ExportIni(std::ofstream &fout, const String &map, const unsigned trainerId) const
{
LogExportStart("MapTrainerTeam", id);
// Make elements
@@ -161,8 +158,8 @@ void PokeGen::PokeMod::MapTrainerTeam::SetItem(const int i)
void PokeGen::PokeMod::MapTrainerTeam::SetItem(const String &i)
{
LogSetVar("MapTrainerTeam", id, "item string", i, GetSpeciesString());
- if (Item *item = curPokeMod.GetItem(i))
- item = item->GetId();
+ if (Item *temp = curPokeMod.GetItem(i))
+ item = temp->GetId();
}
int PokeGen::PokeMod::MapTrainerTeam::GetSpecies() const
@@ -181,13 +178,13 @@ PokeGen::PokeMod::String PokeGen::PokeMod::MapTrainerTeam::GetSpeciesString() co
unsigned PokeGen::PokeMod::MapTrainerTeam::GetLevel() const
{
- LogFetchVar("MapTrainerTeam", id, "level", level, GetSpeceisString());
+ LogFetchVar("MapTrainerTeam", id, "level", level, GetSpeciesString());
return level;
}
int PokeGen::PokeMod::MapTrainerTeam::GetItem() const
{
- LogFetchVar("MapTrainerTeam", id, "item", item, GetSpeceisString());
+ LogFetchVar("MapTrainerTeam", id, "item", item, GetSpeciesString());
return item;
}