diff options
Diffstat (limited to 'src/net/eathena/mercenaryhandler.cpp')
-rw-r--r-- | src/net/eathena/mercenaryhandler.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/net/eathena/mercenaryhandler.cpp b/src/net/eathena/mercenaryhandler.cpp index 6aa424682..b48a6b39b 100644 --- a/src/net/eathena/mercenaryhandler.cpp +++ b/src/net/eathena/mercenaryhandler.cpp @@ -41,6 +41,7 @@ MercenaryHandler::MercenaryHandler() : { SMSG_MERCENARY_UPDATE, SMSG_MERCENARY_INFO, + SMSG_MERCENARY_SKILLS, 0 }; handledMessages = _messages; @@ -59,6 +60,10 @@ void MercenaryHandler::handleMessage(Net::MessageIn &msg) processMercenaryInfo(msg); break; + case SMSG_MERCENARY_SKILLS: + processMercenarySkills(msg); + break; + default: break; } @@ -96,4 +101,20 @@ void MercenaryHandler::processMercenaryInfo(Net::MessageIn &msg) msg.readInt16("attack range"); } +void MercenaryHandler::processMercenarySkills(Net::MessageIn &msg) +{ + // +++ need create if need mercenary being and update stats + const int count = (msg.readInt16("len") - 4) / 37; + for (int f = 0; f < count; f ++) + { + msg.readInt16("skill id"); + msg.readInt32("inf"); + msg.readInt16("level"); + msg.readInt16("sp"); + msg.readInt16("attack range"); + msg.readString(24, "name"); + msg.readUInt8("upgradable"); + } +} + } // namespace EAthena |