diff options
author | Aaron Marks <nymacro@gmail.com> | 2005-07-16 10:00:53 +0000 |
---|---|---|
committer | Aaron Marks <nymacro@gmail.com> | 2005-07-16 10:00:53 +0000 |
commit | ce87adec648c69af2313e6077dad467d9ca8af3f (patch) | |
tree | f74727012cd5f1f646e4b75c7a8c47c80424af4c /src/messageout.cpp | |
parent | 34e887895276242efaf2e0b5f1700c1ab1d6b3db (diff) | |
download | manaserv-ce87adec648c69af2313e6077dad467d9ca8af3f.tar.gz manaserv-ce87adec648c69af2313e6077dad467d9ca8af3f.tar.bz2 manaserv-ce87adec648c69af2313e6077dad467d9ca8af3f.tar.xz manaserv-ce87adec648c69af2313e6077dad467d9ca8af3f.zip |
Added chat message handler placeholder (still not fully functional).
Updated PostgreSQL SQL support - although there is still problem with primary key being initialized to null.
Updated message enumeration.
Diffstat (limited to 'src/messageout.cpp')
-rw-r--r-- | src/messageout.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/messageout.cpp b/src/messageout.cpp index 2aca011a..9c3ea453 100644 --- a/src/messageout.cpp +++ b/src/messageout.cpp @@ -45,18 +45,18 @@ void MessageOut::writeByte(char value) packet->length += sizeof(char); } -void MessageOut::writeShort(unsigned short value) +void MessageOut::writeShort(short value) { - packet->expand(sizeof(unsigned short)); - memcpy(&packet->data[packet->length], (void*)&value, sizeof(unsigned short)); - packet->length += sizeof(unsigned short); + packet->expand(sizeof(short)); + memcpy(&packet->data[packet->length], (void*)&value, sizeof(short)); + packet->length += sizeof(short); } -void MessageOut::writeLong(unsigned long value) +void MessageOut::writeLong(long value) { - packet->expand(sizeof(unsigned long)); - memcpy(&packet->data[packet->length], (void*)&value, sizeof(unsigned long)); - packet->length += sizeof(unsigned long); + packet->expand(sizeof(long)); + memcpy(&packet->data[packet->length], (void*)&value, sizeof(long)); + packet->length += sizeof(long); } void MessageOut::writeString(const std::string &string, int length) |