diff options
Diffstat (limited to 'pokemod/Item.cpp')
-rw-r--r-- | pokemod/Item.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/pokemod/Item.cpp b/pokemod/Item.cpp index ddba2d68..21d3fc4c 100644 --- a/pokemod/Item.cpp +++ b/pokemod/Item.cpp @@ -25,13 +25,13 @@ // Qt includes #include <QSet> -Item::Item(const Item& item) : +Pokemod::Item::Item(const Item& item) : Object("Item", item.parent(), item.id()) { *this = item; } -Item::Item(const Pokemod* parent, const int id) : +Pokemod::Item::Item(const Pokemod* parent, const int id) : Object("Item", parent, id), m_name(""), m_sellable(false), @@ -42,23 +42,23 @@ Item::Item(const Pokemod* parent, const int id) : { } -Item::Item(const Item& item, const Pokemod* parent, const int id) : +Pokemod::Item::Item(const Item& item, const Pokemod* parent, const int id) : Object("Item", parent, id) { *this = item; } -Item::Item(const QDomElement& xml, const Pokemod* parent, const int id) : +Pokemod::Item::Item(const QDomElement& xml, const Pokemod* parent, const int id) : Object("Item", parent, id) { load(xml, id); } -Item::~Item() +Pokemod::Item::~Item() { } -void Item::validate() +void Pokemod::Item::validate() { if (m_name.isEmpty()) emit(error("Name is empty")); @@ -66,7 +66,7 @@ void Item::validate() TEST(setPrice, price); } -void Item::load(const QDomElement& xml, int id) +void Pokemod::Item::load(const QDomElement& xml, int id) { LOAD_ID(); LOAD(QString, name); @@ -77,7 +77,7 @@ void Item::load(const QDomElement& xml, int id) LOAD(Script, script); } -QDomElement Item::save() const +QDomElement Pokemod::Item::save() const { SAVE_CREATE(); SAVE(QString, name); @@ -89,17 +89,17 @@ QDomElement Item::save() const return xml; } -void Item::setName(const QString& name) +void Pokemod::Item::setName(const QString& name) { CHECK(name); } -void Item::setSellable(const bool sellable) +void Pokemod::Item::setSellable(const bool sellable) { CHECK(sellable); } -void Item::setType(const int type) +void Pokemod::Item::setType(const int type) { if (static_cast<const Pokemod*>(pokemod())->itemTypeIndex(type) == INT_MAX) { @@ -109,7 +109,7 @@ void Item::setType(const int type) CHECK(type); } -void Item::setPrice(const int price) +void Pokemod::Item::setPrice(const int price) { if (static_cast<const Pokemod*>(pokemod())->rules()->maxMoney() < price) { @@ -119,47 +119,47 @@ void Item::setPrice(const int price) CHECK(price); } -void Item::setDescription(const QString& description) +void Pokemod::Item::setDescription(const QString& description) { CHECK(description); } -void Item::setScript(const Script& script) +void Pokemod::Item::setScript(const Script& script) { CHECK(script); } -QString Item::name() const +QString Pokemod::Item::name() const { return m_name; } -bool Item::sellable() const +bool Pokemod::Item::sellable() const { return m_sellable; } -int Item::type() const +int Pokemod::Item::type() const { return m_type; } -int Item::price() const +int Pokemod::Item::price() const { return m_price; } -QString Item::description() const +QString Pokemod::Item::description() const { return m_description; } -Script Item::script() const +Pokemod::Script Pokemod::Item::script() const { return m_script; } -Item& Item::operator=(const Item& rhs) +Pokemod::Item& Pokemod::Item::operator=(const Item& rhs) { if (this == &rhs) return *this; |