From e68fa3087865e369cb78cfa61c441507eedf4284 Mon Sep 17 00:00:00 2001 From: Guillaume Melquiond Date: Thu, 4 Jan 2007 20:17:07 +0000 Subject: Server-side implementation of item pick-up. --- src/net/messagein.hpp | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'src/net/messagein.hpp') diff --git a/src/net/messagein.hpp b/src/net/messagein.hpp index c582d05..79063f9 100644 --- a/src/net/messagein.hpp +++ b/src/net/messagein.hpp @@ -39,16 +39,11 @@ class MessageIn */ MessageIn(const char *data, int length); - /** - * Destructor. - */ - ~MessageIn(); - - short getId() { return mId; } /**< Returns the message ID. */ + int getId() { return mId; } /**< Returns the message ID. */ - char readByte(); /**< Reads a byte. */ - short readShort(); /**< Reads a short. */ - long readLong(); /**< Reads a long. */ + int readByte(); /**< Reads a byte. */ + int readShort(); /**< Reads a short. */ + int readLong(); /**< Reads a long. */ /** * Reads a string. If a length is not given (-1), it is assumed @@ -60,18 +55,18 @@ class MessageIn /** * Returns the length of unread data. */ - unsigned getUnreadLength() { return mLength - mPos; } + int getUnreadLength() { return mLength - mPos; } private: const char *mData; /**< Packet data */ - unsigned int mLength; /**< Length of data in bytes */ - short mId; /**< The message ID. */ + unsigned short mLength; /**< Length of data in bytes */ + unsigned short mId; /**< The message ID. */ /** * Actual position in the packet. From 0 to packet->length. A value * bigger than packet->length means EOP was reached when reading it. */ - unsigned int mPos; + unsigned short mPos; }; #endif -- cgit