diff options
author | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2007-01-04 20:17:07 +0000 |
---|---|---|
committer | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2007-01-04 20:17:07 +0000 |
commit | e68fa3087865e369cb78cfa61c441507eedf4284 (patch) | |
tree | 72bb502abdb4fb4081ba2457be1c53ea0d1933e4 /src/net/messagein.hpp | |
parent | bbdbb95d5d477b9934bf27cb45c53afbabb2db78 (diff) | |
download | manaserv-e68fa3087865e369cb78cfa61c441507eedf4284.tar.gz manaserv-e68fa3087865e369cb78cfa61c441507eedf4284.tar.xz manaserv-e68fa3087865e369cb78cfa61c441507eedf4284.zip |
Server-side implementation of item pick-up.
Diffstat (limited to 'src/net/messagein.hpp')
-rw-r--r-- | src/net/messagein.hpp | 21 |
1 files changed, 8 insertions, 13 deletions
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 |