summaryrefslogtreecommitdiffstats
path: root/pokemod/MapWildListPokemon.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-01-17 03:47:44 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-01-17 03:47:44 +0000
commit1d639b92a4487b21a29127f4fbe91d5b1d5d1952 (patch)
treede34b6b0e054dbac5e60d844f55d45f8abe7b517 /pokemod/MapWildListPokemon.cpp
parent9ee13595462364eb9e48762778f8b3842f4b4026 (diff)
[FIX] Added 2008 to copyrights
[FIX] Made exceptions better [FIX] Added RBY Move Effects (as well as val1 and val2 code) [FIX] Added breaks where missed [FIX] Grammar mistakes (factored out to Exceptions) [FIX] Cleaned up Species types and egg groups handling [FIX] Cleaned up Store items handling [FIX] Cleaned up Tile details git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@31 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/MapWildListPokemon.cpp')
-rw-r--r--pokemod/MapWildListPokemon.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/pokemod/MapWildListPokemon.cpp b/pokemod/MapWildListPokemon.cpp
index 8112becb..23ac9625 100644
--- a/pokemod/MapWildListPokemon.cpp
+++ b/pokemod/MapWildListPokemon.cpp
@@ -4,7 +4,7 @@
// Author: Ben Boeckel
// Modified by: Ben Boeckel
// Created: Tue Mar 20 18:50:59 2007
-// Copyright: ©2007 Ben Boeckel and Nerdy Productions
+// Copyright: ©2007-2008 Ben Boeckel and Nerdy Productions
// Licence:
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -64,7 +64,7 @@ bool PokeGen::PokeMod::MapWildListPokemon::validate() const
return valid;
}
-void PokeGen::PokeMod::MapWildListPokemon::load(const QString& fname, const unsigned _id)
+void PokeGen::PokeMod::MapWildListPokemon::load(const QString& fname, const unsigned _id) throw(Exception)
{
Ini ini(fname);
if (_id == UINT_MAX)
@@ -76,7 +76,7 @@ void PokeGen::PokeMod::MapWildListPokemon::load(const QString& fname, const unsi
ini.getValue("weight", weight, 1);
}
-void PokeGen::PokeMod::MapWildListPokemon::save(const QString& map, const unsigned listId) const
+void PokeGen::PokeMod::MapWildListPokemon::save(const QString& map, const unsigned listId) const throw(Exception)
{
Ini ini;
ini.addField("id", id);
@@ -86,24 +86,24 @@ void PokeGen::PokeMod::MapWildListPokemon::save(const QString& map, const unsign
ini.save(QString("%1/map/%2/wildlist/%3/pokemon/%4.pini").arg(pokemod.getPath()).arg(map).arg(listId).arg(id));
}
-void PokeGen::PokeMod::MapWildListPokemon::setSpecies(const unsigned s)
+void PokeGen::PokeMod::MapWildListPokemon::setSpecies(const unsigned s) throw(BoundsException)
{
if (pokemod.getSpeciesByID(s) == UINT_MAX)
- throw("MapWildListPokemon: species out-of-bounds");
+ throw(BoundsException("MapWildListPokemon", "species"));
species = s;
}
-void PokeGen::PokeMod::MapWildListPokemon::setLevel(const unsigned l)
+void PokeGen::PokeMod::MapWildListPokemon::setLevel(const unsigned l) throw(BoundsException)
{
if (!level || (pokemod.getRules().getMaxLevel() <= level))
- throw("MapWildLIstPokemon: level out-of-bounds");
+ throw(BoundsException("MapWildListPokemon", "level"));
level = l;
}
-void PokeGen::PokeMod::MapWildListPokemon::setWeight(const unsigned w)
+void PokeGen::PokeMod::MapWildListPokemon::setWeight(const unsigned w) throw(BoundsException)
{
if (!w)
- throw("MpWildList: weight out-of-bounds");
+ throw(BoundsException("MapWildListPokemon", "weight"));
weight = w;
}