diff options
Diffstat (limited to 'pokemod/MapWildList.cpp')
| -rw-r--r-- | pokemod/MapWildList.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/pokemod/MapWildList.cpp b/pokemod/MapWildList.cpp index 8c85c72b..b55e06c2 100644 --- a/pokemod/MapWildList.cpp +++ b/pokemod/MapWildList.cpp @@ -31,9 +31,9 @@ #include "ItemEffect.h" #include "MapWildList.h" -const QStringList PokeMod::MapWildList::ControlStr = QStringList() << "Grass" << "Surfing" << "Fishing" << "Dive" << "Headbutt" << "Rock Smash"; +const QStringList MapWildList::ControlStr = QStringList() << "Grass" << "Surfing" << "Fishing" << "Dive" << "Headbutt" << "Rock Smash"; -PokeMod::MapWildList::MapWildList(const Pokemod& par, const unsigned _id) : +MapWildList::MapWildList(const Pokemod& par, const unsigned _id) : Object(par, _id), control(UINT_MAX), value(INT_MAX), @@ -41,19 +41,19 @@ PokeMod::MapWildList::MapWildList(const Pokemod& par, const unsigned _id) : { } -PokeMod::MapWildList::MapWildList(const Pokemod& par, const MapWildList& w, const unsigned _id) : +MapWildList::MapWildList(const Pokemod& par, const MapWildList& w, const unsigned _id) : Object(par, _id) { *this = w; } -PokeMod::MapWildList::MapWildList(const Pokemod& par, const QString& fname, const unsigned _id) : +MapWildList::MapWildList(const Pokemod& par, const QString& fname, const unsigned _id) : Object(par, _id) { load(fname, _id); } -bool PokeMod::MapWildList::validate() const +bool MapWildList::validate() const { bool valid = true; pokemod.validationMsg(QString("------Wild List with id %1---").arg(id), Pokemod::V_Msg); @@ -117,7 +117,7 @@ bool PokeMod::MapWildList::validate() const return valid; } -unsigned PokeMod::MapWildList::getNewId() const +unsigned MapWildList::getNewId() const { unsigned i = 0; for (; (i < getEncounterCount()) && (getEncounterIndex(i) != UINT_MAX); ++i) @@ -125,7 +125,7 @@ unsigned PokeMod::MapWildList::getNewId() const return i; } -void PokeMod::MapWildList::load(const QString& fname, const unsigned _id) throw(Exception) +void MapWildList::load(const QString& fname, const unsigned _id) throw(Exception) { Ini ini(fname); if (_id == UINT_MAX) @@ -156,7 +156,7 @@ void PokeMod::MapWildList::load(const QString& fname, const unsigned _id) throw( } } -void PokeMod::MapWildList::save(const QString& map) const throw(Exception) +void MapWildList::save(const QString& map) const throw(Exception) { Ini ini; ini.addField("id", id); @@ -171,19 +171,19 @@ void PokeMod::MapWildList::save(const QString& map) const throw(Exception) i.next().save(map, id); } -void PokeMod::MapWildList::setControl(const unsigned c) throw(BoundsException) +void MapWildList::setControl(const unsigned c) throw(BoundsException) { if (End <= c) throw(BoundsException("MapWildList", "control")); control = c; } -void PokeMod::MapWildList::setValue(const unsigned v) +void MapWildList::setValue(const unsigned v) { value = v; } -void PokeMod::MapWildList::setTime(const unsigned ts, const bool t) throw(Exception) +void MapWildList::setTime(const unsigned ts, const bool t) throw(Exception) { for (QMutableListIterator<unsigned> i(times); i.hasNext(); ) { @@ -200,22 +200,22 @@ void PokeMod::MapWildList::setTime(const unsigned ts, const bool t) throw(Except times.append(ts); } -void PokeMod::MapWildList::setScope(const unsigned s) +void MapWildList::setScope(const unsigned s) { scope = s; } -unsigned PokeMod::MapWildList::getControl() const +unsigned MapWildList::getControl() const { return control; } -int PokeMod::MapWildList::getValue() const +int MapWildList::getValue() const { return value; } -bool PokeMod::MapWildList::getTime(const unsigned ts) const +bool MapWildList::getTime(const unsigned ts) const { for (QListIterator<unsigned> i(times); i.hasNext(); ) { @@ -225,36 +225,36 @@ bool PokeMod::MapWildList::getTime(const unsigned ts) const return false; } -int PokeMod::MapWildList::getScope() const +int MapWildList::getScope() const { return scope; } -const PokeMod::MapWildListEncounter& PokeMod::MapWildList::getEncounter(const unsigned i) const throw(IndexException) +const MapWildListEncounter& MapWildList::getEncounter(const unsigned i) const throw(IndexException) { if (getEncounterCount() <= i) throw(IndexException("MapWildList")); return encounters.at(i); } -PokeMod::MapWildListEncounter& PokeMod::MapWildList::getEncounter(const unsigned i) throw(IndexException) +MapWildListEncounter& MapWildList::getEncounter(const unsigned i) throw(IndexException) { if (getEncounterCount() <= i) throw(IndexException("MapWildList")); return encounters[i]; } -const PokeMod::MapWildListEncounter& PokeMod::MapWildList::getEncounterByID(const unsigned i) const throw(IndexException) +const MapWildListEncounter& MapWildList::getEncounterByID(const unsigned i) const throw(IndexException) { return getEncounter(getEncounterIndex(i)); } -PokeMod::MapWildListEncounter& PokeMod::MapWildList::getEncounterByID(const unsigned i) throw(IndexException) +MapWildListEncounter& MapWildList::getEncounterByID(const unsigned i) throw(IndexException) { return getEncounter(getEncounterIndex(i)); } -unsigned PokeMod::MapWildList::getEncounterIndex(const unsigned _id) const +unsigned MapWildList::getEncounterIndex(const unsigned _id) const { for (unsigned i = 0; i < getEncounterCount(); ++i) { @@ -264,37 +264,37 @@ unsigned PokeMod::MapWildList::getEncounterIndex(const unsigned _id) const return UINT_MAX; } -unsigned PokeMod::MapWildList::getEncounterCount() const +unsigned MapWildList::getEncounterCount() const { return encounters.size(); } -PokeMod::MapWildListEncounter& PokeMod::MapWildList::newEncounter() +MapWildListEncounter& MapWildList::newEncounter() { encounters.append(MapWildListEncounter(pokemod, getNewId())); return encounters[getEncounterCount() - 1]; } -PokeMod::MapWildListEncounter& PokeMod::MapWildList::newEncounter(const QString& fname) +MapWildListEncounter& MapWildList::newEncounter(const QString& fname) { encounters.append(MapWildListEncounter(pokemod, fname, getNewId())); return encounters[getEncounterCount() - 1]; } -PokeMod::MapWildListEncounter& PokeMod::MapWildList::newEncounter(const MapWildListEncounter& p) +MapWildListEncounter& MapWildList::newEncounter(const MapWildListEncounter& p) { encounters.append(MapWildListEncounter(pokemod, p, getNewId())); return encounters[getEncounterCount() - 1]; } -void PokeMod::MapWildList::deleteEncounter(const unsigned i) throw(IndexException) +void MapWildList::deleteEncounter(const unsigned i) throw(IndexException) { if (getEncounterCount() <= i) throw(IndexException("MapWildList")); encounters.removeAt(i); } -PokeMod::MapWildList& PokeMod::MapWildList::operator=(const MapWildList& rhs) +MapWildList& MapWildList::operator=(const MapWildList& rhs) { if (this == &rhs) return *this; |
