summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-04-17 23:31:50 +0300
committerAndrei Karas <akaras@inbox.ru>2018-04-17 23:31:50 +0300
commit0f253bcecd8216ab990d79b2b0db18e527ab563f (patch)
tree0d2e2291cf63f4cbf9885452aa48d3530456ba96 /src
parent44fd3098a52556602c966303b224bd1496c3c0db (diff)
downloadmanaplus-0f253bcecd8216ab990d79b2b0db18e527ab563f.tar.gz
manaplus-0f253bcecd8216ab990d79b2b0db18e527ab563f.tar.bz2
manaplus-0f253bcecd8216ab990d79b2b0db18e527ab563f.tar.xz
manaplus-0f253bcecd8216ab990d79b2b0db18e527ab563f.zip
Add packet CMSG_ATTENDANCE_REWARD 0x0aef.
Diffstat (limited to 'src')
-rw-r--r--src/net/attendancehandler.h2
-rw-r--r--src/net/eathena/attendancehandler.cpp13
-rw-r--r--src/net/eathena/attendancehandler.h2
-rw-r--r--src/net/eathena/packetsout.inc13
-rw-r--r--src/net/tmwa/attendancehandler.cpp4
-rw-r--r--src/net/tmwa/attendancehandler.h2
6 files changed, 36 insertions, 0 deletions
diff --git a/src/net/attendancehandler.h b/src/net/attendancehandler.h
index f78b5b402..9844b4610 100644
--- a/src/net/attendancehandler.h
+++ b/src/net/attendancehandler.h
@@ -38,6 +38,8 @@ class AttendanceHandler notfinal
{ }
virtual void openAttendanceWindow() const = 0;
+
+ virtual void requestReward() const = 0;
};
} // namespace Net
diff --git a/src/net/eathena/attendancehandler.cpp b/src/net/eathena/attendancehandler.cpp
index ea53b71ab..538a72fc9 100644
--- a/src/net/eathena/attendancehandler.cpp
+++ b/src/net/eathena/attendancehandler.cpp
@@ -26,6 +26,8 @@
#include "debug.h"
extern int packetVersion;
+extern int packetVersionRe;
+extern int packetVersionMain;
namespace EAthena
{
@@ -48,4 +50,15 @@ void AttendanceHandler::openAttendanceWindow() const
outMsg.writeInt8(5, "window type");
}
+void AttendanceHandler::requestReward() const
+{
+ if (packetVersionRe < 20180307 &&
+ packetVersionMain < 20180404)
+ {
+ return;
+ }
+
+ createOutPacket(CMSG_ATTENDANCE_REWARD);
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/attendancehandler.h b/src/net/eathena/attendancehandler.h
index 458f97db1..99c0d27d2 100644
--- a/src/net/eathena/attendancehandler.h
+++ b/src/net/eathena/attendancehandler.h
@@ -35,6 +35,8 @@ class AttendanceHandler final : public Net::AttendanceHandler
~AttendanceHandler() override final;
void openAttendanceWindow() const override final;
+
+ void requestReward() const override final;
};
} // namespace EAthena
diff --git a/src/net/eathena/packetsout.inc b/src/net/eathena/packetsout.inc
index 174e4571d..32c7bfe9e 100644
--- a/src/net/eathena/packetsout.inc
+++ b/src/net/eathena/packetsout.inc
@@ -332,6 +332,7 @@ packet(CMSG_MAIL2_CLOSE_MAILBOX, 0x0000, 0, nullptr);
packet(CMSG_MAIL2_CANCEL_WRITE_MAIL, 0x0000, 0, nullptr);
packet(CMSG_CLAN_MESSAGE, 0x0000, 0, nullptr);
packet(CMSG_WINDOW_OPEN_REQUEST2, 0x0000, 0, nullptr);
+packet(CMSG_ATTENDANCE_REWARD, 0x0000, 0, nullptr);
#else
// 20040713
if (packetVersion >= 20040713)
@@ -1338,4 +1339,16 @@ if (packetVersion >= 20170419)
packet(CMSG_MAIL2_REFRESH_MAIL_LIST, 0x0ac1, 26, clif->pRodexRefreshMaillist);
}
+// re 20180307
+if (packetVersionRe >= 20180307)
+{
+ packet(CMSG_ATTENDANCE_REWARD, 0x0aef, 2, clif->pAttendanceRewardRequest);
+}
+
+// main 20180404
+if (packetVersionMain >= 20180404)
+{
+ packet(CMSG_ATTENDANCE_REWARD, 0x0aef, 2, clif->pAttendanceRewardRequest);
+}
+
#endif
diff --git a/src/net/tmwa/attendancehandler.cpp b/src/net/tmwa/attendancehandler.cpp
index b15a4ee31..805954b9e 100644
--- a/src/net/tmwa/attendancehandler.cpp
+++ b/src/net/tmwa/attendancehandler.cpp
@@ -39,4 +39,8 @@ void AttendanceHandler::openAttendanceWindow() const
{
}
+void AttendanceHandler::requestReward() const
+{
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/attendancehandler.h b/src/net/tmwa/attendancehandler.h
index 0434933d1..2ed014710 100644
--- a/src/net/tmwa/attendancehandler.h
+++ b/src/net/tmwa/attendancehandler.h
@@ -35,6 +35,8 @@ class AttendanceHandler final : public Net::AttendanceHandler
~AttendanceHandler() override final;
void openAttendanceWindow() const override final;
+
+ void requestReward() const override final;
};
} // namespace TmwAthena