diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-05-29 14:30:20 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-05-29 14:30:20 +0300 |
commit | 0f9ec2061c4ad6157c3186f1cab9c4d8558980b5 (patch) | |
tree | 6259593b8436178ad8d981a96a8fd71eab9e04cc /src/net/eathena/pethandler.cpp | |
parent | 01773c71a4698c6f01fe70d864f922bda65506cb (diff) | |
download | manaplus-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.gz manaplus-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.bz2 manaplus-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.xz manaplus-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.zip |
Add strong typed int type BeingId.
Diffstat (limited to 'src/net/eathena/pethandler.cpp')
-rw-r--r-- | src/net/eathena/pethandler.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/net/eathena/pethandler.cpp b/src/net/eathena/pethandler.cpp index 71d4d17f2..32f902e80 100644 --- a/src/net/eathena/pethandler.cpp +++ b/src/net/eathena/pethandler.cpp @@ -143,7 +143,7 @@ void PetHandler::catchPet(const Being *const being) const return; createOutPacket(CMSG_PET_CATCH); - outMsg.writeInt32(being->getId(), "monster id"); + outMsg.writeBeingId(being->getId(), "monster id"); } void PetHandler::sendPetMessage(const int data) const @@ -160,7 +160,7 @@ void PetHandler::setName(const std::string &name) const void PetHandler::processPetMessage(Net::MessageIn &msg) { - const int id = msg.readInt32("pet id"); + const BeingId id = msg.readBeingId("pet id"); const int data = msg.readInt32("param"); Being *const dstBeing = actorManager->findBeing(id); if (!dstBeing) @@ -228,7 +228,7 @@ void PetHandler::processEggsList(Net::MessageIn &msg) void PetHandler::processPetData(Net::MessageIn &msg) { const int cmd = msg.readUInt8("type"); - const int id = msg.readInt32("pet id"); + const BeingId id = msg.readBeingId("pet id"); Being *const dstBeing = actorManager->findBeing(id); const int data = msg.readInt32("data"); if (!cmd) // pre init |