diff options
Diffstat (limited to 'src/net/eathena/skillhandler.cpp')
-rw-r--r-- | src/net/eathena/skillhandler.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
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 |