summaryrefslogtreecommitdiff
path: root/src/net/eathena/pethandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena/pethandler.cpp')
-rw-r--r--src/net/eathena/pethandler.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/net/eathena/pethandler.cpp b/src/net/eathena/pethandler.cpp
index 9d6772006..60ec03cd2 100644
--- a/src/net/eathena/pethandler.cpp
+++ b/src/net/eathena/pethandler.cpp
@@ -41,15 +41,25 @@ PetHandler::PetHandler() :
{
static const uint16_t _messages[] =
{
+ SMSG_PET_MESSAGE,
0
};
handledMessages = _messages;
petHandler = this;
}
-void PetHandler::handleMessage(Net::MessageIn &msg A_UNUSED)
+void PetHandler::handleMessage(Net::MessageIn &msg)
{
BLOCK_START("PetHandler::handleMessage")
+ switch (msg.getId())
+ {
+ case SMSG_PET_MESSAGE:
+ processPetMessage(msg);
+ break;
+
+ default:
+ break;
+ }
BLOCK_END("PetHandler::handleMessage")
}
@@ -91,4 +101,10 @@ void PetHandler::requestPetState(const int data) const
outMsg.writeInt32(data, "param");
}
+void PetHandler::processPetMessage(Net::MessageIn &msg)
+{
+ msg.readInt32("pet id");
+ msg.readInt32("param");
+}
+
} // namespace EAthena