diff options
Diffstat (limited to 'src/core/item.cc')
-rw-r--r-- | src/core/item.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/item.cc b/src/core/item.cc index df12885..3768afa 100644 --- a/src/core/item.cc +++ b/src/core/item.cc @@ -23,6 +23,7 @@ Item::Item(const Info *info) { item_info = info; item_amount = 0; + item_flags = 0; item_price = info->price(); set_timestamp(game() ? game()->timestamp() : 1); } @@ -31,6 +32,7 @@ Item::Item(const Item &other) { item_info = other.info(); item_amount = other.amount(); + item_flags = other.flags(); item_price = other.price(); set_timestamp(game() ? game()->timestamp() : 1); } @@ -39,7 +41,8 @@ Item::~Item() { item_info = 0; item_amount = 0; - item_amount = 0; + item_flags = 0; + item_price = 0; } void Item::set_amount(const long amount) @@ -73,13 +76,14 @@ void Item::set_timestamp(const unsigned long timestamp) void Item::serialize_server_update(std::ostream & os) const { - os << amount() << " " << price() << " "; + os << amount() << " " << price() << " " << flags() << " "; } void Item::receive_server_update(std::istream &is) { is >> item_amount; is >> item_price; + is >> item_flags; } } // namespace core |