From 2d32dc27210d16102f9200de115f2c3f79a5cb22 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 29 May 2015 17:45:52 +0300 Subject: Use BeingTypeId in Being for subtypeid. --- src/net/tmwa/beinghandler.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/net/tmwa/beinghandler.cpp') diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp index 0191953a4..451a88ec5 100644 --- a/src/net/tmwa/beinghandler.cpp +++ b/src/net/tmwa/beinghandler.cpp @@ -330,7 +330,7 @@ void BeingHandler::processBeingChangeLookContinue(Net::MessageIn &msg, switch (type) { case 0: // change race - dstBeing->setSubtype(static_cast(id), + dstBeing->setSubtype(fromInt(id, BeingTypeId), dstBeing->getLook()); break; case 1: // eAthena LOOK_HAIR @@ -479,7 +479,7 @@ void BeingHandler::processPlayerUpdate1(Net::MessageIn &msg) const uint8_t hairStyle = msg.readUInt8("hair style"); const uint16_t look = msg.readUInt8("look"); - dstBeing->setSubtype(job, look); + dstBeing->setSubtype(fromInt(job, BeingTypeId), look); const uint16_t weapon = msg.readInt16("weapon"); const uint16_t shield = msg.readInt16("shield"); const uint16_t headBottom = msg.readInt16("head bottom"); @@ -631,7 +631,7 @@ void BeingHandler::processPlayerUpdate2(Net::MessageIn &msg) const uint8_t hairStyle = msg.readUInt8("hair style"); const uint16_t look = msg.readUInt8("look"); - dstBeing->setSubtype(job, look); + dstBeing->setSubtype(fromInt(job, BeingTypeId), look); const uint16_t weapon = msg.readInt16("weapon"); const uint16_t shield = msg.readInt16("shield"); const uint16_t headBottom = msg.readInt16("head bottom"); @@ -779,7 +779,7 @@ void BeingHandler::processPlayerMove(Net::MessageIn &msg) const uint8_t hairStyle = msg.readUInt8("hair style"); const uint16_t look = msg.readUInt8("look"); - dstBeing->setSubtype(job, look); + dstBeing->setSubtype(fromInt(job, BeingTypeId), look); const uint16_t weapon = msg.readInt16("weapon"); const uint16_t shield = msg.readInt16("shield"); const uint16_t headBottom = msg.readInt16("head bottom"); @@ -986,7 +986,7 @@ void BeingHandler::processBeingVisible(Net::MessageIn &msg) const uint8_t hairStyle = msg.readUInt8("hair style"); const uint16_t look = msg.readUInt8("look"); - dstBeing->setSubtype(job, look); + dstBeing->setSubtype(fromInt(job, BeingTypeId), look); if (dstBeing->getType() == ActorType::Monster && localPlayer) localPlayer->checkNewName(dstBeing); dstBeing->setWalkSpeed(Vector(speed, speed, 0)); @@ -1185,7 +1185,7 @@ void BeingHandler::processBeingMove(Net::MessageIn &msg) const uint8_t hairStyle = msg.readUInt8("hair style"); const uint16_t look = msg.readUInt8("look"); - dstBeing->setSubtype(job, look); + dstBeing->setSubtype(fromInt(job, BeingTypeId), look); if (dstBeing->getType() == ActorType::Monster && localPlayer) localPlayer->checkNewName(dstBeing); dstBeing->setWalkSpeed(Vector(speed, speed, 0)); -- cgit v1.2.3-70-g09d2