From 9499d44c38597c70f32426497994238d73bf7130 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 18 Sep 2014 19:11:02 +0300 Subject: eathena: add packet SMSG_PLAYER_SKILL_COOLDOWN_LIST 0x0985. --- src/net/eathena/skillhandler.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/net/eathena/skillhandler.cpp') 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 -- cgit v1.2.3-60-g2f50