summaryrefslogtreecommitdiff
path: root/src/net/eathena/skillhandler.cpp
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/eathena/skillhandler.cpp
parent627c9a7a762ebaf2ae65c5938986f24a5400d52b (diff)
downloadmv-9499d44c38597c70f32426497994238d73bf7130.tar.gz
mv-9499d44c38597c70f32426497994238d73bf7130.tar.bz2
mv-9499d44c38597c70f32426497994238d73bf7130.tar.xz
mv-9499d44c38597c70f32426497994238d73bf7130.zip
eathena: add packet SMSG_PLAYER_SKILL_COOLDOWN_LIST 0x0985.
Diffstat (limited to 'src/net/eathena/skillhandler.cpp')
-rw-r--r--src/net/eathena/skillhandler.cpp18
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