summaryrefslogtreecommitdiffstats
path: root/pokemod/MapTrainer.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-01-23 04:50:24 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-01-23 04:50:24 +0000
commitef250617e8163c535931be045aa4e9d59163ace7 (patch)
tree5b76323ec66a63c3fca589b088b310c3fdaba2b7 /pokemod/MapTrainer.cpp
parentefa80ce427e40070e36e5ab86d2f6dbf4ad50648 (diff)
[FIX] Grammer in Changelog
[FIX] Made pokemod classes contain their names for later ease [ADD] PokéModr main window form [FIX] Ini and Exception includes fixed [FIX] BugCatcher bugs fixed [FIX] .pro files fixed [ADD] PokéModr main GUI almost complete git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@40 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/MapTrainer.cpp')
-rw-r--r--pokemod/MapTrainer.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/pokemod/MapTrainer.cpp b/pokemod/MapTrainer.cpp
index 14a964fc..01c5d5a9 100644
--- a/pokemod/MapTrainer.cpp
+++ b/pokemod/MapTrainer.cpp
@@ -31,7 +31,7 @@
#include "MapTrainer.h"
MapTrainer::MapTrainer(const Pokemod& par, const unsigned _id) :
- Object(par, _id),
+ Object("MapTrainer", par, _id),
name(""),
coordinate(0, 0),
skin(""),
@@ -48,13 +48,13 @@ MapTrainer::MapTrainer(const Pokemod& par, const unsigned _id) :
}
MapTrainer::MapTrainer(const Pokemod& par, const MapTrainer& t, const unsigned _id) :
- Object(par, _id)
+ Object("MapTrainer", par, _id)
{
*this = t;
}
MapTrainer::MapTrainer(const Pokemod& par, const QString& fname, const unsigned _id) :
- Object(par, _id)
+ Object("MapTrainer", par, _id)
{
load(fname, _id);
}
@@ -228,7 +228,7 @@ void MapTrainer::setCoordinateY(const unsigned y)
void MapTrainer::setSkin(const QString& s) throw(OpenException)
{
if (!QFile::exists(QString("%1/image/skin/%2.png").arg(pokemod.getPath()).arg(s)))
- throw(OpenException("MapTrainer", QString("%1/image/skin/%2.png").arg(pokemod.getPath()).arg(s)));
+ throw(OpenException(className, QString("%1/image/skin/%2.png").arg(pokemod.getPath()).arg(s)));
skin = s;
}
@@ -240,21 +240,21 @@ void MapTrainer::setSight(const unsigned s)
void MapTrainer::setDirection(const unsigned d) throw(BoundsException)
{
if (D_End_None <= d)
- throw(BoundsException("MapTrainer", "direction"));
+ throw(BoundsException(className, "direction"));
direction = d;
}
void MapTrainer::setNumFight(const unsigned n) throw(BoundsException)
{
if (!n || (pokemod.getRules().getMaxFight() < n))
- throw(BoundsException("MapTrainer", "numFight"));
+ throw(BoundsException(className, "numFight"));
numFight = n;
}
void MapTrainer::setAI(const QString& a) throw(OpenException)
{
if (!QFile::exists(QString("%1/ai/%2.pai").arg(pokemod.getPath()).arg(a)))
- throw(OpenException("MapTrainer", QString("%1/ai/%2.pai").arg(pokemod.getPath()).arg(a)));
+ throw(OpenException(className, QString("%1/ai/%2.pai").arg(pokemod.getPath()).arg(a)));
ai = a;
}
@@ -276,28 +276,28 @@ void MapTrainer::setAppearFlagStatus(const unsigned s)
void MapTrainer::setOverworldDialog(const unsigned o) throw(BoundsException)
{
if (pokemod.getDialogIndex(o) == UINT_MAX)
- throw(BoundsException("MapTrainer", "overworldDialog"));
+ throw(BoundsException(className, "overworldDialog"));
overworldDialog = o;
}
void MapTrainer::setWinDialog(const unsigned w) throw(BoundsException)
{
if (pokemod.getDialogIndex(w) == UINT_MAX)
- throw(BoundsException("MapTrainer", "winDialog"));
+ throw(BoundsException(className, "winDialog"));
winDialog = w;
}
void MapTrainer::setLoseDialog(const unsigned l) throw(BoundsException)
{
if (pokemod.getDialogIndex(l) == UINT_MAX)
- throw(BoundsException("MapTrainer", "loseDialog"));
+ throw(BoundsException(className, "loseDialog"));
loseDialog = l;
}
void MapTrainer::setLeadTeamMember(const unsigned l) throw(BoundsException)
{
if (getTeamMemberCount() <= l)
- throw(BoundsException("MapTrainer", "leadTeamMember"));
+ throw(BoundsException(className, "leadTeamMember"));
leadTeamMember = l;
}
@@ -364,14 +364,14 @@ unsigned MapTrainer::getLeadTeamMember() const
const MapTrainerTeamMember& MapTrainer::getTeamMember(const unsigned i) const throw(IndexException)
{
if (getTeamMemberCount() <= i)
- throw(IndexException("MapTrainer"));
+ throw(IndexException(className));
return teamMembers.at(i);
}
MapTrainerTeamMember& MapTrainer::getTeamMember(const unsigned i) throw(IndexException)
{
if (getTeamMemberCount() <= i)
- throw(IndexException("MapTrainer"));
+ throw(IndexException(className));
return teamMembers[i];
}
@@ -421,7 +421,7 @@ MapTrainerTeamMember& MapTrainer::newTeamMember(const MapTrainerTeamMember& p)
void MapTrainer::deleteTeamMember(const unsigned i) throw(IndexException)
{
if (getTeamMemberCount() <= i)
- throw(IndexException("MapTrainer"));
+ throw(IndexException(className));
teamMembers.removeAt(i);
}