summaryrefslogtreecommitdiff
path: root/src/flooritem.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-05-07 20:20:09 +0300
committerAndrei Karas <akaras@inbox.ru>2012-05-07 20:20:09 +0300
commit860c60be6c7a925bb4d8db291b771a6044d20308 (patch)
treeddeb0b2bd54a4b66bd699b220050e4f952bb429f /src/flooritem.cpp
parent6f9d0494f09833e29a05a2c06287fbee73cb7421 (diff)
downloadplus-860c60be6c7a925bb4d8db291b771a6044d20308.tar.gz
plus-860c60be6c7a925bb4d8db291b771a6044d20308.tar.bz2
plus-860c60be6c7a925bb4d8db291b771a6044d20308.tar.xz
plus-860c60be6c7a925bb4d8db291b771a6044d20308.zip
Add getName property to item and flooritem.
Diffstat (limited to 'src/flooritem.cpp')
-rw-r--r--src/flooritem.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/flooritem.cpp b/src/flooritem.cpp
index f126f336b..acbfe8363 100644
--- a/src/flooritem.cpp
+++ b/src/flooritem.cpp
@@ -75,6 +75,15 @@ const ItemInfo &FloorItem::getInfo() const
return ItemDB::get(mItemId);
}
+std::string FloorItem::getName()
+{
+ const ItemInfo &info = ItemDB::get(mItemId);
+ if (serverVersion > 0)
+ return info.getName(mColor);
+ else
+ return info.getName();
+}
+
bool FloorItem::draw(Graphics *graphics, int offsetX, int offsetY) const
{
if (!mMap)