diff options
Diffstat (limited to 'src/net/tmwa/npchandler.cpp')
-rw-r--r-- | src/net/tmwa/npchandler.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/net/tmwa/npchandler.cpp b/src/net/tmwa/npchandler.cpp index ec5da280a..bfe833577 100644 --- a/src/net/tmwa/npchandler.cpp +++ b/src/net/tmwa/npchandler.cpp @@ -28,6 +28,9 @@ #include "gui/windows/npcdialog.h" +#include "net/net.h" +#include "net/serverfeatures.h" + #include "net/tmwa/messageout.h" #include "net/tmwa/protocol.h" @@ -178,7 +181,7 @@ void NpcHandler::buyItem(const int beingId A_UNUSED, const int itemId, const unsigned char color, const int amount) const { MessageOut outMsg(CMSG_NPC_BUY_REQUEST); - if (serverVersion > 0) + if (Net::getServerFeatures()->haveItemColors()) { outMsg.writeInt16(10); // One item (length of packet) outMsg.writeInt16(static_cast<int16_t>(amount)); |