diff options
author | Stijn Buys <ingar@osirion.org> | 2012-10-20 16:35:26 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2012-10-20 16:35:26 +0000 |
commit | 75274ebd6ba90784f5aa837b7e5ea97fc6bfb720 (patch) | |
tree | a5d51a87bf3f20833df18bc40a3254b946716afb /src/core/item.cc | |
parent | f01629dc14b1ee05b44d2e38b3dffbc1441fd85f (diff) |
Item id based inventory, support for weapon dealers.
Diffstat (limited to 'src/core/item.cc')
-rw-r--r-- | src/core/item.cc | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/core/item.cc b/src/core/item.cc index f6e0382..b6e5bd8 100644 --- a/src/core/item.cc +++ b/src/core/item.cc @@ -24,27 +24,29 @@ Item::Item(const Info *info) item_info = info; item_amount = 0; item_flags = 0; + item_id = 0; item_price = info->price(); set_timestamp(game() ? game()->timestamp() : 1); } -Item::Item(const Item &other) -{ - item_info = other.info(); - item_amount = other.amount(); - item_flags = other.flags(); - item_price = other.price(); - item_dirty = other.dirty(); - set_timestamp(game() ? game()->timestamp() : 1); -} - Item::~Item() { item_info = 0; item_amount = 0; item_flags = 0; item_price = 0; + item_id = 0; +} + +void Item::set_info(const Info *info) +{ + item_info = info; +} + +void Item::set_id(const unsigned int id) +{ + item_id = id; } void Item::set_amount(const long amount) |