From 66472d9fcad0938fe2ba97138341043e89ace142 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 11 Aug 2017 00:24:58 +0300 Subject: Add packet SMSG_MAIL2_ICON 0x09e7. --- src/CMakeLists.txt | 6 ++++-- src/Makefile.am | 6 ++++-- src/net/eathena/mail2recv.cpp | 38 ++++++++++++++++++++++++++++++++++++++ src/net/eathena/mail2recv.h | 37 +++++++++++++++++++++++++++++++++++++ src/net/eathena/network.cpp | 1 + src/net/eathena/packetsin.inc | 3 +++ 6 files changed, 87 insertions(+), 4 deletions(-) create mode 100644 src/net/eathena/mail2recv.cpp create mode 100644 src/net/eathena/mail2recv.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d4bfb4534..990442f30 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1611,10 +1611,12 @@ SET(SRCS net/eathena/loginhandler.h net/eathena/loginrecv.cpp net/eathena/loginrecv.h - net/eathena/mailhandler.cpp - net/eathena/mailhandler.h + net/eathena/mail2recv.cpp + net/eathena/mail2recv.h net/eathena/mail2handler.cpp net/eathena/mail2handler.h + net/eathena/mailhandler.cpp + net/eathena/mailhandler.h net/eathena/mailrecv.cpp net/eathena/mailrecv.h net/eathena/maphandler.cpp diff --git a/src/Makefile.am b/src/Makefile.am index d52b6bac8..79ea08113 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1902,10 +1902,12 @@ SRC += gui/windows/bankwindow.cpp \ net/eathena/loginhandler.h \ net/eathena/loginrecv.cpp \ net/eathena/loginrecv.h \ - net/eathena/mailhandler.cpp \ - net/eathena/mailhandler.h \ net/eathena/mail2handler.cpp \ net/eathena/mail2handler.h \ + net/eathena/mail2recv.cpp \ + net/eathena/mail2recv.h \ + net/eathena/mailhandler.cpp \ + net/eathena/mailhandler.h \ net/eathena/mailrecv.cpp \ net/eathena/mailrecv.h \ net/eathena/maphandler.cpp \ diff --git a/src/net/eathena/mail2recv.cpp b/src/net/eathena/mail2recv.cpp new file mode 100644 index 000000000..1a07bfc52 --- /dev/null +++ b/src/net/eathena/mail2recv.cpp @@ -0,0 +1,38 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2017 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "net/eathena/mail2recv.h" + +#include "logger.h" + +#include "net/messagein.h" + +#include "debug.h" + +namespace EAthena +{ + +void Mail2Recv::processMailIcon(Net::MessageIn &msg) +{ + UNIMPLEMENTEDPACKET; + msg.readUInt8("show icon"); +} + +} // namespace EAthena diff --git a/src/net/eathena/mail2recv.h b/src/net/eathena/mail2recv.h new file mode 100644 index 000000000..6be888911 --- /dev/null +++ b/src/net/eathena/mail2recv.h @@ -0,0 +1,37 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2017 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef NET_EATHENA_MAIL2RECV_H +#define NET_EATHENA_MAIL2RECV_H + +namespace Net +{ + class MessageIn; +} // namespace Net + +namespace EAthena +{ + namespace Mail2Recv + { + void processMailIcon(Net::MessageIn &msg); + } // namespace MailRecv +} // namespace EAthena + +#endif // NET_EATHENA_MAIL2RECV_H diff --git a/src/net/eathena/network.cpp b/src/net/eathena/network.cpp index 79ac29f51..dfc84b6b4 100644 --- a/src/net/eathena/network.cpp +++ b/src/net/eathena/network.cpp @@ -60,6 +60,7 @@ #include "net/eathena/inventoryrecv.h" #include "net/eathena/itemrecv.h" #include "net/eathena/loginrecv.h" +#include "net/eathena/mail2recv.h" #include "net/eathena/mailrecv.h" #include "net/eathena/maprecv.h" #include "net/eathena/marketrecv.h" diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc index 41cfa1036..c3e20c6c4 100644 --- a/src/net/eathena/packetsin.inc +++ b/src/net/eathena/packetsin.inc @@ -794,6 +794,9 @@ if (packetVersion >= 20140613) packet(SMSG_BATTLE_UPDATE_HP, 0x0a0e, 14, &BattleGroundRecv::processBattleUpdateHp, 20140613); } +// 20140716 +packet(SMSG_MAIL2_ICON, 0x09e7, 3, &Mail2Recv::processMailIcon, 20140716); + // 20141016 packet(SMSG_ROULETTE_OPEN_ACK, 0x0a1a, 23, &RouletteRecv::processRouletteOpenAck, 20141016); packet(SMSG_ROULETTE_INFO_ACK_TYPE, 0x0a1c, -1, &RouletteRecv::processRouletteInfoAckType, 20141016); -- cgit v1.2.3-60-g2f50