summaryrefslogtreecommitdiff
path: root/src/net/eathena/pethandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-11 16:00:32 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-11 16:00:32 +0300
commit23b35de445d6af7d6e00576f4fbdfa1d15ba37df (patch)
treeca945d6ca28f63f59db68391dcacf6cfc5fc06d7 /src/net/eathena/pethandler.cpp
parent4c4c2684278f84f952544d8e4f119ce9da980c1a (diff)
downloadmanaverse-23b35de445d6af7d6e00576f4fbdfa1d15ba37df.tar.gz
manaverse-23b35de445d6af7d6e00576f4fbdfa1d15ba37df.tar.bz2
manaverse-23b35de445d6af7d6e00576f4fbdfa1d15ba37df.tar.xz
manaverse-23b35de445d6af7d6e00576f4fbdfa1d15ba37df.zip
eathena: add partial support for packet SMSG_PET_MESSAGE 0x01aa.
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