diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-10-12 11:39:58 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-10-12 11:44:42 +0300 |
commit | a6dc253a3857ae4a71cbe8f2c2f734dee402d01f (patch) | |
tree | a2091e432e8567143e2e6ca996fe41dc5a649a00 /src/net/messagein.cpp | |
parent | 1475bfbf16414df9aa812fc3ea78d747b0758601 (diff) | |
download | plus-a6dc253a3857ae4a71cbe8f2c2f734dee402d01f.tar.gz plus-a6dc253a3857ae4a71cbe8f2c2f734dee402d01f.tar.bz2 plus-a6dc253a3857ae4a71cbe8f2c2f734dee402d01f.tar.xz plus-a6dc253a3857ae4a71cbe8f2c2f734dee402d01f.zip |
Fix logging direction in packets.
Diffstat (limited to 'src/net/messagein.cpp')
-rw-r--r-- | src/net/messagein.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/net/messagein.cpp b/src/net/messagein.cpp index 0fbbd45c7..0fbf7162b 100644 --- a/src/net/messagein.cpp +++ b/src/net/messagein.cpp @@ -77,6 +77,7 @@ void MessageIn::readCoordinates(Uint16 &x, Uint16 &y) void MessageIn::readCoordinates(Uint16 &x, Uint16 &y, Uint8 &direction) { + Uint8 serverDir = 0; if (mPos + 3 <= mLength) { const char *data = mData + mPos; @@ -87,10 +88,10 @@ void MessageIn::readCoordinates(Uint16 &x, Uint16 &y, Uint8 &direction) temp = MAKEWORD(data[2] & 0x00f0, data[1] & 0x003f); y = static_cast<unsigned short>(temp >> 4); - direction = data[2] & 0x000f; + serverDir = data[2] & 0x000f; // Translate from eAthena format - switch (direction) + switch (serverDir) { case 0: direction = 1; @@ -134,7 +135,8 @@ void MessageIn::readCoordinates(Uint16 &x, Uint16 &y, Uint8 &direction) mPos += 3; PacketCounters::incInBytes(3); DEBUGLOG("readCoordinates: " + toString(static_cast<int>(x)) - + "," + toString(static_cast<int>(y))); + + "," + toString(static_cast<int>(y)) + "," + toString( + static_cast<int>(serverDir))); } void MessageIn::readCoordinatePair(Uint16 &srcX, Uint16 &srcY, |