summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-07-19 19:06:22 +0300
committerAndrei Karas <akaras@inbox.ru>2016-07-19 19:06:22 +0300
commit5220fbf360d8fed37f62e9b1cff88fe69c2e7615 (patch)
tree805ccc7f88216db69e35f153a6f30f14de808622 /src
parentad6f481792dd4df5adc47bec543bb1e349d566d9 (diff)
downloadmv-5220fbf360d8fed37f62e9b1cff88fe69c2e7615.tar.gz
mv-5220fbf360d8fed37f62e9b1cff88fe69c2e7615.tar.bz2
mv-5220fbf360d8fed37f62e9b1cff88fe69c2e7615.tar.xz
mv-5220fbf360d8fed37f62e9b1cff88fe69c2e7615.zip
Read inf2 field in packet SMSG_PLAYER_SKILLS.
Diffstat (limited to 'src')
-rw-r--r--src/net/eathena/skillrecv.cpp7
1 files changed, 6 insertions, 1 deletions
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<SkillType::SkillType>(
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");