diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-10-14 15:50:29 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-10-14 15:50:29 +0300 |
commit | 9e01119b7fad64dbf8aa4017443aa077f1be308d (patch) | |
tree | 4dd3947a8f153e25dafbf27494654f8338a98d8f /src | |
parent | f201143f1896adc0b94cd62b5f28b9b7bfe5fb39 (diff) | |
download | plus-9e01119b7fad64dbf8aa4017443aa077f1be308d.tar.gz plus-9e01119b7fad64dbf8aa4017443aa077f1be308d.tar.bz2 plus-9e01119b7fad64dbf8aa4017443aa077f1be308d.tar.xz plus-9e01119b7fad64dbf8aa4017443aa077f1be308d.zip |
eathena: add partial support for packet SMSG_ELEMENTAL_UPDATE_STATUS 0x081e.
Diffstat (limited to 'src')
-rw-r--r-- | src/net/eathena/elementalhandler.cpp | 13 | ||||
-rw-r--r-- | src/net/eathena/elementalhandler.h | 3 | ||||
-rw-r--r-- | src/net/eathena/packets.h | 2 | ||||
-rw-r--r-- | src/net/eathena/protocol.h | 2 |
4 files changed, 19 insertions, 1 deletions
diff --git a/src/net/eathena/elementalhandler.cpp b/src/net/eathena/elementalhandler.cpp index 9e4f77c0c..dc21746cd 100644 --- a/src/net/eathena/elementalhandler.cpp +++ b/src/net/eathena/elementalhandler.cpp @@ -20,6 +20,8 @@ #include "net/eathena/elementalhandler.h" +#include "net/eathena/protocol.h" + #include "debug.h" extern Net::ElementalHandler *elementalHandler; @@ -32,6 +34,7 @@ ElementalHandler::ElementalHandler() : { static const uint16_t _messages[] = { + SMSG_ELEMENTAL_UPDATE_STATUS, 0 }; handledMessages = _messages; @@ -42,9 +45,19 @@ void ElementalHandler::handleMessage(Net::MessageIn &msg) { switch (msg.getId()) { + case SMSG_ELEMENTAL_UPDATE_STATUS: + processElementalUpdateStatus(msg); + break; + default: break; } } +void ElementalHandler::processElementalUpdateStatus(Net::MessageIn &msg) +{ + msg.readInt16("type"); + msg.readInt32("value"); +} + } // namespace EAthena diff --git a/src/net/eathena/elementalhandler.h b/src/net/eathena/elementalhandler.h index 13f4d259b..1bbdd2b15 100644 --- a/src/net/eathena/elementalhandler.h +++ b/src/net/eathena/elementalhandler.h @@ -36,6 +36,9 @@ class ElementalHandler final : public MessageHandler, A_DELETE_COPY(ElementalHandler) void handleMessage(Net::MessageIn &msg) override final; + + protected: + void processElementalUpdateStatus(Net::MessageIn &msg); }; } // namespace EAthena diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h index e7112205c..ef06cf3ca 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, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 7b3da616c..c5c653d8c 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -298,6 +298,8 @@ #define SMSG_AUCTION_OPEN_WINDOW 0x025f +#define SMSG_ELEMENTAL_UPDATE_STATUS 0x081e + /********************************** * Packets from client to server * **********************************/ |