summaryrefslogtreecommitdiff
path: root/src/floor_item.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-09-03 15:00:47 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-09-03 15:00:47 +0000
commit77efbb50066a030d1f44f8de8d06ace9f284e3a2 (patch)
tree22d737ac0058e4fa87e7767d41e02999bcbf84be /src/floor_item.cpp
parent40ca3dc75197412594c5f6a78d68b265e235024b (diff)
downloadmana-client-77efbb50066a030d1f44f8de8d06ace9f284e3a2.tar.gz
mana-client-77efbb50066a030d1f44f8de8d06ace9f284e3a2.tar.bz2
mana-client-77efbb50066a030d1f44f8de8d06ace9f284e3a2.tar.xz
mana-client-77efbb50066a030d1f44f8de8d06ace9f284e3a2.zip
Introduced SelectionListener to fix updating problem in inventory window
(should also be used to fix similar problem in trade, buy and sell dialogs). Made the ItemInfo be passed around as a reference instead of a pointer, since it is never NULL.
Diffstat (limited to 'src/floor_item.cpp')
-rw-r--r--src/floor_item.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/floor_item.cpp b/src/floor_item.cpp
index edd5d4a7..9a179a21 100644
--- a/src/floor_item.cpp
+++ b/src/floor_item.cpp
@@ -42,7 +42,7 @@ FloorItem::FloorItem(unsigned int id,
mMap(map)
{
// Retrieve item image from item info
- mImage = itemDb->getItemInfo(itemId)->getImage();
+ mImage = itemDb->getItemInfo(itemId).getImage();
// Add ourselves to the map
mSpriteIterator = mMap->addSprite(this);
@@ -50,6 +50,6 @@ FloorItem::FloorItem(unsigned int id,
FloorItem::~FloorItem()
{
- // Remove and delete the representative sprite
+ // Remove ourselves from the map
mMap->removeSprite(mSpriteIterator);
}