-
-
Notifications
You must be signed in to change notification settings - Fork 73
/
MatchData.cs
174 lines (126 loc) · 4.03 KB
/
MatchData.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
using System.Text.Json.Serialization;
namespace MatchZy;
public class Winner
{
[JsonPropertyName("side")]
public string Side { get; set; }
[JsonPropertyName("team")]
public string Team { get; set; }
public Winner(string side, string team)
{
Side = side;
Team = team;
}
}
public class StatsPlayer
{
[JsonPropertyName("steamid")]
public required string SteamId { get; init; }
[JsonPropertyName("name")]
public required string Name { get; init; }
[JsonPropertyName("stats")]
public required PlayerStats Stats { get; init; }
}
// Referred from PugSharp
public class PlayerStats
{
[JsonPropertyName("kills")]
public int Kills { get; set; }
[JsonPropertyName("deaths")]
public int Deaths { get; set; }
[JsonPropertyName("assists")]
public int Assists { get; set; }
[JsonPropertyName("flash_assists")]
public int FlashAssists { get; set; }
[JsonPropertyName("team_kills")]
public int TeamKills { get; set; }
[JsonPropertyName("suicides")]
public int Suicides { get; set; }
[JsonPropertyName("damage")]
public int Damage { get; set; }
[JsonPropertyName("utility_damage")]
public int UtilityDamage { get; set; }
[JsonPropertyName("enemies_flashed")]
public int EnemiesFlashed { get; set; }
[JsonPropertyName("friendlies_flashed")]
public int FriendliesFlashed { get; set; }
[JsonPropertyName("knife_kills")]
public int KnifeKills { get; set; }
[JsonPropertyName("headshot_kills")]
public int HeadshotKills { get; set; }
[JsonPropertyName("rounds_played")]
public int RoundsPlayed { get; set; }
[JsonPropertyName("bomb_defuses")]
public int BombDefuses { get; set; }
[JsonPropertyName("bomb_plants")]
public int BombPlants { get; set; }
[JsonPropertyName("1k")]
public int Kills1 { get; set; }
[JsonPropertyName("2k")]
public int Kills2 { get; set; }
[JsonPropertyName("3k")]
public int Kills3 { get; set; }
[JsonPropertyName("4k")]
public int Kills4 { get; set; }
[JsonPropertyName("5k")]
public int Kills5 { get; set; }
[JsonPropertyName("1v1")]
public int OneV1s { get; set; }
[JsonPropertyName("1v2")]
public int OneV2s { get; set; }
[JsonPropertyName("1v3")]
public int OneV3s { get; set; }
[JsonPropertyName("1v4")]
public int OneV4s { get; set; }
[JsonPropertyName("1v5")]
public int OneV5s { get; set; }
[JsonPropertyName("first_kills_t")]
public int FirstKillsT { get; set; }
[JsonPropertyName("first_kills_ct")]
public int FirstKillsCT { get; set; }
[JsonPropertyName("first_deaths_t")]
public int FirstDeathsT { get; set; }
[JsonPropertyName("first_deaths_ct")]
public int FirstDeathsCT { get; set; }
[JsonPropertyName("trade_kills")]
public int TradeKills { get; set; }
[JsonPropertyName("kast")]
public int Kast { get; set; }
[JsonPropertyName("score")]
public int Score { get; set; }
[JsonPropertyName("mvp")]
public int Mvps { get; set; }
}
public class MatchZyTeamWrapper
{
[JsonPropertyName("id")]
public string Id { get; set; }
[JsonPropertyName("name")]
public string Name { get; set; }
public MatchZyTeamWrapper(string id, string name)
{
Id = id;
Name = name;
}
}
public class MatchZyStatsTeam : MatchZyTeamWrapper
{
[JsonPropertyName("series_score")]
public int SeriesScore { get; set; }
[JsonPropertyName("score")]
public int Score { get; set; }
[JsonPropertyName("score_ct")]
public int ScoreCT { get; set; }
[JsonPropertyName("score_t")]
public int ScoreT { get; set; }
[JsonPropertyName("players")]
public List<StatsPlayer> Players { get; set; }
public MatchZyStatsTeam(string id, string name, int seriesScore, int score, int scoreCt, int scoreT, List<StatsPlayer> players) : base(id, name)
{
SeriesScore = seriesScore;
Score = score;
ScoreCT = scoreCt;
ScoreT = scoreT;
Players = players;
}
}