From 9c91a9767b570fdc3c3e19e1f452f9a8257f9999 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 18 Sep 2010 18:50:55 +0000 Subject: trade updates --- src/core/inventory.h | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'src/core/inventory.h') diff --git a/src/core/inventory.h b/src/core/inventory.h index c924683..c715116 100644 --- a/src/core/inventory.h +++ b/src/core/inventory.h @@ -55,12 +55,31 @@ public: */ Item *find(const Info *info); - inline Items &items() { + inline Items &items() { return inventory_items; }; + + /** + * @brief return the timestamp + */ + inline const unsigned long timestamp() const { + return inventory_timestamp; + } + + /** + * @brief set the timestamp + */ + void set_timestamp(const unsigned long timestamp); + + /** + * @brief set the timestamp to the current game time + */ + void mark(); private: - Items inventory_items; + Items inventory_items; + // timestamp when inventory was last updated + unsigned long inventory_timestamp; }; } // namsepace core -- cgit v1.2.3