diff options
Diffstat (limited to 'pokemod/CoinListObject.cpp')
-rw-r--r-- | pokemod/CoinListObject.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/pokemod/CoinListObject.cpp b/pokemod/CoinListObject.cpp index 9e083638..74f09878 100644 --- a/pokemod/CoinListObject.cpp +++ b/pokemod/CoinListObject.cpp @@ -22,9 +22,9 @@ #include "CoinListObject.h" -const char* PokeGen::PokeMod::CoinListObject::TypeStr[PokeGen::PokeMod::CoinListObject::End] = {"Item", "Pokémon"}; +const char* PokeMod::CoinListObject::TypeStr[PokeMod::CoinListObject::End] = {"Item", "Pokémon"}; -PokeGen::PokeMod::CoinListObject::CoinListObject(const Pokemod& par, const unsigned _id) : +PokeMod::CoinListObject::CoinListObject(const Pokemod& par, const unsigned _id) : Object(par, _id), type(Item), object(UINT_MAX), @@ -33,19 +33,19 @@ PokeGen::PokeMod::CoinListObject::CoinListObject(const Pokemod& par, const unsig { } -PokeGen::PokeMod::CoinListObject::CoinListObject(const Pokemod& par, const CoinListObject& o, const unsigned _id) : +PokeMod::CoinListObject::CoinListObject(const Pokemod& par, const CoinListObject& o, const unsigned _id) : Object(par, _id) { *this = o; } -PokeGen::PokeMod::CoinListObject::CoinListObject(const Pokemod& par, const QString& fname, const unsigned _id) : +PokeMod::CoinListObject::CoinListObject(const Pokemod& par, const QString& fname, const unsigned _id) : Object(par, _id) { load(fname, _id); } -bool PokeGen::PokeMod::CoinListObject::validate() const +bool PokeMod::CoinListObject::validate() const { bool valid = true; pokemod.validationMsg(QString("------Object with id %1---").arg(id), Pokemod::V_Msg); @@ -78,7 +78,7 @@ bool PokeGen::PokeMod::CoinListObject::validate() const return valid; } -void PokeGen::PokeMod::CoinListObject::load(const QString& fname, const unsigned _id) throw(Exception) +void PokeMod::CoinListObject::load(const QString& fname, const unsigned _id) throw(Exception) { Ini ini(fname); if (_id == UINT_MAX) @@ -91,7 +91,7 @@ void PokeGen::PokeMod::CoinListObject::load(const QString& fname, const unsigned ini.getValue("cost", cost, 0); } -void PokeGen::PokeMod::CoinListObject::save(const QString& coinList) const throw(Exception) +void PokeMod::CoinListObject::save(const QString& coinList) const throw(Exception) { Ini ini; ini.addField("id", id); @@ -102,7 +102,7 @@ void PokeGen::PokeMod::CoinListObject::save(const QString& coinList) const throw ini.save(QString("%1/coinlist/%2/item/%3.pini").arg(pokemod.getPath()).arg(coinList).arg(id)); } -void PokeGen::PokeMod::CoinListObject::setType(const unsigned t) throw(BoundsException) +void PokeMod::CoinListObject::setType(const unsigned t) throw(BoundsException) { if (End <= t) throw(BoundsException("CoinListObject", "type")); @@ -110,46 +110,46 @@ void PokeGen::PokeMod::CoinListObject::setType(const unsigned t) throw(BoundsExc object = UINT_MAX; } -void PokeGen::PokeMod::CoinListObject::setObject(const unsigned o) throw(BoundsException) +void PokeMod::CoinListObject::setObject(const unsigned o) throw(BoundsException) { if (((type == Item) && (pokemod.getItemByID(object) == UINT_MAX)) || ((type == Pokemon) && (pokemod.getSpeciesByID(object) == UINT_MAX))) throw(BoundsException("CoinListObject", "object")); object = o; } -void PokeGen::PokeMod::CoinListObject::setAmount(const unsigned a) throw(BoundsException) +void PokeMod::CoinListObject::setAmount(const unsigned a) throw(BoundsException) { if (!a) throw(BoundsException("CoinListObject", "amount")); amount = a; } -void PokeGen::PokeMod::CoinListObject::setCost(const unsigned c) +void PokeMod::CoinListObject::setCost(const unsigned c) { cost = c; } -unsigned PokeGen::PokeMod::CoinListObject::getType() const +unsigned PokeMod::CoinListObject::getType() const { return type; } -unsigned PokeGen::PokeMod::CoinListObject::getObject() const +unsigned PokeMod::CoinListObject::getObject() const { return object; } -unsigned PokeGen::PokeMod::CoinListObject::getAmount() const +unsigned PokeMod::CoinListObject::getAmount() const { return amount; } -unsigned PokeGen::PokeMod::CoinListObject::getCost() const +unsigned PokeMod::CoinListObject::getCost() const { return cost; } -PokeGen::PokeMod::CoinListObject& PokeGen::PokeMod::CoinListObject::operator=(const CoinListObject& rhs) +PokeMod::CoinListObject& PokeMod::CoinListObject::operator=(const CoinListObject& rhs) { if (this == &rhs) return *this; |