summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-06-14 18:33:05 +0300
committerAndrei Karas <akaras@inbox.ru>2016-06-14 18:33:05 +0300
commitff827f9dc10548774ff5d0ab9cb408756e4e3da0 (patch)
tree6b44c53c7df7cf0d6be46c620ed93f1e9803d9ff /src/net
parent9f8266d3e302a04cc862b649b2e85b7d4ccfa0a4 (diff)
downloadmanaplus-ff827f9dc10548774ff5d0ab9cb408756e4e3da0.tar.gz
manaplus-ff827f9dc10548774ff5d0ab9cb408756e4e3da0.tar.bz2
manaplus-ff827f9dc10548774ff5d0ab9cb408756e4e3da0.tar.xz
manaplus-ff827f9dc10548774ff5d0ab9cb408756e4e3da0.zip
Remove all code from processPetMessage.
Because it duplication other packets anyway.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/petrecv.cpp29
1 files changed, 5 insertions, 24 deletions
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)