summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-14 14:11:47 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-14 14:11:47 +0300
commitd5a549b6af3579d247bfb7d4ca22c31ca0f3dc38 (patch)
treedbd146bc0a5f477a2f1f79986be719f2ee384596 /src/net
parentfe0ec89b20da19d9670cfcde7623b379c669c7c3 (diff)
downloadmv-d5a549b6af3579d247bfb7d4ca22c31ca0f3dc38.tar.gz
mv-d5a549b6af3579d247bfb7d4ca22c31ca0f3dc38.tar.bz2
mv-d5a549b6af3579d247bfb7d4ca22c31ca0f3dc38.tar.xz
mv-d5a549b6af3579d247bfb7d4ca22c31ca0f3dc38.zip
eathena: add partial support for packet.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/inventoryhandler.cpp12
-rw-r--r--src/net/eathena/inventoryhandler.h2
-rw-r--r--src/net/eathena/packets.h2
-rw-r--r--src/net/eathena/protocol.h1
4 files changed, 16 insertions, 1 deletions
diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp
index 7ffd0f025..8b75b1df9 100644
--- a/src/net/eathena/inventoryhandler.cpp
+++ b/src/net/eathena/inventoryhandler.cpp
@@ -72,6 +72,7 @@ InventoryHandler::InventoryHandler() :
SMSG_PLAYER_UNE_CARD,
SMSG_PLAYER_INSERT_CARD,
SMSG_PLAYER_ITEM_RENTAL_TIME,
+ SMSG_PLAYER_ITEM_RENTAL_EXPIRED,
0
};
handledMessages = _messages;
@@ -166,6 +167,10 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg)
processPlayerItemRentalTime(msg);
break;
+ case SMSG_PLAYER_ITEM_RENTAL_EXPIRED:
+ processPlayerItemRentalExpired(msg);
+ break;
+
default:
break;
}
@@ -649,4 +654,11 @@ void InventoryHandler::processPlayerItemRentalTime(Net::MessageIn &msg)
msg.readInt32("seconds");
}
+void InventoryHandler::processPlayerItemRentalExpired(Net::MessageIn &msg)
+{
+ // ++ need remove item from inventory
+ msg.readInt16("index");
+ msg.readInt16("item id");
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/inventoryhandler.h b/src/net/eathena/inventoryhandler.h
index 172e0a625..74f46785d 100644
--- a/src/net/eathena/inventoryhandler.h
+++ b/src/net/eathena/inventoryhandler.h
@@ -92,6 +92,8 @@ class InventoryHandler final : public MessageHandler,
void processPlayerInsertCard(Net::MessageIn &msg);
void processPlayerItemRentalTime(Net::MessageIn &msg);
+
+ void processPlayerItemRentalExpired(Net::MessageIn &msg);
};
} // namespace EAthena
diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h
index 96f0f356a..0df40de93 100644
--- a/src/net/eathena/packets.h
+++ b/src/net/eathena/packets.h
@@ -94,7 +94,7 @@ int16_t packet_lengths[] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
// #0x0280
0, 0, 0, 6, 14, 0, 0, 0, 0, 0, 18, 0, 0, 0, 4, 0,
- 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 0, -1, 0, 0,
+ 4, 4, 0, 0, 0, 0, 0, 0, 8, 6, 0, 80, 0, -1, 0, 0,
0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, -1, -1, 107, 6, -1, 0, 7, 0, 191, 0, 0, 0, 0, 0, 0,
// #0x02C0
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index 0d13ee184..f80286901 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -75,6 +75,7 @@
#define SMSG_PLAYER_INVENTORY_REMOVE2 0x07fa
#define SMSG_PLAYER_INVENTORY_USE 0x01c8
#define SMSG_PLAYER_ITEM_RENTAL_TIME 0x0298
+#define SMSG_PLAYER_ITEM_RENTAL_EXPIRED 0x0299
#define SMSG_PLAYER_EQUIPMENT 0x0992
#define SMSG_PLAYER_EQUIP 0x0999
#define SMSG_PLAYER_UNEQUIP 0x099a