summaryrefslogtreecommitdiff
path: root/src/gui/buy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/buy.cpp')
-rw-r--r--src/gui/buy.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/gui/buy.cpp b/src/gui/buy.cpp
index 2da38c36..c26be5d3 100644
--- a/src/gui/buy.cpp
+++ b/src/gui/buy.cpp
@@ -102,12 +102,7 @@ void BuyDialog::addItem(short id, int price)
{
ITEM_SHOP item_shop;
- if (id >= 501 && id <= 2301) {
- sprintf(item_shop.name, "%s %i gp", item_db[id - 501], price);
- }
- else {
- sprintf(item_shop.name, "Unknown item %i gp", price);
- }
+ sprintf(item_shop.name, "%s %i gp", itemDb.getName(id).c_str(), price);
item_shop.price = price;
item_shop.id = id;