From 37116aad3b2c128bae5b7f1ef4d1bc3cb8608f57 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 21 Oct 2012 10:18:07 +0000 Subject: Support the Item::Unrestricted flag, client allows to sell unrestricted items anywhere. --- src/core/item.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/item.h b/src/core/item.h index ec0d6be..4d9f0e8 100644 --- a/src/core/item.h +++ b/src/core/item.h @@ -19,7 +19,7 @@ namespace core class Item { public: - enum Flags {Tradeable = 1, Unique = 2}; + enum Flags {Tradeable = 1, Unique = 2, Unrestricted = 4}; Item(const Info *info); @@ -77,6 +77,13 @@ public: return ((item_flags & (unsigned int) Unique) == (unsigned int) Unique); } + /** + * @brief returns true if the Unrestricted flag is set + */ + inline const bool unrestricted() const { + return ((item_flags & (unsigned int) Unrestricted) == (unsigned int) Unrestricted); + } + /** * @brief return true if the dirty flag is set * */ -- cgit v1.2.3