summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/buy.cpp4
-rw-r--r--src/gui/popupmenu.cpp4
-rw-r--r--src/gui/sell.cpp4
-rw-r--r--src/gui/shop.cpp6
4 files changed, 9 insertions, 9 deletions
diff --git a/src/gui/buy.cpp b/src/gui/buy.cpp
index 0bf4c56d..91488595 100644
--- a/src/gui/buy.cpp
+++ b/src/gui/buy.cpp
@@ -32,7 +32,7 @@
#include "../npc.h"
-#include "../resources/itemmanager.h"
+#include "../resources/itemdb.h"
#include "../net/messageout.h"
#include "../net/protocol.h"
@@ -267,7 +267,7 @@ void BuyDialog::selectionChanged(const SelectionEvent &event)
if (selectedItem > -1)
{
const ItemInfo &info =
- itemDb->getItemInfo(mShopItems->at(selectedItem).id);
+ ItemDB::get(mShopItems->at(selectedItem).id);
mItemDescLabel->setCaption("Description: " + info.getDescription());
mItemEffectLabel->setCaption("Effect: " + info.getEffect());
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp
index ab81f7d0..c2959e1d 100644
--- a/src/gui/popupmenu.cpp
+++ b/src/gui/popupmenu.cpp
@@ -40,7 +40,7 @@
#include "../npc.h"
#include "../resources/iteminfo.h"
-#include "../resources/itemmanager.h"
+#include "../resources/itemdb.h"
extern std::string tradePartnerName;
@@ -106,7 +106,7 @@ void PopupMenu::showPopup(int x, int y, FloorItem *floorItem)
mBrowserBox->clearRows();
// Floor item can be picked up (single option, candidate for removal)
- std::string name = itemDb->getItemInfo(mFloorItem->getItemId()).getName();
+ std::string name = ItemDB::get(mFloorItem->getItemId()).getName();
mBrowserBox->addRow("@@pickup|Pick Up " + name + "@@");
//browserBox->addRow("@@look|Look To@@");
diff --git a/src/gui/sell.cpp b/src/gui/sell.cpp
index f32b4b5c..0137fdde 100644
--- a/src/gui/sell.cpp
+++ b/src/gui/sell.cpp
@@ -37,7 +37,7 @@
#include "../npc.h"
#include "../resources/iteminfo.h"
-#include "../resources/itemmanager.h"
+#include "../resources/itemdb.h"
#include "../net/messageout.h"
#include "../net/protocol.h"
@@ -277,7 +277,7 @@ void SellDialog::selectionChanged(const SelectionEvent &event)
if (selectedItem > -1)
{
const ItemInfo &info =
- itemDb->getItemInfo(mShopItems->at(selectedItem).id);
+ ItemDB::get(mShopItems->at(selectedItem).id);
mItemDescLabel->setCaption("Description: " + info.getDescription());
mItemEffectLabel->setCaption("Effect: " + info.getEffect());
diff --git a/src/gui/shop.cpp b/src/gui/shop.cpp
index 3f30732a..2d33e8a8 100644
--- a/src/gui/shop.cpp
+++ b/src/gui/shop.cpp
@@ -23,7 +23,7 @@
#include "shop.h"
#include "../utils/tostring.h"
-#include "../resources/itemmanager.h"
+#include "../resources/itemdb.h"
ShopItems::~ShopItems()
{
@@ -44,11 +44,11 @@ void ShopItems::addItem(short id, int price)
{
ITEM_SHOP item_shop;
- item_shop.name = itemDb->getItemInfo(id).getName()
+ item_shop.name = ItemDB::get(id).getName()
+ " " + toString(price) + " GP";
item_shop.price = price;
item_shop.id = id;
- item_shop.image = itemDb->getItemInfo(id).getImage();
+ item_shop.image = ItemDB::get(id).getImage();
mItemsShop.push_back(item_shop);
}