diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/items.h | 51 |
2 files changed, 33 insertions, 23 deletions
@@ -1,3 +1,8 @@ +2006-08-13 Bjørn Lindeijer <bjorn@lindeijer.nl> + + * src/items.h: Fixed missing constructor since there is no default + constructor in its superclass Object. + 2006-08-13 Eugenio Favalli <elvenprogrammer@gmail.com> * tmwserv.cbp, tmwserv.dev: Updated project files. diff --git a/src/items.h b/src/items.h index 1b973566..99afba3f 100644 --- a/src/items.h +++ b/src/items.h @@ -31,29 +31,34 @@ */ class Item : public Object { - //Item type - unsigned int type; - - public: - /** - * Enumeration of available Item types. - */ - enum { - Usable, - Equipment - }; - - virtual ~Item() throw() { } - - /** - * The function called to use an item - */ - void use(); - - /** - * Return type of item - */ - unsigned int getType() { return type; } + public: + /** + * Enumeration of available Item types. + */ + enum { + Usable, + Equipment + }; + + Item(int type, int id): + Object(type, id) + {} + + virtual ~Item() throw() { } + + /** + * The function called to use an item + */ + void use(); + + /** + * Return type of item + */ + unsigned int getType() const { return type; } + + private: + //Item type + unsigned int type; }; #endif |