summaryrefslogtreecommitdiff
path: root/src/game-server/item.hpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <mana@crushnet.org>2010-05-09 17:03:47 +0200
committerPhilipp Sehmisch <mana@crushnet.org>2010-05-09 17:03:47 +0200
commitcfff8488b15d00d6f7e3e7bf6cf9723c1fe91d0b (patch)
treef1e0e62fa8c06d859f3d9d4b9c8b5cf4cbdbd013 /src/game-server/item.hpp
parent1ef56bda12f9f18f0c91903b330e0422cfd98793 (diff)
downloadmanaserv-cfff8488b15d00d6f7e3e7bf6cf9723c1fe91d0b.tar.gz
manaserv-cfff8488b15d00d6f7e3e7bf6cf9723c1fe91d0b.tar.bz2
manaserv-cfff8488b15d00d6f7e3e7bf6cf9723c1fe91d0b.tar.xz
manaserv-cfff8488b15d00d6f7e3e7bf6cf9723c1fe91d0b.zip
Floor items are now removed after a (configurable) time.
Reviewed-by: Thorbjorn Lindeijer
Diffstat (limited to 'src/game-server/item.hpp')
-rw-r--r--src/game-server/item.hpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/game-server/item.hpp b/src/game-server/item.hpp
index 777f5057..4aa84c9c 100644
--- a/src/game-server/item.hpp
+++ b/src/game-server/item.hpp
@@ -269,12 +269,14 @@ class ItemClass
unsigned mAttackRange; /**< Attack range when used as a weapon */
};
+/**
+* Class for an item stack laying on the floor in the game world
+*/
+
class Item : public Actor
{
public:
- Item(ItemClass *type, int amount)
- : Actor(OBJECT_ITEM), mType(type), mAmount(amount)
- {}
+ Item(ItemClass *type, int amount);
ItemClass *getItemClass() const
{ return mType; }
@@ -282,11 +284,12 @@ class Item : public Actor
int getAmount() const
{ return mAmount; }
- virtual void update() {}
+ virtual void update();
private:
ItemClass *mType;
unsigned char mAmount;
+ int mLifetime;
};
#endif