From b6d97f404432d9cf6c84538c4d5f6f14e078ade3 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 26 Jan 2019 00:09:51 +0300 Subject: Add packet CMSG_CAMERA_INFO 0x0a77 --- src/net/eathena/maphandler.cpp | 16 ++++++++++++++++ src/net/eathena/maphandler.h | 5 +++++ src/net/eathena/packetsout.inc | 7 +++++++ 3 files changed, 28 insertions(+) (limited to 'src/net/eathena') diff --git a/src/net/eathena/maphandler.cpp b/src/net/eathena/maphandler.cpp index 433e95d36..7054949f2 100644 --- a/src/net/eathena/maphandler.cpp +++ b/src/net/eathena/maphandler.cpp @@ -25,6 +25,8 @@ #include "debug.h" +extern int packetVersion; + namespace EAthena { @@ -50,4 +52,18 @@ void MapHandler::destroyInstance() const outMsg.writeInt32(3, "command"); } +void MapHandler::camera(int action, + float range, + float rotation, + float latitude) const +{ + if (packetVersion < 20160525) + return; + createOutPacket(CMSG_CAMERA_INFO); + outMsg.writeInt8(action, "action"); + outMsg.writeFloat(range, "range"); + outMsg.writeFloat(rotation, "rotation"); + outMsg.writeFloat(latitude, "latitude"); +} + } // namespace EAthena diff --git a/src/net/eathena/maphandler.h b/src/net/eathena/maphandler.h index e8457115e..52f50add4 100644 --- a/src/net/eathena/maphandler.h +++ b/src/net/eathena/maphandler.h @@ -38,6 +38,11 @@ class MapHandler final : public Net::MapHandler void blockPlayCancel() const override final; void destroyInstance() const override final; + + void camera(int action, + float range, + float rotation, + float latitude) const override final; }; } // namespace EAthena diff --git a/src/net/eathena/packetsout.inc b/src/net/eathena/packetsout.inc index ca3b0b2d4..7bb87d36d 100644 --- a/src/net/eathena/packetsout.inc +++ b/src/net/eathena/packetsout.inc @@ -352,6 +352,7 @@ packet(CMSG_INVENTORY_EXPAND_REJECT, 0x0000, 0, nullptr); packet(CMSG_SKILL_USE_BEING_START, 0x0000, 0, nullptr); packet(CMSG_SKILL_USE_BEING_STOP, 0x0000, 0, nullptr); packet(CMSG_NPC_BARTER_CLOSE, 0x0000, 0, nullptr); +packet(CMSG_CAMERA_INFO, 0x0000, 0, nullptr); #else // 20040713 if (packetVersion >= 20040713) @@ -1377,6 +1378,12 @@ if (packetVersion >= 20160330) packet(CMSG_MAIL2_SEND_MAIL, 0x0a6e, -1, clif->pRodexSendMail); } +// 20160525 +if (packetVersion >= 20160525) +{ + packet(CMSG_CAMERA_INFO, 0x0a77, 15, clif->pCameraInfo); +} + // 20170419 if (packetVersion >= 20170419) { -- cgit v1.2.3-70-g09d2