diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-05-01 17:52:56 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-05-01 17:52:56 +0300 |
commit | 87918db755040bb693cb286d8fb0bcfd97d761af (patch) | |
tree | 581d2df22397f829e407d6b5235193e1bf26aac6 /src/being | |
parent | d8e382e49317adf9717d83509c6975f8958f5043 (diff) | |
download | manaverse-87918db755040bb693cb286d8fb0bcfd97d761af.tar.gz manaverse-87918db755040bb693cb286d8fb0bcfd97d761af.tar.bz2 manaverse-87918db755040bb693cb286d8fb0bcfd97d761af.tar.xz manaverse-87918db755040bb693cb286d8fb0bcfd97d761af.zip |
Remove ServerFeatures haveItemColors because it depend only by server type.
Diffstat (limited to 'src/being')
-rw-r--r-- | src/being/flooritem.cpp | 13 | ||||
-rw-r--r-- | src/being/localplayer.cpp | 13 |
2 files changed, 20 insertions, 6 deletions
diff --git a/src/being/flooritem.cpp b/src/being/flooritem.cpp index 04be493f0..bc60c5e2a 100644 --- a/src/being/flooritem.cpp +++ b/src/being/flooritem.cpp @@ -37,6 +37,7 @@ #include "resources/map/map.h" +#include "net/net.h" #include "net/serverfeatures.h" #include "debug.h" @@ -142,10 +143,16 @@ const ItemInfo &FloorItem::getInfo() const std::string FloorItem::getName() const { const ItemInfo &info = ItemDB::get(mItemId); - if (serverFeatures->haveItemColors()) - return info.getName(mColor); - else +#ifdef TMWA_SUPPORT + if (Net::getNetworkType() == ServerType::TMWATHENA) + { return info.getName(); + } + else +#endif // TMWA_SUPPORT + { + return info.getName(mColor); + } } void FloorItem::draw(Graphics *const graphics, diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index 730421b70..3f31a7c15 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -67,6 +67,7 @@ #include "net/beinghandler.h" #include "net/chathandler.h" #include "net/inventoryhandler.h" +#include "net/net.h" #include "net/packetlimiter.h" #include "net/playerhandler.h" #include "net/serverfeatures.h" @@ -931,10 +932,16 @@ void LocalPlayer::pickedUp(const ItemInfo &itemInfo, else { std::string str; - if (serverFeatures->haveItemColors()) - str = itemInfo.getName(color); - else +#ifdef TMWA_SUPPORT + if (Net::getNetworkType() == ServerType::TMWATHENA) + { str = itemInfo.getName(); + } + else +#endif // TMWA_SUPPORT + { + str = itemInfo.getName(color); + } if (config.getBoolValue("showpickupchat") && localChatTab) { |