summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-03 17:34:05 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-03 17:34:05 +0300
commitb6030e26ed33dd5d5dd85519cacb4644100cb299 (patch)
tree1e308b17cb6e8f9ec6e500c2c0ed19adc4fdc997 /src
parentc9e8b0ed6e3e193582eccd9b9bab6aeb3a0e37c3 (diff)
downloadmanaplus-b6030e26ed33dd5d5dd85519cacb4644100cb299.tar.gz
manaplus-b6030e26ed33dd5d5dd85519cacb4644100cb299.tar.bz2
manaplus-b6030e26ed33dd5d5dd85519cacb4644100cb299.tar.xz
manaplus-b6030e26ed33dd5d5dd85519cacb4644100cb299.zip
eathena: add partial support for packet SMSG_PLAYER_UNE_CARD 0x017b.
Diffstat (limited to 'src')
-rw-r--r--src/net/eathena/inventoryhandler.cpp15
-rw-r--r--src/net/eathena/inventoryhandler.h2
-rw-r--r--src/net/eathena/protocol.h1
3 files changed, 18 insertions, 0 deletions
diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp
index f0b0d7a1d..953242462 100644
--- a/src/net/eathena/inventoryhandler.cpp
+++ b/src/net/eathena/inventoryhandler.cpp
@@ -69,6 +69,7 @@ InventoryHandler::InventoryHandler() :
SMSG_PLAYER_UNEQUIP,
SMSG_PLAYER_ARROW_EQUIP,
SMSG_PLAYER_ATTACK_RANGE,
+ SMSG_PLAYER_UNE_CARD,
0
};
handledMessages = _messages;
@@ -151,6 +152,10 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg)
processPlayerArrowEquip(msg);
break;
+ case SMSG_PLAYER_UNE_CARD:
+ processPlayerUseCard(msg);
+ break;
+
default:
break;
}
@@ -589,6 +594,16 @@ void InventoryHandler::processPlayerStorageAdd(Net::MessageIn &msg)
BLOCK_END("InventoryHandler::processPlayerStorageAdd")
}
+void InventoryHandler::processPlayerUseCard(Net::MessageIn &msg)
+{
+ // +++ here need show dialog with item selection for card.
+ const int count = (msg.readInt16("len") - 4) / 2;
+ for (int f = 0; f < count; f ++)
+ {
+ msg.readInt16("item id");
+ }
+}
+
void InventoryHandler::selectEgg(const Item *const item) const
{
createOutPacket(CMSG_PET_SELECT_EGG);
diff --git a/src/net/eathena/inventoryhandler.h b/src/net/eathena/inventoryhandler.h
index 376a1496b..b00d7af51 100644
--- a/src/net/eathena/inventoryhandler.h
+++ b/src/net/eathena/inventoryhandler.h
@@ -86,6 +86,8 @@ class InventoryHandler final : public MessageHandler,
void processPlayerStorageEquip(Net::MessageIn &msg);
void processPlayerStorageAdd(Net::MessageIn &msg);
+
+ void processPlayerUseCard(Net::MessageIn &msg);
};
} // namespace EAthena
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index a6b2be72d..4d6370a69 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -74,6 +74,7 @@
#define SMSG_PLAYER_EQUIPMENT 0x0992
#define SMSG_PLAYER_EQUIP 0x0999
#define SMSG_PLAYER_UNEQUIP 0x099a
+#define SMSG_PLAYER_UNE_CARD 0x017b
#define SMSG_PLAYER_ATTACK_RANGE 0x013a
#define SMSG_PLAYER_ARROW_EQUIP 0x013c
#define SMSG_PLAYER_ARROW_MESSAGE 0x013b