summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-03 23:40:37 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-03 23:40:37 +0300
commitb97837101e3ff3eb47d6d4f79cce38dfbeba04c9 (patch)
treec7f986196a20d6989e160c9bf0634d6303a8711c /src
parentbae0bf20b36f224796af64298f6139365e97b815 (diff)
downloadmv-b97837101e3ff3eb47d6d4f79cce38dfbeba04c9.tar.gz
mv-b97837101e3ff3eb47d6d4f79cce38dfbeba04c9.tar.bz2
mv-b97837101e3ff3eb47d6d4f79cce38dfbeba04c9.tar.xz
mv-b97837101e3ff3eb47d6d4f79cce38dfbeba04c9.zip
Add SMSG_PET_STATUS for old packet versions.
Diffstat (limited to 'src')
-rw-r--r--src/net/eathena/packetsin.inc6
-rw-r--r--src/net/eathena/petrecv.cpp3
2 files changed, 6 insertions, 3 deletions
diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc
index b4ef62394..b1691a82e 100644
--- a/src/net/eathena/packetsin.inc
+++ b/src/net/eathena/packetsin.inc
@@ -56,6 +56,7 @@ packet(SMSG_QUEST_LIST, 0x02b1, -1, &QuestRecv::processAddQu
packet(SMSG_BEING_VIEW_EQUIPMENT, 0x02d7, -1, &BeingRecv::processBeingViewEquipment, 1);
packet(SMSG_PARTY_SETTINGS, 0x0101, 6, &PartyRecv::processPartySettings, 1);
packet(SMSG_PLAYER_HP, 0x0106, 10, &BeingRecv::processBeingHp, 1);
+packet(SMSG_PET_STATUS, 0x01a2, 35, &PetRecv::processPetStatus, 1);
// fake packets for add packet name
packet(SMSG_SELECT_CART, 0x0000, 0, nullptr, 0);
@@ -519,7 +520,10 @@ if (packetVersion >= 20081113)
}
// 20081126
-packet(SMSG_PET_STATUS, 0x01a2, 37, &PetRecv::processPetStatus, 20081126);
+if (packetVersion >= 20081126)
+{
+ packet(SMSG_PET_STATUS, 0x01a2, 37, &PetRecv::processPetStatus, 20081126);
+}
// 20081210
packet(SMSG_AUTOSHADOW_SPELL_LIST, 0x0442, -1, &PlayerRecv::processPlayerAutoShadowSpellList, 20081210);
diff --git a/src/net/eathena/petrecv.cpp b/src/net/eathena/petrecv.cpp
index d3823f6e6..f30be4c50 100644
--- a/src/net/eathena/petrecv.cpp
+++ b/src/net/eathena/petrecv.cpp
@@ -169,7 +169,6 @@ void PetRecv::processPetStatus(Net::MessageIn &msg)
const int hungry = msg.readInt16("hungry");
const int intimacy = msg.readInt16("intimacy");
const int equip = msg.readInt16("equip");
- const int race = msg.readInt16("class");
// Being *const being = PlayerInfo::getPetBeing();
// if (being)
@@ -184,7 +183,7 @@ void PetRecv::processPetStatus(Net::MessageIn &msg)
info->intimacy = intimacy;
info->equip = equip;
if (msg.getVersion() >= 20081126)
- info->race = race;
+ info->race = msg.readInt16("class");
else
info->race = 0;
}