1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
/*
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
*
* 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 (at your
* option) 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 "MythicPlusPacketsCommon.h"
#include "PacketOperators.h"
namespace WorldPackets::MythicPlus
{
ByteBuffer& operator<<(ByteBuffer& data, DungeonScoreMapSummary const& dungeonScoreMapSummary)
{
data << int32(dungeonScoreMapSummary.ChallengeModeID);
data << float(dungeonScoreMapSummary.MapScore);
data << int32(dungeonScoreMapSummary.BestRunLevel);
data << int32(dungeonScoreMapSummary.BestRunDurationMS);
data << uint8(dungeonScoreMapSummary.Unknown1110);
data << Bits<1>(dungeonScoreMapSummary.FinishedSuccess);
data.FlushBits();
return data;
}
ByteBuffer& operator<<(ByteBuffer& data, DungeonScoreSummary const& dungeonScoreSummary)
{
data << float(dungeonScoreSummary.OverallScoreCurrentSeason);
data << float(dungeonScoreSummary.LadderScoreCurrentSeason);
data << Size<uint32>(dungeonScoreSummary.Runs);
for (DungeonScoreMapSummary const& dungeonScoreMapSummary : dungeonScoreSummary.Runs)
data << dungeonScoreMapSummary;
return data;
}
ByteBuffer& operator<<(ByteBuffer& data, MythicPlusMember const& mythicPlusMember)
{
data << mythicPlusMember.BnetAccountGUID;
data << uint64(mythicPlusMember.GuildClubMemberID);
data << mythicPlusMember.GUID;
data << mythicPlusMember.GuildGUID;
data << uint32(mythicPlusMember.NativeRealmAddress);
data << uint32(mythicPlusMember.VirtualRealmAddress);
data << int32(mythicPlusMember.ChrSpecializationID);
data << int8(mythicPlusMember.RaceID);
data << int32(mythicPlusMember.ItemLevel);
data << int32(mythicPlusMember.CovenantID);
data << int32(mythicPlusMember.SoulbindID);
return data;
}
ByteBuffer& operator<<(ByteBuffer& data, MythicPlusRun const& mythicPlusRun)
{
data << int32(mythicPlusRun.MapChallengeModeID);
data << uint32(mythicPlusRun.Level);
data << int32(mythicPlusRun.DurationMs);
data << mythicPlusRun.StartDate;
data << mythicPlusRun.CompletionDate;
data << int32(mythicPlusRun.Season);
data.append(mythicPlusRun.KeystoneAffixIDs.data(), mythicPlusRun.KeystoneAffixIDs.size());
data << Size<uint32>(mythicPlusRun.Members);
data << float(mythicPlusRun.RunScore);
data << int32(mythicPlusRun.Unknown_1120);
for (MythicPlusMember const& member : mythicPlusRun.Members)
data << member;
data << Bits<1>(mythicPlusRun.Completed);
data.FlushBits();
return data;
}
ByteBuffer& operator<<(ByteBuffer& data, DungeonScoreBestRunForAffix const& dungeonScoreBestRunForAffix)
{
data << int32(dungeonScoreBestRunForAffix.KeystoneAffixID);
data << float(dungeonScoreBestRunForAffix.Score);
data << dungeonScoreBestRunForAffix.Run;
return data;
}
ByteBuffer& operator<<(ByteBuffer& data, DungeonScoreMapData const& dungeonScoreMapData)
{
data << int32(dungeonScoreMapData.MapChallengeModeID);
data << Size<uint32>(dungeonScoreMapData.BestRuns);
data << float(dungeonScoreMapData.OverAllScore);
for (DungeonScoreBestRunForAffix const& bestRun : dungeonScoreMapData.BestRuns)
data << bestRun;
return data;
}
ByteBuffer& operator<<(ByteBuffer& data, DungeonScoreSeasonData const& dungeonScoreSeasonData)
{
data << int32(dungeonScoreSeasonData.Season);
data << Size<uint32>(dungeonScoreSeasonData.SeasonMaps);
data << Size<uint32>(dungeonScoreSeasonData.LadderMaps);
data << float(dungeonScoreSeasonData.SeasonScore);
data << float(dungeonScoreSeasonData.LadderScore);
for (DungeonScoreMapData const& map : dungeonScoreSeasonData.SeasonMaps)
data << map;
for (DungeonScoreMapData const& map : dungeonScoreSeasonData.LadderMaps)
data << map;
return data;
}
ByteBuffer& operator<<(ByteBuffer& data, DungeonScoreData const& dungeonScoreData)
{
data << Size<uint32>(dungeonScoreData.Seasons);
data << int32(dungeonScoreData.TotalRuns);
for (DungeonScoreSeasonData const& season : dungeonScoreData.Seasons)
data << season;
return data;
}
}
|