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>2009-11-14 14:14:21 +0000
committerStijn Buys <ingar@osirion.org>2009-11-14 14:14:21 +0000
commit4293e8854a30443e4d5818fc55df404976dbfd9b (patch)
tree816665ba37acfd5a39c0544c3b2acbf04c8c5d3d /src/core/item.h
parenta993d31910b63a1f897e470842934e6ffefad32c (diff)
update the info system, fixes network info exchange
Diffstat (limited to 'src/core/item.h')
-rw-r--r--src/core/item.h15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/core/item.h b/src/core/item.h
index f88da57..21eae87 100644
--- a/src/core/item.h
+++ b/src/core/item.h
@@ -19,16 +19,12 @@ namespace core
class Item
{
public:
- Item(const unsigned int class_id, const unsigned int info_id);
+ Item(const Info *info);
~Item();
/* ---- inspectors --------------------------------------------- */
- inline unsigned int class_id() const { return item_class_id; }
-
- inline unsigned int info_id() const { return item_info_id; }
-
/**
* @brief associated amount
*/
@@ -37,7 +33,7 @@ public:
/**
* @brief information record
*/
- inline Info *info();
+ inline const Info *info() const { return item_info; }
/* ---- mutators ----------------------------------------------- */
@@ -47,11 +43,8 @@ public:
void set_amount(const int amount);
private:
- unsigned int item_class_id;
- unsigned int item_info_id;
- int item_amount;
-
- Info *item_info;
+ const Info *item_info;
+ int item_amount;
};
} // namespace core