summaryrefslogtreecommitdiff
path: root/src/net/eathena/playerhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-05-18 18:28:54 +0300
committerAndrei Karas <akaras@inbox.ru>2016-05-18 18:28:54 +0300
commitf00e360dcd31b08e62d8f88385722005200216c4 (patch)
tree86482c7d5ffaf2060da236ac0bafffb667c72870 /src/net/eathena/playerhandler.cpp
parentd792bfdd47f922b18b320444249db68255e1728a (diff)
downloadplus-f00e360dcd31b08e62d8f88385722005200216c4.tar.gz
plus-f00e360dcd31b08e62d8f88385722005200216c4.tar.bz2
plus-f00e360dcd31b08e62d8f88385722005200216c4.tar.xz
plus-f00e360dcd31b08e62d8f88385722005200216c4.zip
Impliment packet CMSG_ITEM_PICKUP for all packet versions.
Diffstat (limited to 'src/net/eathena/playerhandler.cpp')
-rw-r--r--src/net/eathena/playerhandler.cpp97
1 files changed, 96 insertions, 1 deletions
diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp
index 8f5e625e8..e8045a16a 100644
--- a/src/net/eathena/playerhandler.cpp
+++ b/src/net/eathena/playerhandler.cpp
@@ -104,7 +104,102 @@ void PlayerHandler::pickUp(const FloorItem *const floorItem) const
return;
createOutPacket(CMSG_ITEM_PICKUP);
- outMsg.writeBeingId(floorItem->getId(), "object id");
+ const BeingId id = floorItem->getId();
+ if (packetVersion >= 20101124)
+ {
+ outMsg.writeBeingId(id, "object id");
+ }
+ else if (packetVersion >= 20080827)
+ {
+ outMsg.writeInt32(0, "unused");
+ outMsg.writeInt8(0, "unused");
+ outMsg.writeBeingId(id, "object id");
+ }
+ else if (packetVersion >= 20070212)
+ {
+ outMsg.writeInt32(0, "unused");
+ outMsg.writeBeingId(id, "object id");
+ }
+ else if (packetVersion >= 20070108)
+ {
+ outMsg.writeInt32(0, "unused");
+ outMsg.writeInt8(0, "unused");
+ outMsg.writeBeingId(id, "object id");
+ }
+ else if (packetVersion >= 20050719)
+ {
+ outMsg.writeInt32(0, "unused");
+ outMsg.writeInt16(0, "unused");
+ outMsg.writeInt8(0, "unused");
+ outMsg.writeBeingId(id, "object id");
+ }
+ else if (packetVersion >= 20050718)
+ {
+ outMsg.writeInt8(0, "unused");
+ outMsg.writeBeingId(id, "object id");
+ }
+ if (packetVersion >= 20050628)
+ {
+ outMsg.writeInt32(0, "unused");
+ outMsg.writeInt8(0, "unused");
+ outMsg.writeBeingId(id, "object id");
+ }
+ else if (packetVersion >= 20050509)
+ {
+ outMsg.writeInt16(0, "unused");
+ outMsg.writeBeingId(id, "object id");
+ }
+ else if (packetVersion >= 20050110)
+ {
+ outMsg.writeInt16(0, "unused");
+ outMsg.writeInt8(0, "unused");
+ outMsg.writeBeingId(id, "object id");
+ }
+ else if (packetVersion >= 20041129)
+ {
+ outMsg.writeInt8(0, "unused");
+ outMsg.writeBeingId(id, "object id");
+ }
+ else if (packetVersion >= 20041025)
+ {
+ outMsg.writeInt16(0, "unused");
+ outMsg.writeInt8(0, "unused");
+ outMsg.writeBeingId(id, "object id");
+ }
+ else if (packetVersion >= 20041005)
+ {
+ outMsg.writeInt32(0, "unused");
+ outMsg.writeBeingId(id, "object id");
+ }
+ else if (packetVersion >= 20040920)
+ {
+ outMsg.writeInt32(0, "unused");
+ outMsg.writeInt32(0, "unused");
+ outMsg.writeBeingId(id, "object id");
+ }
+ else if (packetVersion >= 20040906)
+ {
+ outMsg.writeInt32(0, "unused");
+ outMsg.writeInt8(0, "unused");
+ outMsg.writeBeingId(id, "object id");
+ }
+ else if (packetVersion >= 20040809)
+ {
+ outMsg.writeInt32(0, "unused");
+ outMsg.writeInt16(0, "unused");
+ outMsg.writeInt8(0, "unused");
+ outMsg.writeBeingId(id, "object id");
+ }
+ else if (packetVersion >= 20040713)
+ {
+ outMsg.writeInt32(0, "unused");
+ outMsg.writeBeingId(id, "object id");
+ }
+ else
+ {
+ outMsg.writeBeingId(id, "object id");
+ }
+
EAthena::InventoryHandler *const handler =
static_cast<EAthena::InventoryHandler*>(inventoryHandler);
if (handler)