diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-19 19:50:58 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-19 19:50:58 +0300 |
commit | 0dbfdfcfd3c16e0442ac0c867890cd76a5c5f32a (patch) | |
tree | 63a600bf2f98fe3461a32931b4114038c43fc514 /src/net | |
parent | 6ea528b2eff23e9a7c833692afc080c786ed2419 (diff) | |
download | plus-0dbfdfcfd3c16e0442ac0c867890cd76a5c5f32a.tar.gz plus-0dbfdfcfd3c16e0442ac0c867890cd76a5c5f32a.tar.bz2 plus-0dbfdfcfd3c16e0442ac0c867890cd76a5c5f32a.tar.xz plus-0dbfdfcfd3c16e0442ac0c867890cd76a5c5f32a.zip |
eathena: add partial support for packet SMSG_MERCENARY_INFO 0x029b.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/eathena/mercenaryhandler.cpp | 32 | ||||
-rw-r--r-- | src/net/eathena/mercenaryhandler.h | 1 | ||||
-rw-r--r-- | src/net/eathena/packets.h | 2 | ||||
-rw-r--r-- | src/net/eathena/protocol.h | 1 |
4 files changed, 34 insertions, 2 deletions
diff --git a/src/net/eathena/mercenaryhandler.cpp b/src/net/eathena/mercenaryhandler.cpp index 4bab3a499..6aa424682 100644 --- a/src/net/eathena/mercenaryhandler.cpp +++ b/src/net/eathena/mercenaryhandler.cpp @@ -40,6 +40,7 @@ MercenaryHandler::MercenaryHandler() : static const uint16_t _messages[] = { SMSG_MERCENARY_UPDATE, + SMSG_MERCENARY_INFO, 0 }; handledMessages = _messages; @@ -54,6 +55,10 @@ void MercenaryHandler::handleMessage(Net::MessageIn &msg) processMercenaryUpdate(msg); break; + case SMSG_MERCENARY_INFO: + processMercenaryInfo(msg); + break; + default: break; } @@ -61,9 +66,34 @@ void MercenaryHandler::handleMessage(Net::MessageIn &msg) void MercenaryHandler::processMercenaryUpdate(Net::MessageIn &msg) { - // +++ need create if need mercenary being and update stat + // +++ need create if need mercenary being and update stats msg.readInt16("type"); msg.readInt32("value"); } +void MercenaryHandler::processMercenaryInfo(Net::MessageIn &msg) +{ + // +++ need create if need mercenary being and update stats + msg.readInt32("account id"); // owner + msg.readInt16("atk"); + msg.readInt16("matk"); + msg.readInt16("hit"); + msg.readInt16("crit/10"); + msg.readInt16("def"); + msg.readInt16("mdef"); + msg.readInt16("flee"); + msg.readInt16("attack speed"); + msg.readString(24, "name"); + msg.readInt16("level"); + msg.readInt32("hp"); + msg.readInt32("max hp"); + msg.readInt32("sp"); + msg.readInt32("max sp"); + msg.readInt32("expire time"); + msg.readInt16("faith"); + msg.readInt32("calls"); + msg.readInt32("kills"); + msg.readInt16("attack range"); +} + } // namespace EAthena diff --git a/src/net/eathena/mercenaryhandler.h b/src/net/eathena/mercenaryhandler.h index 742aeb9fb..1b3749f01 100644 --- a/src/net/eathena/mercenaryhandler.h +++ b/src/net/eathena/mercenaryhandler.h @@ -42,6 +42,7 @@ class MercenaryHandler final : public MessageHandler, protected: void processMercenaryUpdate(Net::MessageIn &msg); + void processMercenaryInfo(Net::MessageIn &msg); }; } // namespace EAthena diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h index 6d1c765e6..75c7bc891 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 0, 0, 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, 0, 0, 191, 0, 0, 0, 0, 0, 0, // #0x02C0 diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index f3af515da..0f26a5ca9 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -249,6 +249,7 @@ #define SMSG_NPC_VIEWPOINT 0x0144 #define SMSG_MERCENARY_UPDATE 0x02a2 +#define SMSG_MERCENARY_INFO 0x029b /********************************** * Packets from client to server * |