Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2010-09-18 18:50:55 +0000
committerStijn Buys <ingar@osirion.org>2010-09-18 18:50:55 +0000
commit9c91a9767b570fdc3c3e19e1f452f9a8257f9999 (patch)
tree9ac10114a3378134ea19dac3d7f7639532c3bf5a /src/core/item.h
parentfc4809e41bc5694231046eb2fd4c324c4daba13f (diff)
trade updates
Diffstat (limited to 'src/core/item.h')
-rw-r--r--src/core/item.h37
1 files changed, 13 insertions, 24 deletions
diff --git a/src/core/item.h b/src/core/item.h
index f1d6bb5..cc81249 100644
--- a/src/core/item.h
+++ b/src/core/item.h
@@ -19,8 +19,6 @@ namespace core
class Item
{
public:
- enum Flags { Mount = 1, Trade = 2 };
-
Item(const Info *info);
~Item();
@@ -35,12 +33,12 @@ public:
/**
* @brief information card
*/
- inline const Info *info() const { return item_info; }
+ inline const Info *info() const { return item_info; }
- /**
- * @brief flags
- */
- inline int flags() const { return item_flags; }
+
+ inline const long price() const {
+ return item_price;
+ }
/* ---- mutators ----------------------------------------------- */
@@ -49,25 +47,16 @@ public:
*/
void set_amount(const int amount);
- /**
- * @brief set specified flags
- */
- inline void set_flag(Flags flag) {
- item_flags |= flag;
- }
-
- /**
- * @brief unset specified flags
- */
- inline void unset_flag(Flags flag) {
- item_flags &= ~flag;
- }
+ void inc_amount(const int amount);
+
+ void dec_amount(const int amount);
+
+ void set_price(const long price);
private:
- const Info *item_info;
- int item_amount;
-
- int item_flags;
+ const Info *item_info;
+ long item_price;
+ int item_amount;
};
} // namespace core