summaryrefslogtreecommitdiff
path: root/src/net/skillhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/skillhandler.cpp')
-rw-r--r--src/net/skillhandler.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/net/skillhandler.cpp b/src/net/skillhandler.cpp
index 89009e47..d9bea775 100644
--- a/src/net/skillhandler.cpp
+++ b/src/net/skillhandler.cpp
@@ -39,27 +39,27 @@ SkillHandler::SkillHandler()
handledMessages = _messages;
}
-void SkillHandler::handleMessage(MessageIn *msg)
+void SkillHandler::handleMessage(MessageIn &msg)
{
int skillCount;
- switch (msg->getId())
+ switch (msg.getId())
{
case SMSG_PLAYER_SKILLS:
- msg->readShort(); // length
- skillCount = (msg->getLength() - 4) / 37;
+ msg.readShort(); // length
+ skillCount = (msg.getLength() - 4) / 37;
skillDialog->cleanList();
for (int k = 0; k < skillCount; k++)
{
- Sint16 skillId = msg->readShort();
- msg->readShort(); // target type
- msg->readShort(); // unknown
- Sint16 level = msg->readShort();
- Sint16 sp = msg->readShort();
- msg->readShort(); // range
- std::string skillName = msg->readString(24);
- Sint8 up = msg->readByte();
+ Sint16 skillId = msg.readShort();
+ msg.readShort(); // target type
+ msg.readShort(); // unknown
+ Sint16 level = msg.readShort();
+ Sint16 sp = msg.readShort();
+ msg.readShort(); // range
+ std::string skillName = msg.readString(24);
+ Sint8 up = msg.readByte();
if (level != 0 || up != 0)
{
@@ -77,11 +77,11 @@ void SkillHandler::handleMessage(MessageIn *msg)
// Action failed (ex. sit because you have not reached the
// right level)
CHATSKILL action;
- action.skill = msg->readShort();
- action.bskill = msg->readShort();
- action.unused = msg->readShort(); // unknown
- action.success = msg->readByte();
- action.reason = msg->readByte();
+ action.skill = msg.readShort();
+ action.bskill = msg.readShort();
+ action.unused = msg.readShort(); // unknown
+ action.success = msg.readByte();
+ action.reason = msg.readByte();
if (action.success != SKILL_FAILED &&
action.bskill == BSKILL_EMOTE)
{