From a1fff27395d1930820e6c007fdedd8e9dc58f0b3 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Mon, 21 Jan 2008 17:13:11 +0000 Subject: [FIX] PokeMod namespace removed [ADD] MoveEffect editing form for PokéModr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@38 6ecfd1a5-f3ed-3746-8530-beee90d26b22 --- pokemod/Nature.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'pokemod/Nature.cpp') diff --git a/pokemod/Nature.cpp b/pokemod/Nature.cpp index 02b434ad..1c6fc06d 100644 --- a/pokemod/Nature.cpp +++ b/pokemod/Nature.cpp @@ -24,7 +24,7 @@ #include "Pokemod.h" #include "Nature.h" -PokeMod::Nature::Nature(const Pokemod& par, const unsigned _id) : +Nature::Nature(const Pokemod& par, const unsigned _id) : Object(par, _id), name(""), weight(1) @@ -33,19 +33,19 @@ PokeMod::Nature::Nature(const Pokemod& par, const unsigned _id) : stats[i].set(1, 1, Frac::Improper); } -PokeMod::Nature::Nature(const Pokemod& par, const Nature& n, const unsigned _id) : +Nature::Nature(const Pokemod& par, const Nature& n, const unsigned _id) : Object(par, _id) { *this = n; } -PokeMod::Nature::Nature(const Pokemod& par, const QString& fname, const unsigned _id) : +Nature::Nature(const Pokemod& par, const QString& fname, const unsigned _id) : Object(par, _id) { load(fname, _id); } -bool PokeMod::Nature::validate() const +bool Nature::validate() const { bool valid = true; pokemod.validationMsg(QString("---Nature \"%1\" with id %2---").arg(name).arg(id), Pokemod::V_Msg); @@ -62,7 +62,7 @@ bool PokeMod::Nature::validate() const return valid; } -void PokeMod::Nature::load(const QString& fname, const unsigned _id) throw(Exception) +void Nature::load(const QString& fname, const unsigned _id) throw(Exception) { Ini ini(fname); if (_id == UINT_MAX) @@ -81,7 +81,7 @@ void PokeMod::Nature::load(const QString& fname, const unsigned _id) throw(Excep ini.getValue("weight", weight); } -void PokeMod::Nature::save() const throw(Exception) +void Nature::save() const throw(Exception) { Ini ini; ini.addField("name", name); @@ -94,57 +94,57 @@ void PokeMod::Nature::save() const throw(Exception) ini.save(QString("%1/nature/%2.pini").arg(pokemod.getPath()).arg(name)); } -void PokeMod::Nature::setName(const QString& n) +void Nature::setName(const QString& n) { name = n; } -void PokeMod::Nature::setStat(const unsigned s, const unsigned n, const unsigned d) throw(Exception) +void Nature::setStat(const unsigned s, const unsigned n, const unsigned d) throw(Exception) { if ((pokemod.getRules().getSpecialSplit() ? ST_End_GSC : ST_End_RBY) <= s) throw(BoundsException("Nature", "stat")); stats[s].set(n, d); } -void PokeMod::Nature::setStatNum(const unsigned s, const unsigned n) throw(Exception) +void Nature::setStatNum(const unsigned s, const unsigned n) throw(Exception) { if ((pokemod.getRules().getSpecialSplit() ? ST_End_GSC : ST_End_RBY) <= s) throw(BoundsException("Nature", "stat")); stats[s].setNum(n); } -void PokeMod::Nature::setStatDenom(const unsigned s, const unsigned d) throw(Exception) +void Nature::setStatDenom(const unsigned s, const unsigned d) throw(Exception) { if ((pokemod.getRules().getSpecialSplit() ? ST_End_GSC : ST_End_RBY) <= s) throw(BoundsException("Nature", "stat")); stats[s].setDenom(d); } -void PokeMod::Nature::setWeight(const unsigned w) throw(BoundsException) +void Nature::setWeight(const unsigned w) throw(BoundsException) { if (!w) throw(BoundsException("Nature", "weight")); weight = w; } -QString PokeMod::Nature::getName() const +QString Nature::getName() const { return name; } -Frac PokeMod::Nature::getStat(const unsigned s) const throw(BoundsException) +Frac Nature::getStat(const unsigned s) const throw(BoundsException) { if ((pokemod.getRules().getSpecialSplit() ? ST_End_GSC : ST_End_RBY) <= s) throw(BoundsException("Nature", "stat")); return stats[s]; } -unsigned PokeMod::Nature::getWeight() const +unsigned Nature::getWeight() const { return weight; } -PokeMod::Nature& PokeMod::Nature::operator=(const Nature& rhs) +Nature& Nature::operator=(const Nature& rhs) { if (this == &rhs) return *this; -- cgit