diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-10-14 15:55:29 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-10-14 15:55:29 +0300 |
commit | a7105aa2f73a372be018173e47b2fa8e6cfa87e4 (patch) | |
tree | 3e50a5a0560c043a2c7d3116e51271ae5cebe88d | |
parent | 9e01119b7fad64dbf8aa4017443aa077f1be308d (diff) | |
download | manaverse-a7105aa2f73a372be018173e47b2fa8e6cfa87e4.tar.gz manaverse-a7105aa2f73a372be018173e47b2fa8e6cfa87e4.tar.bz2 manaverse-a7105aa2f73a372be018173e47b2fa8e6cfa87e4.tar.xz manaverse-a7105aa2f73a372be018173e47b2fa8e6cfa87e4.zip |
eathena: add partial support for SMSG_ELEMENTAL_INFO 0x081d.
-rw-r--r-- | src/net/eathena/elementalhandler.cpp | 14 | ||||
-rw-r--r-- | src/net/eathena/elementalhandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/packets.h | 2 | ||||
-rw-r--r-- | src/net/eathena/protocol.h | 1 |
4 files changed, 18 insertions, 1 deletions
diff --git a/src/net/eathena/elementalhandler.cpp b/src/net/eathena/elementalhandler.cpp index dc21746cd..8dc8b6684 100644 --- a/src/net/eathena/elementalhandler.cpp +++ b/src/net/eathena/elementalhandler.cpp @@ -35,6 +35,7 @@ ElementalHandler::ElementalHandler() : static const uint16_t _messages[] = { SMSG_ELEMENTAL_UPDATE_STATUS, + SMSG_ELEMENTAL_INFO, 0 }; handledMessages = _messages; @@ -49,6 +50,10 @@ void ElementalHandler::handleMessage(Net::MessageIn &msg) processElementalUpdateStatus(msg); break; + case SMSG_ELEMENTAL_INFO: + processElementalInfo(msg); + break; + default: break; } @@ -60,4 +65,13 @@ void ElementalHandler::processElementalUpdateStatus(Net::MessageIn &msg) msg.readInt32("value"); } +void ElementalHandler::processElementalInfo(Net::MessageIn &msg) +{ + msg.readInt32("elemental id"); + msg.readInt32("hp"); + msg.readInt32("max hp"); + msg.readInt32("sp"); + msg.readInt32("max sp"); +} + } // namespace EAthena diff --git a/src/net/eathena/elementalhandler.h b/src/net/eathena/elementalhandler.h index 1bbdd2b15..e77845432 100644 --- a/src/net/eathena/elementalhandler.h +++ b/src/net/eathena/elementalhandler.h @@ -39,6 +39,8 @@ class ElementalHandler final : public MessageHandler, protected: void processElementalUpdateStatus(Net::MessageIn &msg); + + void processElementalInfo(Net::MessageIn &msg); }; } // namespace EAthena diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h index ef06cf3ca..e98366251 100644 --- a/src/net/eathena/packets.h +++ b/src/net/eathena/packets.h @@ -216,7 +216,7 @@ int16_t packet_lengths[] = //0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 // #0x0800 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 20, - 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 26, 0, // #0x0840 diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index c5c653d8c..53631859c 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -299,6 +299,7 @@ #define SMSG_AUCTION_OPEN_WINDOW 0x025f #define SMSG_ELEMENTAL_UPDATE_STATUS 0x081e +#define SMSG_ELEMENTAL_INFO 0x081d /********************************** * Packets from client to server * |