diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-04-02 00:07:14 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-04-02 00:07:14 +0300 |
commit | d16d311387932e62e06bf6940b3ac1be26b8c6af (patch) | |
tree | 54aa49e3c757216d3241db086da14a54c8e06cb9 /src/net/eathena/skillrecv.cpp | |
parent | 6cda8f1c63f599ceeeac8a13c3fa657f5554d941 (diff) | |
download | mv-d16d311387932e62e06bf6940b3ac1be26b8c6af.tar.gz mv-d16d311387932e62e06bf6940b3ac1be26b8c6af.tar.bz2 mv-d16d311387932e62e06bf6940b3ac1be26b8c6af.tar.xz mv-d16d311387932e62e06bf6940b3ac1be26b8c6af.zip |
Sort more packets. Add version checks inside packets.
Diffstat (limited to 'src/net/eathena/skillrecv.cpp')
-rw-r--r-- | src/net/eathena/skillrecv.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/net/eathena/skillrecv.cpp b/src/net/eathena/skillrecv.cpp index 35d36f866..f937deb22 100644 --- a/src/net/eathena/skillrecv.cpp +++ b/src/net/eathena/skillrecv.cpp @@ -182,11 +182,17 @@ void SkillRecv::processSkillCoolDown(Net::MessageIn &msg) void SkillRecv::processSkillCoolDownList(Net::MessageIn &msg) { - const int count = (msg.readInt16("len") - 4) / 10; + int packetLen; + if (msg.getVersion() >= 20120604) + packetLen = 10; + else + packetLen = 6; + const int count = (msg.readInt16("len") - 4) / packetLen; for (int f = 0; f < count; f ++) { const int skillId = msg.readInt16("skill id"); - msg.readInt32("total"); + if (msg.getVersion() >= 20120604) + msg.readInt32("total"); const int duration = msg.readInt32("duration"); if (skillDialog) { |