diff options
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/eathena/achievementrecv.cpp | 52 | ||||
-rw-r--r-- | src/net/eathena/achievementrecv.h | 37 | ||||
-rw-r--r-- | src/net/eathena/network.cpp | 1 | ||||
-rw-r--r-- | src/net/eathena/packetsin.inc | 13 |
4 files changed, 103 insertions, 0 deletions
diff --git a/src/net/eathena/achievementrecv.cpp b/src/net/eathena/achievementrecv.cpp new file mode 100644 index 000000000..96f1a2594 --- /dev/null +++ b/src/net/eathena/achievementrecv.cpp @@ -0,0 +1,52 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2018 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 <http://www.gnu.org/licenses/>. + */ + +#include "net/eathena/achievementrecv.h" + +#include "logger.h" + +#include "net/messagein.h" + +#include "debug.h" + +namespace EAthena +{ + +void AchievementRecv::processAchievementList(Net::MessageIn &msg) +{ + UNIMPLEMENTEDPACKET; + const int count = (msg.readInt16("len") - 22) / 50; + msg.readInt32("total achievements"); + msg.readInt32("total points"); + msg.readInt16("rank level"); + msg.readInt32("rank points"); + msg.readInt32("rank points need"); + for (int f = 0; f < count; f ++) + { + msg.readInt32("ach id"); + msg.readUInt8("completed"); + for (int d = 0; d < 10; d ++) + msg.readInt32("objective"); + msg.readInt32("completed at"); + msg.readUInt8("reward"); + } +} + +} // namespace EAthena diff --git a/src/net/eathena/achievementrecv.h b/src/net/eathena/achievementrecv.h new file mode 100644 index 000000000..1eaa37af1 --- /dev/null +++ b/src/net/eathena/achievementrecv.h @@ -0,0 +1,37 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2018 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 <http://www.gnu.org/licenses/>. + */ + +#ifndef NET_EATHENA_ACHIEVEMENTRECV_H +#define NET_EATHENA_ACHIEVEMENTRECV_H + +namespace Net +{ + class MessageIn; +} // namespace Net + +namespace EAthena +{ + namespace AchievementRecv + { + void processAchievementList(Net::MessageIn &msg); + } // namespace AchievementRecv +} // namespace EAthena + +#endif // NET_EATHENA_ACHIEVEMENTRECV_H diff --git a/src/net/eathena/network.cpp b/src/net/eathena/network.cpp index 52d8556ff..c183d842c 100644 --- a/src/net/eathena/network.cpp +++ b/src/net/eathena/network.cpp @@ -40,6 +40,7 @@ #include "net/ea/skillrecv.h" #include "net/ea/traderecv.h" +#include "net/eathena/achievementrecv.h" #include "net/eathena/adminrecv.h" #include "net/eathena/auctionrecv.h" #include "net/eathena/attendancerecv.h" diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc index 639a2832a..ce07d0484 100644 --- a/src/net/eathena/packetsin.inc +++ b/src/net/eathena/packetsin.inc @@ -878,6 +878,12 @@ packet(SMSG_MAIL2_ICON, 0x09e7, 3, &Mail2Recv::processMailI // 20141119 packet(SMSG_MAIL2_ADD_ITEM_RESULT, 0x0a05, 53, &Mail2Recv::processAddItemResult, 20141119); +// 20150225 re +if (packetVersionRe >= 20141126) +{ + packet(SMSG_ACHIEVEMENT_LIST, 0x0a23, -1, &AchievementRecv::processAchievementList, 20141126); +} + // 0 // evol packets if (serverVersion > 0) @@ -914,6 +920,12 @@ if (serverVersion > 0) packet2(SMSG_CHAR_PASSWORD_RESPONSE, 0x0062, 3, &LoginRecv::processCharPasswordResponse, 0); } +// 20150225 main +if (packetVersionMain >= 20150225) +{ + packet(SMSG_ACHIEVEMENT_LIST, 0x0a23, -1, &AchievementRecv::processAchievementList, 20150225); +} + // 20150226 if (packetVersion >= 20150226) { @@ -1132,6 +1144,7 @@ if (packets_zero == true) packet(SMSG_GUILD_EXPULSION2, 0x0a82, 46, &GuildRecv::processGuildExpulsion2, 20171018); packet(SMSG_GUILD_LEAVE2, 0x0a83, 46, &GuildRecv::processGuildLeave2, 20171018); packet(SMSG_PARTY_MEMBER_DEAD, 0x0ab2, 7, &PartyRecv::processPartyMemberDead, 20171018); + packet(SMSG_ACHIEVEMENT_LIST, 0x0a23, -1, &AchievementRecv::processAchievementList, 20171018); } // 20171019 zero |