From 5220fbf360d8fed37f62e9b1cff88fe69c2e7615 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 19 Jul 2016 19:06:22 +0300 Subject: Read inf2 field in packet SMSG_PLAYER_SKILLS. --- src/net/eathena/skillrecv.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/net/eathena/skillrecv.cpp') diff --git a/src/net/eathena/skillrecv.cpp b/src/net/eathena/skillrecv.cpp index 254676f77..e525fa8a1 100644 --- a/src/net/eathena/skillrecv.cpp +++ b/src/net/eathena/skillrecv.cpp @@ -59,13 +59,16 @@ static const unsigned int RFAIL_NEED_ITEM = 71; static const unsigned int RFAIL_NEED_EQUIPMENT = 72; static const unsigned int RFAIL_SPIRITS = 74; +extern int serverVersion; + namespace EAthena { void SkillRecv::processPlayerSkills(Net::MessageIn &msg) { msg.readInt16("len"); - const int skillCount = (msg.getLength() - 4) / 37; + const int sz = (serverVersion >= 15) ? 41 : 37; + const int skillCount = (msg.getLength() - 4) / sz; int updateSkill = 0; if (skillDialog) @@ -75,6 +78,8 @@ void SkillRecv::processPlayerSkills(Net::MessageIn &msg) const int skillId = msg.readInt16("skill id"); const SkillType::SkillType inf = static_cast( msg.readInt32("inf")); + if (serverVersion >= 15) + msg.readInt32("inf2"); const int level = msg.readInt16("skill level"); const int sp = msg.readInt16("sp"); const int range = msg.readInt16("range"); -- cgit v1.2.3-70-g09d2