From ff827f9dc10548774ff5d0ab9cb408756e4e3da0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 14 Jun 2016 18:33:05 +0300 Subject: Remove all code from processPetMessage. Because it duplication other packets anyway. --- src/net/eathena/petrecv.cpp | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) (limited to 'src/net') diff --git a/src/net/eathena/petrecv.cpp b/src/net/eathena/petrecv.cpp index f30be4c50..29a19ff86 100644 --- a/src/net/eathena/petrecv.cpp +++ b/src/net/eathena/petrecv.cpp @@ -52,30 +52,11 @@ namespace EAthena void PetRecv::processPetMessage(Net::MessageIn &msg) { - const BeingId id = msg.readBeingId("pet id"); - const int data = msg.readInt32("param"); - const Being *const dstBeing = actorManager->findBeing(id); - if (!dstBeing) - return; - - const int hungry = data - (toInt(dstBeing->getSubType(), int) - - 100) * 100 - 50; - if (hungry >= 0 && hungry <= 4) - { - if (localChatTab && localPlayer) - { - // TRANSLATORS: user's pet - std::string nick = strprintf(_("%s's pet"), - localPlayer->getName().c_str()); - localChatTab->chatLog(nick, - // TRANSLATORS: pet hungry level - strprintf(_("hungry level %d"), hungry)); - } - PetInfo *const info = PlayerInfo::getPet(); - if (!info || info->id != id) - return; - info->hungry = hungry; - } + // techinally this is hercules pet emote, + // but it may send also hungry level on connect + // for both exists other packets. + msg.readBeingId("pet id"); + msg.readInt32("param"); } void PetRecv::processPetRoulette(Net::MessageIn &msg) -- cgit v1.2.3-60-g2f50