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/eathena/mercenaryhandler.cpp | |
parent | 6ea528b2eff23e9a7c833692afc080c786ed2419 (diff) | |
download | manaverse-0dbfdfcfd3c16e0442ac0c867890cd76a5c5f32a.tar.gz manaverse-0dbfdfcfd3c16e0442ac0c867890cd76a5c5f32a.tar.bz2 manaverse-0dbfdfcfd3c16e0442ac0c867890cd76a5c5f32a.tar.xz manaverse-0dbfdfcfd3c16e0442ac0c867890cd76a5c5f32a.zip |
eathena: add partial support for packet SMSG_MERCENARY_INFO 0x029b.
Diffstat (limited to 'src/net/eathena/mercenaryhandler.cpp')
-rw-r--r-- | src/net/eathena/mercenaryhandler.cpp | 32 |
1 files changed, 31 insertions, 1 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 |