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
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
|
using System;
using System.Numerics;
using Dalamud.Interface.Windowing;
using ImGuiNET;
namespace Malmstone.Windows;
public class ConfigWindow : Window, IDisposable
{
private Configuration Configuration;
private Plugin Plugin;
private string[] ToastOptions = {"Normal", "Quest", "Error"};
public ConfigWindow(Plugin Plugin) : base("Malmstone Config")
{
Flags = ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoScrollbar | ImGuiWindowFlags.NoScrollWithMouse;
SizeConstraints = new WindowSizeConstraints
{
MinimumSize = new Vector2(540, 390),
MaximumSize = new Vector2(float.MaxValue, float.MaxValue)
};
Configuration = Plugin.Configuration;
this.Plugin = Plugin;
}
public void Dispose() { }
public override void PreDraw()
{
}
public override void Draw()
{
ImGui.BeginTabBar("Settings");
// PVP Match Tab
if (ImGui.BeginTabItem("PVP Match"))
{
ImGui.Text("Default Target Series Level");
var savedTargetSeriesRank = Configuration.DefaultTargetRankProperty;
if (ImGui.InputInt("##SavedTargetSeriesRank", ref savedTargetSeriesRank, 1))
{
if (savedTargetSeriesRank < 1) savedTargetSeriesRank = 1;
if (savedTargetSeriesRank > 107397) savedTargetSeriesRank = 107397;
Configuration.DefaultTargetRankProperty = savedTargetSeriesRank;
Configuration.Save();
}
if (ImGui.IsItemHovered())
{
ImGui.BeginTooltip();
ImGui.Text("Calculator will auto-populate with this number after initializing" +
"\nAlso controls the notification override settings below");
ImGui.EndTooltip();
}
var skipProgressionToastAfterGoal = Configuration.SkipProgressionToastAfterGoal;
if (ImGui.Checkbox("###SkipProgressionToastAfterGoal", ref skipProgressionToastAfterGoal))
{
Configuration.SkipProgressionToastAfterGoal = skipProgressionToastAfterGoal;
Configuration.Save();
}
if (ImGui.IsItemHovered())
{
ImGui.BeginTooltip();
ImGui.Text(
"Automatically stops showing EXP progression notification after reaching the Default Target Series Level" +
"\nOverrides other EXP notification settings");
ImGui.EndTooltip();
}
ImGui.SameLine();
ImGui.Text("Skip EXP progression notifications after default level is achieved");
var skipProgressionChatAfterGoal = Configuration.SkipProgressionChatAfterGoal;
if (ImGui.Checkbox("###SkipProgressionChatAfterGoal", ref skipProgressionChatAfterGoal))
{
Configuration.SkipProgressionChatAfterGoal = skipProgressionChatAfterGoal;
Configuration.Save();
}
if (ImGui.IsItemHovered())
{
ImGui.BeginTooltip();
ImGui.Text(
"Automatically stops showing matches remaining chat messages after reaching the the Default Target Series Level" +
"\nOverrides other post-match chat notification settings");
ImGui.EndTooltip();
}
ImGui.SameLine();
ImGui.Text("Skip remaining matches chat notifications after default level is achieved");
ImGui.Separator();
var showProgressionToastPostMatch = Configuration.ShowProgressionToastPostMatch;
if (ImGui.Checkbox("##ShowProgressionToastPostMatch", ref showProgressionToastPostMatch))
{
Configuration.ShowProgressionToastPostMatch = showProgressionToastPostMatch;
if (showProgressionToastPostMatch)
Plugin.PvPAddon.EnablePostMatchProgressionToast();
else
Plugin.PvPAddon.DisablePostMatchProgressionToast();
Configuration.Save();
}
if (ImGui.IsItemHovered())
{
ImGui.BeginTooltip();
ImGui.Text("Shows a notification with current series level EXP progression after ALL PVP matches");
ImGui.EndTooltip();
}
ImGui.SameLine();
ImGui.Text("Show EXP progression after PVP matches");
ImGui.Text("Notification Type");
int selectedPostMatchToastType = Configuration.PostmatchProgressionToastType;
if (ImGui.Combo("##MatchOptions", ref selectedPostMatchToastType, ToastOptions, ToastOptions.Length))
{
switch (selectedPostMatchToastType)
{
case 0:
Plugin.ToastGui.ShowNormal("[Malmstone Calculator] Normal Toast Selected");
break;
case 1:
Plugin.ToastGui.ShowQuest("[Malmstone Calculator] Quest Toast Selected");
break;
case 2:
Plugin.ToastGui.ShowError("[Malmstone Calculator] Error Toast Selected");
break;
}
Configuration.PostmatchProgressionToastType = selectedPostMatchToastType;
Configuration.Save();
}
ImGui.Separator();
ImGui.Text("Show matches until next level in chat post-game");
var showCCMatchesRemainingPostGame = Configuration.ShowProgressionChatPostCC;
if (ImGui.Checkbox("##ShowCCMatchesRemainingPostGame", ref showCCMatchesRemainingPostGame))
{
Configuration.ShowProgressionChatPostCC = showCCMatchesRemainingPostGame;
if (showCCMatchesRemainingPostGame)
Plugin.PvPAddon.EnableCrystallineConflictPostMatch();
else
Plugin.PvPAddon.DisableCrystallineConflictPostMatch();
Configuration.Save();
}
if (ImGui.IsItemHovered())
{
ImGui.BeginTooltip();
ImGui.Text(
"Show Wins/Losses needed until next Series Level in chat after Crystalline Conflict matches");
ImGui.EndTooltip();
}
ImGui.SameLine();
ImGui.Text("Crystalline Conflict");
var showFLMatchesRemainingPostGame = Configuration.ShowProgressionChatPostFL;
if (ImGui.Checkbox("##ShowFLMatchesRemainingPostGame", ref showFLMatchesRemainingPostGame))
{
Configuration.ShowProgressionChatPostFL = showFLMatchesRemainingPostGame;
if (showFLMatchesRemainingPostGame && !Plugin.PvPAddon.FrontlineRecordPostSetupEnabled)
Plugin.PvPAddon.EnableFrontlinePostMatch();
else if (!showFLMatchesRemainingPostGame && !Configuration.TrackFrontlineBonus)
Plugin.PvPAddon.DisableFrontlinePostMatch();
Configuration.Save();
}
if (ImGui.IsItemHovered())
{
ImGui.BeginTooltip();
ImGui.Text(
"Show placements needed until next Series Level in chat after Frontline matches\nRoulettes shown in parentheses");
ImGui.EndTooltip();
}
ImGui.SameLine();
ImGui.Text("Frontlines");
ImGui.SameLine();
ImGui.Spacing();
ImGui.SameLine();
var trackFrontlineBonus = Configuration.TrackFrontlineBonus;
if (ImGui.Checkbox("##TrackFrontlineBonus", ref trackFrontlineBonus))
{
Configuration.TrackFrontlineBonus = trackFrontlineBonus;
if (trackFrontlineBonus && !Plugin.PvPAddon.FrontlineRecordPostSetupEnabled)
Plugin.PvPAddon.EnableFrontlinePostMatch();
else if (!trackFrontlineBonus && !Configuration.ShowProgressionChatPostFL)
Plugin.PvPAddon.DisableFrontlinePostMatch();
Configuration.OutdatedFrontlineRewardBonus = true;
Configuration.Save();
}
if (ImGui.IsItemHovered())
{
ImGui.BeginTooltip();
ImGui.Text("(EXPERIMENTAL) Track the reward bonus you get for consecutive losses in Frontline" +
"\n3rd place = +10 percent bonus (max 50 percent)" +
"\n2nd place = Current bonus is kept" +
"\n1st Place = Bonus reset to 0\n");
ImGui.EndTooltip();
}
ImGui.SameLine();
ImGui.Text("Track Frontline Reward Bonus");
var showRWMatchesRemainingPostGame = Configuration.ShowProgressionChatPostRW;
if (ImGui.Checkbox("##ShowRWMatchesRemainingPostGame", ref showRWMatchesRemainingPostGame))
{
Configuration.ShowProgressionChatPostRW = showRWMatchesRemainingPostGame;
if (showRWMatchesRemainingPostGame)
Plugin.PvPAddon.EnableRivalWingsPostMatch();
else
Plugin.PvPAddon.DisableRivalWingsPostMatch();
Configuration.Save();
}
if (ImGui.IsItemHovered())
{
ImGui.BeginTooltip();
ImGui.Text("Show Wins/Losses needed until next Series Level in chat after Rival Wings matches");
ImGui.EndTooltip();
}
ImGui.SameLine();
ImGui.Text("Rival Wings");
var OverrideShowMatchesToDefaultTargetGoal = Configuration.OverrideShowMatchesToDefaultTargetGoal;
if (ImGui.Checkbox("##OverrideShowMatchesToDefaultTargetGoal", ref OverrideShowMatchesToDefaultTargetGoal))
{
Configuration.OverrideShowMatchesToDefaultTargetGoal = OverrideShowMatchesToDefaultTargetGoal;
Configuration.Save();
}
if (ImGui.IsItemHovered())
{
ImGui.BeginTooltip();
ImGui.Text(
"Show remaining matches to the Default Target rank instead of the next rank for postmatch chat notifications" +
"\nThis only works if the Default Target rank is higher than your current rank, otherwise this setting will be ignored");
ImGui.EndTooltip();
}
ImGui.SameLine();
ImGui.Text("Show matches until Default Target Rank instead of next rank");
ImGui.EndTabItem();
}
// User Interface Tab
if (ImGui.BeginTabItem("User Interface"))
{
var showMainWindowOnPVPReward = Configuration.ShowMainWindowOnPVPReward;
if (ImGui.Checkbox("##ShowMainWindowOnPVPReward", ref showMainWindowOnPVPReward))
{
Configuration.ShowMainWindowOnPVPReward = showMainWindowOnPVPReward;
Configuration.Save();
}
if (ImGui.IsItemHovered())
{
ImGui.BeginTooltip();
ImGui.Text("Automatically open the calculator window when viewing Series Malmstone rewards");
ImGui.EndTooltip();
}
ImGui.SameLine();
ImGui.Text("Show calculations when viewing Series Malmstones");
ImGui.Separator();
var showTrueSeriesLevelPVPReward = Configuration.ShowTrueSeriesLevelPVPReward;
if (ImGui.Checkbox("##ShowTrueSeriesLevelPVPReward", ref showTrueSeriesLevelPVPReward))
{
if (showTrueSeriesLevelPVPReward)
Plugin.EnablePVPRewardReplaceSeriesLevel();
else
Plugin.DisablePVPRewardReplaceSeriesLevel();
Configuration.ShowTrueSeriesLevelPVPReward = showTrueSeriesLevelPVPReward;
Configuration.Save();
}
if (ImGui.IsItemHovered())
{
ImGui.BeginTooltip();
ImGui.Text("Show plugin tracked Series Level in the PVP Reward window (supports Series Levels above 30)");
ImGui.EndTooltip();
}
ImGui.SameLine();
ImGui.Text("Show Series Level Above 30 in PVP Reward window");
var showTrueSeriesLevelPVPProfile = Configuration.ShowTrueSeriesLevelPVPProfile;
if (ImGui.Checkbox("##ShowTrueSeriesLevelPVPProfile", ref showTrueSeriesLevelPVPProfile))
{
if (showTrueSeriesLevelPVPProfile)
Plugin.EnablePVPProfileReplaceSeriesLevel();
else
Plugin.DisablePVPProfileReplaceSeriesLevel();
Configuration.ShowTrueSeriesLevelPVPProfile = showTrueSeriesLevelPVPProfile;
Configuration.Save();
}
if (ImGui.IsItemHovered())
{
ImGui.BeginTooltip();
ImGui.Text("Show plugin tracked Series Level in the PVP Profile window (supports Series Levels above 30)");
ImGui.EndTooltip();
}
ImGui.SameLine();
ImGui.Text("Show Series Level Above 30 in PVP Profile window");
ImGui.EndTabItem();
}
ImGui.EndTabBar();
ImGui.Separator();
ImGui.Text("Changes saved automatically");
}
}
|