summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-08-13 18:32:09 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-08-13 18:32:09 +0000
commit3d2f8aa4d9d9a3123149d5806315a26dc3a33fd5 (patch)
tree29449ae231b028ed41a222f11807b60cb5c370f0
parent9b8ffb96969ba62de8b8cef17e7c9c86c9f40fb5 (diff)
downloadmanaserv-3d2f8aa4d9d9a3123149d5806315a26dc3a33fd5.tar.gz
manaserv-3d2f8aa4d9d9a3123149d5806315a26dc3a33fd5.tar.bz2
manaserv-3d2f8aa4d9d9a3123149d5806315a26dc3a33fd5.tar.xz
manaserv-3d2f8aa4d9d9a3123149d5806315a26dc3a33fd5.zip
Fixed missing constructor in Item class.
-rw-r--r--ChangeLog5
-rw-r--r--src/items.h51
2 files changed, 33 insertions, 23 deletions
diff --git a/ChangeLog b/ChangeLog
index 4a0d03e8..36a53ff0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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