forked from palindromiq/YATE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
huntinfo.h
227 lines (169 loc) · 5.37 KB
/
huntinfo.h
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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
#ifndef HUNTINFO_H
#define HUNTINFO_H
#include <QVector>
#include <QSet>
#include "globals.h"
#include "logevent.h"
namespace Yate {
class AnalysisViewItem;
enum class CapState {
Capture,
Kill,
Spawned,
InComplete
};
enum class Eidolon {
Teralyst,
Gantulyst,
Hydrolyst
};
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wuninitialized"
class CapInfo {
public:
CapInfo();
bool valid() const;
void setValid(bool newValid);
float shrineTime() const;
void setShrineTime(float newShrineTime);
const QVector<float> &timeBetweenShards() const;
void setTimeBetweenShards(const QVector<float> &newTimeBetweenShards);
void addTimeBetweenShards(float &newTimeBetweenShards);
float timeBetweenShards(int index) const;
void clearTimeBetweenShards();
const QVector<float> &limbBreaks() const;
void setlimbBreaks(const QVector<float> &newLimbBreaks);
void addlimbBreak(float &newLimbBreak);
float limbBreak(int index) const;
void clearLimbBreaks();
float spawnDelay() const;
void setSpawnDelay(float newSpawnDelay);
float waterShield() const;
void setWaterShield(float newWaterShield);
float shrineActivationTime() const;
void setShrineActivationTime(float newShrineActivationTime);
float capshotTime() const;
void setCapshotTime(float newCapshotTime);
int numberOfLimbs() const;
void setNumberOfLimbs(int newNumberOfLimbs);
CapState result() const;
void setResult(CapState newResult);
Eidolon eidolon() const;
void setEidolon(Eidolon newEidolon);
AnalysisViewItem *toAnalysisViewItem(QString firstLoadTime = "") const;
float lastLimbProgressTime() const;
void setLastLimbProgressTime(float newLastLimbTime);
float loadTime() const;
void setLoadTime(float newLoadTime);
float lootDropTime() const;
void setLootDropTime(float newLootDropTime);
float lootDropTimestamp() const;
void setLootDropTimestamp(float newLootDropTimestamp);
float spawnTimestamp() const;
void setSpawnTimestamp(float newSpawnTimestamp);
float capshotProgressTimestamp() const;
void setCapshotProgressTime(float newCapshotTimestamp);
bool lateShardInsertLog() const;
void setLateShardInsertLog(bool newLateShardInsertLog);
private:
bool valid_;
float shrineTime_;
QVector<float> timeBetweenShards_;
QVector<float> limbBreaks_;
float spawnDelay_;
float waterShield_;
float shrineActivationTime_;
float capshotTime_;
float lastLimbProgessTime_;
float loadTime_;
float lootDropTime_;
float lootDropTimestamp_;
float spawnTimestamp_;
float capshotProgressTimestamp_;
int numberOfLimbs_;
bool lateShardInsertLog_;
CapState result_;
Eidolon eidolon_;
};
class RunInfo {
public:
RunInfo();
CapInfo &teralystCapInfo();
void setTeralystCapInfo(const CapInfo &newTeralystCapInfo);
CapInfo &gantulystCapInfo();
void setGantulystCapInfo(const CapInfo &newGantulystCapInfo);
CapInfo &hydrolystCapInfo();
void setHydrolystCapInfo(const CapInfo &newHydrolystCapInfo);
CapInfo &capInfoByIndex(int index);
void clear();
AnalysisViewItem *toAnalysisViewItem(int runNo);
QString getRunResult();
int getNumberOfCaps();
int getNumberOfKills();
float startTimestamp() const;
void setStartTimestamp(float newStartTime);
const QVector<LogEvent> &eventLog() const;
void addEvent(const LogEvent &evt);
float loadTime() const;
void setLoadTime(float newLoadTime);
bool hasLoadTime() const;
private:
CapInfo teralystCapInfo_;
CapInfo gantulystCapInfo_;
CapInfo hydrolystCapInfo_;
float startTimestamp_;
float loadTime_;
bool hasLoadTime_;
QVector<LogEvent> eventLog_;
};
class NightInfo {
public:
NightInfo();
const QVector<RunInfo> &runs() const;
void setRuns(const QVector<RunInfo> &newRuns);
void addRun(RunInfo runInfo);
RunInfo &run(int index);
void removeRun(int index);
void clear();
AnalysisViewItem *toAnalysisViewItem(int nightNo) const;
QString getNightResult() const;
QString getAverage() const;
int getNumberOfHydrolysts() const;
int validRunCount() const;
float startTimestamp() const;
void setStartTimestamp(float newStartTime);
void addSquadMember(const QString &member);
void addSquadMembers(const QSet<QString> &members);
void removeSquadMember(const QString &member);
QString squadString() const;
const QString &host() const;
void setHost(const QString &newHost);
const QSet<QString> &squad() const;
void setSquad(const QSet<QString> &newSquad);
private:
QVector<RunInfo> runs_;
float startTimestamp_;
QString host_;
QSet<QString> squad_;
};
class HuntInfo
{
public:
HuntInfo();
const QVector<NightInfo> &nights() const;
void setNights(const QVector<NightInfo> &newNights);
int nightCount() const;
void addNight(NightInfo nightInfo);
NightInfo &night(int index);
void removeNight(int index);
void clear();
static QString eidolonName(Eidolon eido, bool abbreviate = false);
static QString eidolonName(int eido, bool abbreviate = false);
static QString timestampToProgressString(float timestamp);
QVector<AnalysisViewItem *> toAnalysisViewItem() const;
private:
QVector<NightInfo> nights_;
};
#pragma GCC diagnostic pop
}
#endif // HUNTINFO_H