diff options
author | Stijn Buys <ingar@osirion.org> | 2010-09-18 18:50:55 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2010-09-18 18:50:55 +0000 |
commit | 9c91a9767b570fdc3c3e19e1f452f9a8257f9999 (patch) | |
tree | 9ac10114a3378134ea19dac3d7f7639532c3bf5a /src/core/inventory.h | |
parent | fc4809e41bc5694231046eb2fd4c324c4daba13f (diff) |
trade updates
Diffstat (limited to 'src/core/inventory.h')
-rw-r--r-- | src/core/inventory.h | 23 |
1 files changed, 21 insertions, 2 deletions
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 |