ShopItem::ShopItem (int id, int price) : Item (id, 0), mPrice(price) { mDisplayName = getInfo().getName() + " (" + Units::formatCurrency(mPrice).c_str() + ")"; setInvIndex(-1); addDuplicate(-1, 0); }
ShopItem::ShopItem(int inventoryIndex, int id, int quantity, int price) : Item(id, 0), mPrice(price) { mDisplayName = getInfo().getName() + " (" + Units::formatCurrency(mPrice).c_str() + ")"; setInvIndex(inventoryIndex); addDuplicate(inventoryIndex, quantity); }
ShopItem::ShopItem(const int id, const int type, const ItemColor color, const int price) : Item(id, type, 0, 0, color, Identified_true, Damaged_false, Favorite_false, Equipm_false, Equipped_false), mDisplayName(), mDuplicates(), mPrice(price), mShowQuantity(false), mVisible(true) { updateDisplayName(0); setInvIndex(-1); addDuplicate(-1, 0); }
ShopItem::ShopItem(const int inventoryIndex, const int id, const int type, const unsigned char color, const int quantity, const int price) : Item(id, type, 0, 0, color, Identified_true, Damaged_false, Favorite_false, Equipm_false, Equipped_false), mDisplayName(), mDuplicates(), mPrice(price), mShowQuantity(true), mVisible(true) { updateDisplayName(quantity); setInvIndex(inventoryIndex); addDuplicate(inventoryIndex, quantity); }