diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-05-07 20:20:09 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-05-07 20:20:09 +0300 |
commit | 860c60be6c7a925bb4d8db291b771a6044d20308 (patch) | |
tree | ddeb0b2bd54a4b66bd699b220050e4f952bb429f /src/flooritem.cpp | |
parent | 6f9d0494f09833e29a05a2c06287fbee73cb7421 (diff) | |
download | manaverse-860c60be6c7a925bb4d8db291b771a6044d20308.tar.gz manaverse-860c60be6c7a925bb4d8db291b771a6044d20308.tar.bz2 manaverse-860c60be6c7a925bb4d8db291b771a6044d20308.tar.xz manaverse-860c60be6c7a925bb4d8db291b771a6044d20308.zip |
Add getName property to item and flooritem.
Diffstat (limited to 'src/flooritem.cpp')
-rw-r--r-- | src/flooritem.cpp | 9 |
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) |