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/tmwa | |
parent | 7bdb50605562e47f1d6ae134881c09bd42293be5 (diff) | |
download | ManaVerse-2d32dc27210d16102f9200de115f2c3f79a5cb22.tar.gz ManaVerse-2d32dc27210d16102f9200de115f2c3f79a5cb22.tar.bz2 ManaVerse-2d32dc27210d16102f9200de115f2c3f79a5cb22.tar.xz ManaVerse-2d32dc27210d16102f9200de115f2c3f79a5cb22.zip |
Use BeingTypeId in Being for subtypeid.
Diffstat (limited to 'src/net/tmwa')
-rw-r--r-- | src/net/tmwa/beinghandler.cpp | 12 | ||||
-rw-r--r-- | src/net/tmwa/charserverhandler.cpp | 4 |
2 files changed, 8 insertions, 8 deletions
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<uint16_t>(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)); diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp index f3a8ab0c6..0ae7bfc4f 100644 --- a/src/net/tmwa/charserverhandler.cpp +++ b/src/net/tmwa/charserverhandler.cpp @@ -141,7 +141,7 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg, static_cast<LoginHandler*>(loginHandler)->getToken(); LocalPlayer *const tempPlayer = new LocalPlayer( - msg.readBeingId("account id"), 0); + msg.readBeingId("account id"), BeingTypeId_zero); tempPlayer->setGender(token.sex); PlayerInfoBackend &data = character->data; @@ -173,7 +173,7 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg, const uint16_t race = msg.readInt16("class"); const uint8_t hairStyle = msg.readUInt8("hair style"); const uint16_t look = msg.readUInt8("look"); - tempPlayer->setSubtype(race, look); + tempPlayer->setSubtype(fromInt(race, BeingTypeId), look); const uint16_t weapon = msg.readInt16("weapon"); tempPlayer->setSprite(SPRITE_BODY, weapon, "", 1, true); |