diff options
Diffstat (limited to 'src/gui/shop.cpp')
-rw-r--r-- | src/gui/shop.cpp | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/src/gui/shop.cpp b/src/gui/shop.cpp index bd676bc0..4799ea42 100644 --- a/src/gui/shop.cpp +++ b/src/gui/shop.cpp @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,9 +19,11 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "shop.h" +#include "gui/shop.h" -#include "../utils/dtor.h" +#include "shopitem.h" + +#include "utils/dtor.h" ShopItems::ShopItems(bool mergeDuplicates) : mMergeDuplicates(mergeDuplicates) @@ -44,9 +45,15 @@ std::string ShopItems::getElementAt(int i) return mShopItems.at(i)->getDisplayName(); } +void ShopItems::addItem(int id, int amount, int price) +{ + mShopItems.push_back(new ShopItem(-1, id, amount, price)); +} + +#ifdef EATHENA_SUPPORT void ShopItems::addItem(int inventoryIndex, int id, int quantity, int price) { - ShopItem* item = 0; + ShopItem *item = 0; if (mMergeDuplicates) { item = findItem(id); @@ -62,13 +69,9 @@ void ShopItems::addItem(int inventoryIndex, int id, int quantity, int price) mShopItems.push_back(item); } } +#endif -void ShopItems::addItem(int id, int price) -{ - addItem(-1, id, 0, price); -} - -ShopItem* ShopItems::at(int i) const +ShopItem *ShopItems::at(int i) const { return mShopItems.at(i); } @@ -84,7 +87,7 @@ void ShopItems::clear() mShopItems.clear(); } -ShopItem* ShopItems::findItem(int id) +ShopItem *ShopItems::findItem(int id) { ShopItem *item; |