diff options
Diffstat (limited to 'pokemod/MapTrainer.cpp')
| -rw-r--r-- | pokemod/MapTrainer.cpp | 28 |
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); } |
