diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-06-28 00:15:14 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-06-28 00:15:14 +0300 |
commit | c1f88822164bd9f19af7ea6b344a18cb1da8a493 (patch) | |
tree | 778a0bcc2308a6870e9de3f6cd58127dd65ac766 /src/net/eathena | |
parent | 9ff9c83e561e8a6f70b6245e29437db2645b1e97 (diff) | |
download | plus-c1f88822164bd9f19af7ea6b344a18cb1da8a493.tar.gz plus-c1f88822164bd9f19af7ea6b344a18cb1da8a493.tar.bz2 plus-c1f88822164bd9f19af7ea6b344a18cb1da8a493.tar.xz plus-c1f88822164bd9f19af7ea6b344a18cb1da8a493.zip |
Add packet SMSG_PLAYER_INVENTORY_ADD 0x0a37.
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/inventoryrecv.cpp | 8 | ||||
-rw-r--r-- | src/net/eathena/packetsin.inc | 6 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/net/eathena/inventoryrecv.cpp b/src/net/eathena/inventoryrecv.cpp index 08cd1975e..7b6368dad 100644 --- a/src/net/eathena/inventoryrecv.cpp +++ b/src/net/eathena/inventoryrecv.cpp @@ -219,6 +219,7 @@ void InventoryRecv::processPlayerInventoryAdd(Net::MessageIn &msg) const uint8_t identified = msg.readUInt8("identified"); const uint8_t damaged = msg.readUInt8("is damaged"); const uint8_t refine = msg.readUInt8("refine"); + Favorite favorite = Favorite_false; int cards[maxCards]; for (int f = 0; f < maxCards; f++) cards[f] = msg.readUInt16("card"); @@ -246,6 +247,11 @@ void InventoryRecv::processPlayerInventoryAdd(Net::MessageIn &msg) options->add(idx, val); } } + if (msg.getVersion() >= 20160921) + { + favorite = fromBool(msg.readUInt8("favorite"), Favorite); + msg.readInt16("look"); + } const ItemColor color = ItemColorManager::getColorFromCards(&cards[0]); BeingId floorId; @@ -344,7 +350,7 @@ void InventoryRecv::processPlayerInventoryAdd(Net::MessageIn &msg) color, fromBool(identified, Identified), fromBool(damaged, Damaged), - Favorite_false, + favorite, fromBool(equipType, Equipm), Equipped_false); inventory->setCards(index, cards, 4); diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc index 6360b0e24..c49b1a23c 100644 --- a/src/net/eathena/packetsin.inc +++ b/src/net/eathena/packetsin.inc @@ -887,6 +887,12 @@ if (packetVersion >= 20160330) packet(SMSG_MAP_LOGIN_SUCCESS, 0x02eb, 13, &GameRecv::processMapLogin, 20080102); } +// 20160921 +if (packetVersion >= 20160921) +{ + packet(SMSG_PLAYER_INVENTORY_ADD, 0x0a37, 59, &InventoryRecv::processPlayerInventoryAdd, 20160921); +} + // 20170315 if (packetVersion >= 20170315) { |