diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-08-05 06:10:55 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-08-05 06:10:55 +0000 |
| commit | cf49a16b29ac412cfea125f7216a0e51e79aa4de (patch) | |
| tree | fc3eb0271f3de0d7900c2a33ab5eafa259d8d250 /pokescripting/ItemWrapper.h | |
| parent | 56b91df6010a9f3d304438cf95816399a6e46622 (diff) | |
| download | sigen-cf49a16b29ac412cfea125f7216a0e51e79aa4de.tar.gz sigen-cf49a16b29ac412cfea125f7216a0e51e79aa4de.tar.xz sigen-cf49a16b29ac412cfea125f7216a0e51e79aa4de.zip | |
[FIX] List members of pokemod classes now can be returned in their entirety
[FIX] Reworked pokescripting for ease of use
[FIX] Now (selected) pokemod values can be overridden in pokescripting
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@237 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokescripting/ItemWrapper.h')
| -rw-r--r-- | pokescripting/ItemWrapper.h | 37 |
1 files changed, 4 insertions, 33 deletions
diff --git a/pokescripting/ItemWrapper.h b/pokescripting/ItemWrapper.h index 124f7dda..65b71239 100644 --- a/pokescripting/ItemWrapper.h +++ b/pokescripting/ItemWrapper.h @@ -19,7 +19,6 @@ #define __POKESCRIPTING_ITEMWRAPPER__ // Pokescripting includes -#include "ItemTypeWrapper.h" #include "ObjectWrapper.h" // Pokemod includes @@ -27,6 +26,9 @@ namespace Pokescripting { +// Forward declarations +class ItemTypeWrapper; + class POKESCRIPTING_EXPORT ItemWrapper : public ObjectWrapper { Q_OBJECT @@ -44,44 +46,13 @@ class POKESCRIPTING_EXPORT ItemWrapper : public ObjectWrapper ItemTypeWrapper* type(); int price() const; QString description() const; + Pokemod::Script script() const; private: ItemWrapper(const Pokemod::Item* item, QObject* parent); ItemWrapper& operator=(const ItemWrapper& rhs); const Pokemod::Item* m_item; }; - -inline ItemWrapper::ItemWrapper(const Pokemod::Item* item, QObject* parent) : - ObjectWrapper(item, parent), - m_item(item) -{ -} - -inline QString ItemWrapper::name() const -{ - return m_item->name(); -} - -inline bool ItemWrapper::sellable() const -{ - return m_item->sellable(); -} - -inline ItemTypeWrapper* ItemWrapper::type() -{ - return ItemTypeWrapper::create(pokemod()->itemTypeById(m_item->type()), this); -} - -inline int ItemWrapper::price() const -{ - return m_item->price(); -} - -inline QString ItemWrapper::description() const -{ - return m_item->description(); -} - } #endif |
