diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-05-29 17:45:52 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-05-29 17:45:52 +0300 |
commit | 2d32dc27210d16102f9200de115f2c3f79a5cb22 (patch) | |
tree | 5aa84ebe6c5c1d708b14bee2bf0ce95df714fc1d /src/net/eathena/beinghandler.cpp | |
parent | 7bdb50605562e47f1d6ae134881c09bd42293be5 (diff) | |
download | mv-2d32dc27210d16102f9200de115f2c3f79a5cb22.tar.gz mv-2d32dc27210d16102f9200de115f2c3f79a5cb22.tar.bz2 mv-2d32dc27210d16102f9200de115f2c3f79a5cb22.tar.xz mv-2d32dc27210d16102f9200de115f2c3f79a5cb22.zip |
Use BeingTypeId in Being for subtypeid.
Diffstat (limited to 'src/net/eathena/beinghandler.cpp')
-rw-r--r-- | src/net/eathena/beinghandler.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp index 9bc79c407..1b566edc7 100644 --- a/src/net/eathena/beinghandler.cpp +++ b/src/net/eathena/beinghandler.cpp @@ -460,7 +460,8 @@ Being *BeingHandler::createBeing2(Net::MessageIn &msg, if (job == 45 && beingType == BeingType::NPC_EVENT) type = ActorType::Portal; - Being *const being = actorManager->createBeing(id, type, job); + Being *const being = actorManager->createBeing( + id, type, fromInt(job, BeingTypeId)); if (beingType == BeingType::MERSOL) { MercenaryInfo *const info = PlayerInfo::getMercenary(); @@ -524,7 +525,7 @@ void BeingHandler::processBeingChangeLookContinue(Net::MessageIn &msg, switch (type) { case 0: // change race - dstBeing->setSubtype(static_cast<uint16_t>(id), + dstBeing->setSubtype(fromInt(id, BeingTypeId), dstBeing->getLook()); break; case 1: // eAthena LOOK_HAIR @@ -689,7 +690,7 @@ void BeingHandler::processBeingVisible(Net::MessageIn &msg) speed = 150; dstBeing->setWalkSpeed(Vector(speed, speed, 0)); - dstBeing->setSubtype(job, 0); + dstBeing->setSubtype(fromInt(job, BeingTypeId), 0); if (dstBeing->getType() == ActorType::Monster && localPlayer) localPlayer->checkNewName(dstBeing); @@ -849,7 +850,7 @@ void BeingHandler::processBeingMove(Net::MessageIn &msg) speed = 150; dstBeing->setWalkSpeed(Vector(speed, speed, 0)); - dstBeing->setSubtype(job, 0); + dstBeing->setSubtype(fromInt(job, BeingTypeId), 0); if (dstBeing->getType() == ActorType::Monster && localPlayer) localPlayer->checkNewName(dstBeing); @@ -1019,7 +1020,7 @@ void BeingHandler::processBeingSpawn(Net::MessageIn &msg) speed = 150; dstBeing->setWalkSpeed(Vector(speed, speed, 0)); - dstBeing->setSubtype(job, 0); + dstBeing->setSubtype(fromInt(job, BeingTypeId), 0); if (dstBeing->getType() == ActorType::Monster && localPlayer) localPlayer->checkNewName(dstBeing); @@ -1700,7 +1701,7 @@ void BeingHandler::processBeingFakeName(Net::MessageIn &msg) msg.skip(4, "unsued"); Being *const dstBeing = createBeing2(msg, id, job, type); - dstBeing->setSubtype(job, 0); + dstBeing->setSubtype(fromInt(job, BeingTypeId), 0); dstBeing->setTileCoords(x, y); dstBeing->setDirection(dir); } |