summaryrefslogtreecommitdiff
path: root/src/net/eathena/mercenaryhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-19 20:56:49 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-19 20:56:49 +0300
commitdbc90e69531c5ae8fddfcfbd6adeaca0ad144f34 (patch)
tree5df1fb43e4823848afc2ca6434c66ff76ebc0a25 /src/net/eathena/mercenaryhandler.cpp
parent0dbfdfcfd3c16e0442ac0c867890cd76a5c5f32a (diff)
downloadplus-dbc90e69531c5ae8fddfcfbd6adeaca0ad144f34.tar.gz
plus-dbc90e69531c5ae8fddfcfbd6adeaca0ad144f34.tar.bz2
plus-dbc90e69531c5ae8fddfcfbd6adeaca0ad144f34.tar.xz
plus-dbc90e69531c5ae8fddfcfbd6adeaca0ad144f34.zip
eathena: add partial support for packet SMSG_MERCENARY_SKILLS 0x029d.
Diffstat (limited to 'src/net/eathena/mercenaryhandler.cpp')
-rw-r--r--src/net/eathena/mercenaryhandler.cpp21
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