diff options
author | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2007-01-03 22:34:40 +0000 |
---|---|---|
committer | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2007-01-03 22:34:40 +0000 |
commit | 36eb5ac7f856dc83242837738eb18cfd9039352f (patch) | |
tree | 89ebfae081d2207e68dc04b52e4558b3a316834f /src/game-server/item.hpp | |
parent | 282ca19e33b79f4468ce6402406ddb1397f2d115 (diff) | |
download | manaserv-36eb5ac7f856dc83242837738eb18cfd9039352f.tar.gz manaserv-36eb5ac7f856dc83242837738eb18cfd9039352f.tar.bz2 manaserv-36eb5ac7f856dc83242837738eb18cfd9039352f.tar.xz manaserv-36eb5ac7f856dc83242837738eb18cfd9039352f.zip |
Added a Xmas cake: the server now supports items on floor.
Diffstat (limited to 'src/game-server/item.hpp')
-rw-r--r-- | src/game-server/item.hpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/game-server/item.hpp b/src/game-server/item.hpp index 283e685c..9d2ebb72 100644 --- a/src/game-server/item.hpp +++ b/src/game-server/item.hpp @@ -129,8 +129,8 @@ struct Modifiers class ItemClass { public: - ItemClass(int type) - : mType(type) + ItemClass(int id, int type) + : mDatabaseID(id), mType(type) {} /** @@ -199,6 +199,12 @@ class ItemClass void setScriptName(std::string const &name) { mScriptName = name; } + /** + * Gets database ID. + */ + int getDatabaseID() + { return mDatabaseID; } + private: /** @@ -207,6 +213,7 @@ class ItemClass bool runScript(Being *itemUser); // Item reference information + unsigned short mDatabaseID; unsigned char mType; /**< Type: usable, equipment. */ unsigned short mWeight; /**< Weight of the item. */ unsigned short mCost; /**< Unit cost the item. */ @@ -225,6 +232,8 @@ class Item: public Object ItemClass *getItemClass() const { return mType; } + virtual void update() {} + private: ItemClass *mType; }; |