summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/packetsout.inc7
-rw-r--r--src/net/eathena/pethandler.cpp15
-rw-r--r--src/net/eathena/pethandler.h2
3 files changed, 24 insertions, 0 deletions
diff --git a/src/net/eathena/packetsout.inc b/src/net/eathena/packetsout.inc
index b622b0340..b480c16f4 100644
--- a/src/net/eathena/packetsout.inc
+++ b/src/net/eathena/packetsout.inc
@@ -336,6 +336,7 @@ packet(CMSG_ATTENDANCE_REWARD, 0x0000, 0, nullptr);
packet(CMSG_MAP_BLOCK_PLAY_CANCEL, 0x0000, 0, nullptr);
packet(CMSG_PRIVATE_AIRSHIP_REQUEST, 0x0000, 0, nullptr);
packet(CMSG_PLAYER_SELECT_STYLE, 0x0000, 0, nullptr);
+packet(CMSG_PET_EVOLUTION, 0x0000, 0, nullptr);
#else
// 20040713
if (packetVersion >= 20040713)
@@ -1258,6 +1259,12 @@ if (packetVersion >= 20131230)
packet(CMSG_MAIL2_SEND_MAIL, 0x09ec, -1, clif->pRodexSendMail);
}
+// 20140122
+if (packetVersion >= 20140122)
+{
+ packet(CMSG_PET_EVOLUTION, 0x09fb, -1, clif->pPetEvolution);
+}
+
// 20140129
if (packetVersion >= 20140129)
{
diff --git a/src/net/eathena/pethandler.cpp b/src/net/eathena/pethandler.cpp
index 1f492aa31..72243057f 100644
--- a/src/net/eathena/pethandler.cpp
+++ b/src/net/eathena/pethandler.cpp
@@ -27,8 +27,12 @@
#include "net/eathena/messageout.h"
#include "net/eathena/protocolout.h"
+#include "resources/item/item.h"
+
#include "debug.h"
+extern int packetVersion;
+
namespace EAthena
{
@@ -123,4 +127,15 @@ void PetHandler::setDirection(const unsigned char type) const
"pet direction");
}
+void PetHandler::evolution(const Item *const item) const
+{
+ if (packetVersion < 20140122 ||
+ item == nullptr)
+ {
+ return;
+ }
+ createOutPacket(CMSG_PET_EVOLUTION);
+ outMsg.writeInt16(CAST_S16(item->getId()), "egg id");
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/pethandler.h b/src/net/eathena/pethandler.h
index 00cc4b7f3..2d73b6524 100644
--- a/src/net/eathena/pethandler.h
+++ b/src/net/eathena/pethandler.h
@@ -57,6 +57,8 @@ class PetHandler final : public Net::PetHandler
void unequip() const override final;
void setDirection(const unsigned char type) const override final;
+
+ void evolution(const Item *const item) const override final;
};
} // namespace EAthena