/* core/item.cc This file is part of the Osirion project and is distributed under the terms of the GNU General Public License version 2 */ #include "core/item.h" #include "sys/sys.h" namespace core { /* ---- class Item ------------------------------------------------- */ Item::Item(const Info *info) { item_info = info; item_amount = 0; item_price = info->price(); } Item::~Item() { item_info = 0; item_amount = 0; } void Item::set_amount(const int amount) { item_amount = amount; } void Item::inc_amount(const int amount) { item_amount += amount; } void Item::dec_amount(const int amount) { item_amount -= amount; } void Item::set_price(const long price) { item_price = price; } } // namespace core