ManaPlus
achievementrecv.cpp
Go to the documentation of this file.
1 /*
2  * The ManaPlus Client
3  * Copyright (C) 2011-2019 The ManaPlus Developers
4  * Copyright (C) 2019-2021 Andrei Karas
5  *
6  * This file is part of The ManaPlus Client.
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  */
21 
23 
24 #include "logger.h"
25 
26 #include "net/messagein.h"
27 
28 #include "debug.h"
29 
30 namespace EAthena
31 {
32 
34 {
36  const int count = (msg.readInt16("len") - 22) / 50;
37  msg.readInt32("total achievements");
38  msg.readInt32("total points");
39  msg.readInt16("rank level");
40  msg.readInt32("rank points");
41  msg.readInt32("rank points need");
42  for (int f = 0; f < count; f ++)
43  {
44  msg.readInt32("ach id");
45  msg.readUInt8("completed");
46  for (int d = 0; d < 10; d ++)
47  msg.readInt32("objective");
48  msg.readInt32("completed at");
49  msg.readUInt8("reward");
50  }
51 }
52 
54 {
56  msg.readInt32("total points");
57  msg.readInt16("rank level");
58  msg.readInt32("rank points");
59  msg.readInt32("rank points need");
60 
61  msg.readInt32("ach id");
62  msg.readUInt8("completed");
63  for (int d = 0; d < 10; d ++)
64  msg.readInt32("objective");
65  msg.readInt32("completed at");
66  msg.readUInt8("reward");
67 }
68 
70 {
72  msg.readUInt8("received");
73  msg.readInt32("ach id");
74 }
75 
76 } // namespace EAthena
#define UNIMPLEMENTEDPACKET
Definition: logger.h:56
bool msg(InputEvent &event)
Definition: chat.cpp:39
void processAchievementUpdate(Net::MessageIn &msg)
void processAchievementList(Net::MessageIn &msg)
void processAchievementGetReward(Net::MessageIn &msg)