From 0f9ec2061c4ad6157c3186f1cab9c4d8558980b5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 29 May 2015 14:30:20 +0300 Subject: Add strong typed int type BeingId. --- src/net/eathena/skillhandler.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/net/eathena/skillhandler.cpp') diff --git a/src/net/eathena/skillhandler.cpp b/src/net/eathena/skillhandler.cpp index 27f4b136a..fb8cf39e7 100644 --- a/src/net/eathena/skillhandler.cpp +++ b/src/net/eathena/skillhandler.cpp @@ -159,12 +159,12 @@ void SkillHandler::handleMessage(Net::MessageIn &msg) } void SkillHandler::useBeing(const int id, const int level, - const int beingId) const + const BeingId beingId) const { createOutPacket(CMSG_SKILL_USE_BEING); outMsg.writeInt16(static_cast(level), "skill level"); outMsg.writeInt16(static_cast(id), "skill id"); - outMsg.writeInt32(beingId, "target id"); + outMsg.writeInt32(toInt(beingId, int), "target id"); } void SkillHandler::usePos(const int id, const int level, @@ -424,7 +424,7 @@ void SkillHandler::processSkillFailed(Net::MessageIn &msg) void SkillHandler::processSkillSnap(Net::MessageIn &msg) { UNIMPLIMENTEDPACKET; - msg.readInt32("being id"); + msg.readBeingId("being id"); msg.readInt16("x"); msg.readInt16("y"); } @@ -470,7 +470,7 @@ void SkillHandler::processSkillUnitUpdate(Net::MessageIn &msg) { UNIMPLIMENTEDPACKET; - msg.readInt32("being id"); + msg.readBeingId("being id"); } void SkillHandler::processSkillArrowCreateList(Net::MessageIn &msg) @@ -496,7 +496,7 @@ void SkillHandler::processSkillDevotionEffect(Net::MessageIn &msg) { UNIMPLIMENTEDPACKET; - msg.readInt32("being id"); + msg.readBeingId("being id"); for (int f = 0; f < 5; f ++) msg.readInt32("devotee id"); msg.readInt16("range"); -- cgit v1.2.3-60-g2f50