Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/item.cc18
-rw-r--r--src/core/item.h12
2 files changed, 21 insertions, 9 deletions
diff --git a/src/core/item.cc b/src/core/item.cc
index b6e5bd8..9191687 100644
--- a/src/core/item.cc
+++ b/src/core/item.cc
@@ -49,6 +49,24 @@ void Item::set_id(const unsigned int id)
item_id = id;
}
+void Item::set_flags(const unsigned int flags)
+{
+ item_flags = flags;
+ set_timestamp(game() ? game()->timestamp() : 1);
+}
+
+void Item::set_flag(Flags flag)
+{
+ item_flags |= flag;
+ set_timestamp(game() ? game()->timestamp() : 1);
+}
+
+void Item::unset_flag(Flags flag)
+{
+ item_flags &= ~flag;
+ set_timestamp(game() ? game()->timestamp() : 1);
+}
+
void Item::set_amount(const long amount)
{
item_amount = amount;
diff --git a/src/core/item.h b/src/core/item.h
index ae6a158..6388838 100644
--- a/src/core/item.h
+++ b/src/core/item.h
@@ -138,23 +138,17 @@ public:
/**
* @brief set all item flags
*/
- inline void set_flags(const unsigned int flags) {
- item_flags = flags;
- }
+ void set_flags(const unsigned int flags);
/**
* @brief set item flag
*/
- inline void set_flag(Flags flag) {
- item_flags |= flag;
- }
+ void set_flag(Flags flag);
/**
* @brief unset item flag
*/
- inline void unset_flag(Flags flag) {
- item_flags &= ~flag;
- }
+ void unset_flag(Flags flag);
/**
* @brief set the dirty flag