forked from BigBang1112/gbx-net
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCGamePlayerScore.cs
184 lines (144 loc) · 4.74 KB
/
CGamePlayerScore.cs
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
namespace GBX.NET.Engines.Game;
/// <remarks>ID: 0x0308D000</remarks>
[Node(0x0308D000)]
[NodeExtension("Scores")]
public partial class CGamePlayerScore : CMwNod // Did CGameScriptDebugger stole ID of this class? xD
{
[NodeMember]
public string? PlayerName { get; private set; }
[NodeMember]
public string? PlayerDisplayName { get; private set; }
[NodeMember]
public int ScoresVersion { get; private set; }
[NodeMember]
public Score[]? Scores { get; private set; }
[NodeMember]
public int SurvivalScoresVersion { get; private set; }
[NodeMember]
public SurvivalScore[]? SurvivalScores { get; private set; }
[NodeMember]
public PlayerCampaignSkillScore[]? PlayerCampaignSkillScores { get; private set; }
[NodeMember]
public CGamePlayerOfficialScores? PlayerOfficialScores { get; private set; }
[NodeMember]
public TrainingMedalsScore[]? TrainingMedalsScores { get; private set; }
[NodeMember]
public CGameCampaignPlayerScores?[]? CampaignPlayerScores { get; private set; }
[NodeMember]
public CampaignRecordsState[]? CampaignRecordsStates { get; private set; }
[NodeMember]
public LadderMatchResult[]? LadderMatchResults { get; private set; }
protected CGamePlayerScore()
{
}
#region 0x004 chunk
/// <summary>
/// CGamePlayerScore 0x004 chunk
/// </summary>
[Chunk(0x0308D004)]
public class Chunk0308D004 : Chunk<CGamePlayerScore>
{
public string? U01; // GUID
public override void Read(CGamePlayerScore n, GameBoxReader r)
{
n.PlayerName = r.ReadString();
n.PlayerDisplayName = r.ReadString();
U01 = r.ReadId();
n.ScoresVersion = r.ReadInt32();
n.Scores = r.ReadArray(r => Score.Parse(r, n.ScoresVersion));
}
}
#endregion
#region 0x006 chunk
/// <summary>
/// CGamePlayerScore 0x006 chunk
/// </summary>
[Chunk(0x0308D006)]
public class Chunk0308D006 : Chunk<CGamePlayerScore>
{
public override void Read(CGamePlayerScore n, GameBoxReader r)
{
n.SurvivalScoresVersion = r.ReadInt32();
n.SurvivalScores = r.ReadArray(r => SurvivalScore.Parse(r, n.SurvivalScoresVersion));
}
}
#endregion
#region 0x008 chunk
/// <summary>
/// CGamePlayerScore 0x008 chunk
/// </summary>
[Chunk(0x0308D008)]
public class Chunk0308D008 : Chunk<CGamePlayerScore>
{
public ulong U01;
public override void Read(CGamePlayerScore n, GameBoxReader r)
{
n.PlayerCampaignSkillScores = r.ReadArray(r => PlayerCampaignSkillScore.Parse(r));
U01 = r.ReadUInt64(); // SSystemTime
}
}
#endregion
#region 0x00F chunk
/// <summary>
/// CGamePlayerScore 0x00F chunk
/// </summary>
[Chunk(0x0308D00F)]
public class Chunk0308D00F : Chunk<CGamePlayerScore>
{
public override void Read(CGamePlayerScore n, GameBoxReader r)
{
n.PlayerOfficialScores = r.ReadNodeRef<CGamePlayerOfficialScores>();
n.TrainingMedalsScores = r.ReadArray<TrainingMedalsScore>(r => new(
campaignId: r.ReadId(),
u01: r.ReadInt32(),
score: r.ReadNodeRef<CGamePlayerOfficialScores>()));
r.ReadInt32(); // list version 10
n.CampaignPlayerScores = r.ReadArray(r => r.ReadNodeRef<CGameCampaignPlayerScores>());
}
}
#endregion
#region 0x010 chunk
/// <summary>
/// CGamePlayerScore 0x010 chunk
/// </summary>
[Chunk(0x0308D010)]
public class Chunk0308D010 : Chunk<CGamePlayerScore>
{
public byte U01;
public override void Read(CGamePlayerScore n, GameBoxReader r)
{
U01 = r.ReadByte();
n.CampaignRecordsStates = r.ReadArray<CampaignRecordsState>(r => new(
campaignId: r.ReadId(),
u01: r.ReadUInt64())); // SSystemTime
}
}
#endregion
#region 0x011 chunk
/// <summary>
/// CGamePlayerScore 0x011 chunk
/// </summary>
[Chunk(0x0308D011)]
public class Chunk0308D011 : Chunk<CGamePlayerScore>
{
public Int2[]? U01;
public override void ReadWrite(CGamePlayerScore n, GameBoxReaderWriter rw)
{
rw.Array<Int2>(ref U01, 17);
}
}
#endregion
#region 0x012 chunk
/// <summary>
/// CGamePlayerScore 0x012 chunk
/// </summary>
[Chunk(0x0308D012)]
public class Chunk0308D012 : Chunk<CGamePlayerScore>
{
public override void Read(CGamePlayerScore n, GameBoxReader r)
{
n.LadderMatchResults = r.ReadArray<LadderMatchResult>();
}
}
#endregion
}