Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/item.cc')
-rw-r--r--src/core/item.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/item.cc b/src/core/item.cc
index 8ab4784..df12885 100644
--- a/src/core/item.cc
+++ b/src/core/item.cc
@@ -27,10 +27,19 @@ Item::Item(const Info *info)
set_timestamp(game() ? game()->timestamp() : 1);
}
+Item::Item(const Item &other)
+{
+ item_info = other.info();
+ item_amount = other.amount();
+ item_price = other.price();
+ set_timestamp(game() ? game()->timestamp() : 1);
+}
+
Item::~Item()
{
item_info = 0;
item_amount = 0;
+ item_amount = 0;
}
void Item::set_amount(const long amount)