summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-18 19:11:02 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-18 19:11:02 +0300
commit9499d44c38597c70f32426497994238d73bf7130 (patch)
tree55a60cd7e435f49462ce472b26060de6e1c13cf4 /src/net
parent627c9a7a762ebaf2ae65c5938986f24a5400d52b (diff)
downloadplus-9499d44c38597c70f32426497994238d73bf7130.tar.gz
plus-9499d44c38597c70f32426497994238d73bf7130.tar.bz2
plus-9499d44c38597c70f32426497994238d73bf7130.tar.xz
plus-9499d44c38597c70f32426497994238d73bf7130.zip
eathena: add packet SMSG_PLAYER_SKILL_COOLDOWN_LIST 0x0985.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/packets.h2
-rw-r--r--src/net/eathena/protocol.h1
-rw-r--r--src/net/eathena/skillhandler.cpp18
-rw-r--r--src/net/eathena/skillhandler.h2
4 files changed, 22 insertions, 1 deletions
diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h
index f947a91d3..cbbc5ed8c 100644
--- a/src/net/eathena/packets.h
+++ b/src/net/eathena/packets.h
@@ -247,7 +247,7 @@ int16_t packet_lengths[] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
31, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 288, 0, 0,
// #0x0980
- 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 29, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
31, -1, -1, 0, 0, -1, -1, 0, 0, 11, 9, 8, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index 5db622079..0d3aa1e14 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -81,6 +81,7 @@
#define SMSG_PLAYER_SKILL_UP 0x010e
#define SMSG_PLAYER_HEAL 0x013d
#define SMSG_PLAYER_SKILL_COOLDOWN 0x043d
+#define SMSG_PLAYER_SKILL_COOLDOWN_LIST 0x0985
#define SMSG_SKILL_FAILED 0x0110
#define SMSG_SKILL_DAMAGE 0x01de
#define SMSG_SKILL_AUTO_CAST 0x0147
diff --git a/src/net/eathena/skillhandler.cpp b/src/net/eathena/skillhandler.cpp
index 640b6fbbc..9846a6c2a 100644
--- a/src/net/eathena/skillhandler.cpp
+++ b/src/net/eathena/skillhandler.cpp
@@ -46,6 +46,7 @@ SkillHandler::SkillHandler() :
SMSG_SKILL_FAILED,
SMSG_PLAYER_SKILL_UP,
SMSG_PLAYER_SKILL_COOLDOWN,
+ SMSG_PLAYER_SKILL_COOLDOWN_LIST,
0
};
handledMessages = _messages;
@@ -72,6 +73,10 @@ void SkillHandler::handleMessage(Net::MessageIn &msg)
processSkillCoolDown(msg);
break;
+ case SMSG_PLAYER_SKILL_COOLDOWN_LIST:
+ processSkillCoolDownList(msg);
+ break;
+
default:
break;
}
@@ -155,4 +160,17 @@ void SkillHandler::processSkillCoolDown(Net::MessageIn &msg)
skillDialog->setSkillDuration(skillId, duration);
}
+void SkillHandler::processSkillCoolDownList(Net::MessageIn &msg)
+{
+ const int count = (msg.readInt16("len") - 4) / 10;
+ for (int f = 0; f < count; f ++)
+ {
+ const int skillId = msg.readInt16("skill id");
+ msg.readInt32("total");
+ const int duration = msg.readInt32("duration");
+ if (skillDialog)
+ skillDialog->setSkillDuration(skillId, duration);
+ }
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/skillhandler.h b/src/net/eathena/skillhandler.h
index 8ea91eb0c..66f96f3eb 100644
--- a/src/net/eathena/skillhandler.h
+++ b/src/net/eathena/skillhandler.h
@@ -55,6 +55,8 @@ class SkillHandler final : public MessageHandler, public Ea::SkillHandler
void processPlayerSkills(Net::MessageIn &msg);
void processSkillCoolDown(Net::MessageIn &msg);
+
+ void processSkillCoolDownList(Net::MessageIn &msg);
};
} // namespace EAthena