summaryrefslogtreecommitdiff
path: root/src/gui/shop.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-11-05 14:57:35 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-11-05 14:57:35 +0000
commitde61b658590630cfc59960c012c8e533b361a8b0 (patch)
treeb89a6f23a385ea4a7d32e3abc6ce4a82114c5d67 /src/gui/shop.cpp
parentdbca3013575b766a681d1cea946e249a386e2144 (diff)
parent482f0ddb85487bd5a4beaf2706cca9f690aa9304 (diff)
downloadmana-client-de61b658590630cfc59960c012c8e533b361a8b0.tar.gz
mana-client-de61b658590630cfc59960c012c8e533b361a8b0.tar.bz2
mana-client-de61b658590630cfc59960c012c8e533b361a8b0.tar.xz
mana-client-de61b658590630cfc59960c012c8e533b361a8b0.zip
Moved 0.1.0 branch to trunk. A new beginning.
Diffstat (limited to 'src/gui/shop.cpp')
-rw-r--r--src/gui/shop.cpp44
1 files changed, 2 insertions, 42 deletions
diff --git a/src/gui/shop.cpp b/src/gui/shop.cpp
index 3f30732a..3706cdf8 100644
--- a/src/gui/shop.cpp
+++ b/src/gui/shop.cpp
@@ -22,53 +22,13 @@
*/
#include "shop.h"
-#include "../utils/tostring.h"
-#include "../resources/itemmanager.h"
-
-ShopItems::~ShopItems()
-{
- clear();
-}
int ShopItems::getNumberOfElements()
{
- return mItemsShop.size();
+ return size();
}
std::string ShopItems::getElementAt(int i)
{
- return mItemsShop.at(i).name;
-}
-
-void ShopItems::addItem(short id, int price)
-{
- ITEM_SHOP item_shop;
-
- item_shop.name = itemDb->getItemInfo(id).getName()
- + " " + toString(price) + " GP";
- item_shop.price = price;
- item_shop.id = id;
- item_shop.image = itemDb->getItemInfo(id).getImage();
-
- mItemsShop.push_back(item_shop);
-}
-
-ITEM_SHOP ShopItems::at(int i)
-{
- return mItemsShop.at(i);
-}
-
-void ShopItems::push_back(ITEM_SHOP item_shop)
-{
- mItemsShop.push_back(item_shop);
-}
-
-void ShopItems::clear()
-{
- mItemsShop.clear();
-}
-
-std::vector<ITEM_SHOP>* ShopItems::getShop()
-{
- return &mItemsShop;
+ return at(i).name;
}