diff options
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/inventoryhandler.cpp | 5 | ||||
-rw-r--r-- | src/net/eathena/serverfeatures.cpp | 5 | ||||
-rw-r--r-- | src/net/eathena/serverfeatures.h | 2 |
3 files changed, 11 insertions, 1 deletions
diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp index 610b27194..ccc303cdf 100644 --- a/src/net/eathena/inventoryhandler.cpp +++ b/src/net/eathena/inventoryhandler.cpp @@ -29,6 +29,9 @@ #include "listeners/arrowslistener.h" +#include "net/net.h" +#include "net/serverfeatures.h" + #include "net/eathena/messageout.h" #include "net/eathena/protocol.h" @@ -376,7 +379,7 @@ void InventoryHandler::processPlayerInventoryAdd(Net::MessageIn &msg) if (item && item->getId() == itemId) amount += item->getQuantity(); - if (serverVersion < 1 && identified > 1) + if (!Net::getServerFeatures()->haveItemColors() && identified > 1) identified = 1; inventory->setItem(index, itemId, amount, refine, diff --git a/src/net/eathena/serverfeatures.cpp b/src/net/eathena/serverfeatures.cpp index b0787cb40..807c2292b 100644 --- a/src/net/eathena/serverfeatures.cpp +++ b/src/net/eathena/serverfeatures.cpp @@ -102,4 +102,9 @@ bool ServerFeatures::haveMove3() const return false; } +bool ServerFeatures::haveItemColors() const +{ + return false; +} + } // namespace EAthena diff --git a/src/net/eathena/serverfeatures.h b/src/net/eathena/serverfeatures.h index 045679659..36bd1bc4b 100644 --- a/src/net/eathena/serverfeatures.h +++ b/src/net/eathena/serverfeatures.h @@ -61,6 +61,8 @@ class ServerFeatures final : public Net::ServerFeatures bool haveServerIgnore() const override final; bool haveMove3() const override final; + + bool haveItemColors() const override final; }; } // namespace EAthena |