diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-09-12 22:35:00 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-09-12 23:30:12 +0300 |
commit | f6f6683177abd0f786b34d3d2bd689d615c899e0 (patch) | |
tree | e3931b87a8f9a2f57a6f88c6809991f5e40662db /src/net/eathena | |
parent | 5a94fab3a68ff5769aa6f2889da582a60ce32864 (diff) | |
download | mv-f6f6683177abd0f786b34d3d2bd689d615c899e0.tar.gz mv-f6f6683177abd0f786b34d3d2bd689d615c899e0.tar.bz2 mv-f6f6683177abd0f786b34d3d2bd689d615c899e0.tar.xz mv-f6f6683177abd0f786b34d3d2bd689d615c899e0.zip |
Fix some packet sizes for version 20080827.
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/beinghandler.cpp | 10 | ||||
-rw-r--r-- | src/net/eathena/inventoryhandler.cpp | 1 | ||||
-rw-r--r-- | src/net/eathena/packetsout.inc | 5 | ||||
-rw-r--r-- | src/net/eathena/playerhandler.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/skillhandler.cpp | 24 |
5 files changed, 38 insertions, 4 deletions
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp index 1ecb8895c..cf5ee0dc2 100644 --- a/src/net/eathena/beinghandler.cpp +++ b/src/net/eathena/beinghandler.cpp @@ -44,6 +44,11 @@ BeingHandler::BeingHandler(const bool enableSync) : void BeingHandler::requestNameById(const BeingId id) const { createOutPacket(CMSG_NAME_REQUEST); + if (packetVersion >= 20080827 && packetVersion < 20101124) + { + outMsg.writeInt32(0, "unused"); + outMsg.writeInt32(0, "unused"); + } outMsg.writeBeingId(id, "being id"); } @@ -89,6 +94,11 @@ void BeingHandler::viewPlayerEquipment(const Being *const being) const void BeingHandler::requestNameByCharId(const int id) const { createOutPacket(CMSG_SOLVE_CHAR_NAME); + if (packetVersion >= 20080827 && packetVersion < 20101124) + { + outMsg.writeInt32(9, "unused"); + outMsg.writeInt32(9, "unused"); + } outMsg.writeInt32(id, "character id"); } diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp index 5c6e641a9..062587996 100644 --- a/src/net/eathena/inventoryhandler.cpp +++ b/src/net/eathena/inventoryhandler.cpp @@ -476,6 +476,7 @@ void InventoryHandler::moveItem2(const InventoryTypeT source, packet = CMSG_MOVE_FROM_CART_TO_STORAGE; } + // for packetVersion < 20101124 need use other packet offset if (packet) { createOutPacket(packet); diff --git a/src/net/eathena/packetsout.inc b/src/net/eathena/packetsout.inc index 7bd0afd24..f3e5eb006 100644 --- a/src/net/eathena/packetsout.inc +++ b/src/net/eathena/packetsout.inc @@ -494,6 +494,11 @@ if (packetVersion >= 20080827) packet(CMSG_ITEM_PICKUP, 0x00f5, 11, clif->pTakeItem); packet(CMSG_PLAYER_INVENTORY_DROP, 0x0116, 17, clif->pDropItem); packet(CMSG_MOVE_TO_STORAGE, 0x0094, 19, clif->pMoveToKafra); + packet(CMSG_PLAYER_CHANGE_DEST, 0x00a7, 9, clif->pWalkToXY); + packet(CMSG_NAME_REQUEST, 0x008c, 14, clif->pGetCharNameRequest); + packet(CMSG_SKILL_USE_POSITION, 0x0113, 25, clif->pUseSkillToPos); + packet(CMSG_SOLVE_CHAR_NAME, 0x00a2, 14, clif->pSolveCharName); + packet(CMSG_MOVE_FROM_STORAGE, 0x00f7, 17, clif->pMoveFromKafra); } // 20080910 diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp index 51e597912..ccffde7a6 100644 --- a/src/net/eathena/playerhandler.cpp +++ b/src/net/eathena/playerhandler.cpp @@ -390,6 +390,8 @@ void PlayerHandler::setDestination(const int x, const int y, const int direction) const { createOutPacket(CMSG_PLAYER_CHANGE_DEST); + if (packetVersion >= 20080827 && packetVersion < 20101124) + outMsg.writeInt32(0, "unused"); outMsg.writeCoordinates(CAST_U16(x), CAST_U16(y), CAST_U8(direction), "destination"); diff --git a/src/net/eathena/skillhandler.cpp b/src/net/eathena/skillhandler.cpp index 3a815e5af..3b2af3fd8 100644 --- a/src/net/eathena/skillhandler.cpp +++ b/src/net/eathena/skillhandler.cpp @@ -53,10 +53,26 @@ void SkillHandler::usePos(const int id, const int level, const int x, const int y) const { createOutPacket(CMSG_SKILL_USE_POSITION); - outMsg.writeInt16(CAST_S16(level), "skill level"); - outMsg.writeInt16(CAST_S16(id), "skill id"); - outMsg.writeInt16(CAST_S16(x), "x"); - outMsg.writeInt16(CAST_S16(y), "y"); + if (packetVersion >= 20080827 && packetVersion < 20101124) + { + outMsg.writeInt32(0, "unused"); + outMsg.writeInt32(0, "unused"); + outMsg.writeInt16(CAST_S16(level), "skill level"); + outMsg.writeInt16(0, "unused"); + outMsg.writeInt16(CAST_S16(id), "skill id"); + outMsg.writeInt16(0, "unused"); + outMsg.writeInt16(CAST_S16(x), "x"); + outMsg.writeInt16(0, "unused"); + outMsg.writeInt8(0, "unused"); + outMsg.writeInt16(CAST_S16(y), "y"); + } + else + { + outMsg.writeInt16(CAST_S16(level), "skill level"); + outMsg.writeInt16(CAST_S16(id), "skill id"); + outMsg.writeInt16(CAST_S16(x), "x"); + outMsg.writeInt16(CAST_S16(y), "y"); + } } void SkillHandler::usePos(const int id, const int level, |