/
SecretParser.cs
4859 lines (4386 loc) · 243 KB
/
SecretParser.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
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
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// reference:System.Core.dll
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using Advanced_Combat_Tracker;
using System.Reflection;
using System.Xml;
using System.Text.RegularExpressions;
using System.Globalization;
using System.Net;
using System.Diagnostics;
//Debug
// using System.Runtime.InteropServices;
// There is no copyright on this code
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
// associated documentation files (the "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is furnished to do so.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
[assembly: AssemblyTitle("Secret World damage and heal parse")]
[assembly: AssemblyDescription("Read through the CombatLog.txt files and parse the combat and healing done (ACT3)")]
[assembly: AssemblyCopyright("Author: Boorish, since 1.0.5.4 Lausi; Contributions from: Eafalas, Holok, Inkraja, Akamiko, SecretFox; ***")]
[assembly: AssemblyVersion("1.0.7.8")]
// This plugin is based on the Rift3 plugin by Creub and Altuslumen. Thanks guys :)
// Fix for glance and penetrate hits fom Holok
// Added Incoming Damage (takencrit%, takenpen&, ...) to chat export (Holok)
// Add shiny colours to agis, bump version to 1.0.6.6 (Inkraja https://github.com/Inkraja/Advanced-Combat-Tracker)
namespace SecretParse_Plugin
{
public class SecretParse : UserControl, IActPluginV1
{
// Debug
// [DllImport("kernel32.dll", CharSet = CharSet.Auto)]
// public static extern void OutputDebugString(string message);
// /Debug
#region Designer Created Code (Avoid editing)
private System.ComponentModel.IContainer components = null;
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
private void InitializeComponent()
{
this.labelHeader = new System.Windows.Forms.Label();
this.labelGeneral = new System.Windows.Forms.Label();
this.labelLanguage = new System.Windows.Forms.Label();
this.comboBox_Language = new System.Windows.Forms.ComboBox();
this.checkBox_AutoCheck = new System.Windows.Forms.CheckBox();
this.checkBox_ExportScript = new System.Windows.Forms.CheckBox();
this.checkBox_LimitNames = new System.Windows.Forms.CheckBox();
this.checkBox_ExportRoundDPS = new System.Windows.Forms.CheckBox();
this.checkBox_ExportShowLegend = new System.Windows.Forms.CheckBox();
this.checkBox_ExportColored = new System.Windows.Forms.CheckBox();
this.checkBox_ExportSplit = new System.Windows.Forms.CheckBox();
this.checkBox_ExportHtml = new System.Windows.Forms.CheckBox();
this.checkBox_ExportAllies = new System.Windows.Forms.CheckBox();
this.checkBox_DontExportShortEnc = new System.Windows.Forms.CheckBox();
this.checkBox_EnableTSWAddon = new System.Windows.Forms.CheckBox();
this.checkBox_AutofixDBConf = new System.Windows.Forms.CheckBox();
this.checkBox_HideUnknown = new System.Windows.Forms.CheckBox();
this.checkBox_SelfDamage = new System.Windows.Forms.CheckBox();
this.checkBox_SelfPlayerDamage = new System.Windows.Forms.CheckBox();
this.checkBox_ReduceAegis = new System.Windows.Forms.CheckBox();
this.labelFilterinig = new System.Windows.Forms.Label();
this.checkBox_Filter = new System.Windows.Forms.CheckBox();
this.labelFilteringName = new System.Windows.Forms.Label();
this.textBox_FilterName = new System.Windows.Forms.TextBox();
this.button_AddCharacter = new System.Windows.Forms.Button();
this.button_DeleteCharacter = new System.Windows.Forms.Button();
this.checkBox_filterExclude = new System.Windows.Forms.CheckBox();
this.checkBox_filterScript = new System.Windows.Forms.CheckBox();
this.labelChatExport = new System.Windows.Forms.Label();
this.checkedListBox_ExportFields = new System.Windows.Forms.CheckedListBox();
this.labelFilterChars = new System.Windows.Forms.Label();
this.checkedListBox_Filters = new System.Windows.Forms.CheckedListBox();
this.SuspendLayout();
//
// labelHeader
//
this.labelHeader.AutoSize = true;
this.labelHeader.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelHeader.Location = new System.Drawing.Point(12, 9);
this.labelHeader.Name = "labelHeader";
this.labelHeader.Size = new System.Drawing.Size(214, 13);
this.labelHeader.TabIndex = 26;
this.labelHeader.Text = "Secret Combat parser plugin Options";
this.labelHeader.MouseHover += new System.EventHandler(this.label1_MouseHover);
//
// labelGeneral
//
this.labelGeneral.AutoSize = true;
this.labelGeneral.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelGeneral.Location = new System.Drawing.Point(12, 28);
this.labelGeneral.Name = "labelGeneral";
this.labelGeneral.Size = new System.Drawing.Size(44, 13);
this.labelGeneral.TabIndex = 27;
this.labelGeneral.Text = "General";
//
// labelLanguage
//
this.labelLanguage.AutoSize = true;
this.labelLanguage.Location = new System.Drawing.Point(12, 44);
this.labelLanguage.Name = "labelLanguage";
this.labelLanguage.Size = new System.Drawing.Size(55, 13);
this.labelLanguage.TabIndex = 28;
this.labelLanguage.Text = "Language";
//
// comboBox_Language
//
this.comboBox_Language.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox_Language.FormattingEnabled = true;
this.comboBox_Language.Items.AddRange(new object[] {
"English",
"German",
"French"});
this.comboBox_Language.Location = new System.Drawing.Point(73, 41);
this.comboBox_Language.Name = "comboBox_Language";
this.comboBox_Language.Size = new System.Drawing.Size(159, 21);
this.comboBox_Language.TabIndex = 1;
this.comboBox_Language.SelectedIndexChanged += new System.EventHandler(this.comboBox_Language_SelectedIndexChanged);
this.comboBox_Language.MouseHover += new System.EventHandler(this.comboBox_Language_MouseHover);
//
// checkBox_AutoCheck
//
this.checkBox_AutoCheck.AutoSize = true;
this.checkBox_AutoCheck.Checked = true;
this.checkBox_AutoCheck.CheckState = System.Windows.Forms.CheckState.Checked;
this.checkBox_AutoCheck.Location = new System.Drawing.Point(15, 62);
this.checkBox_AutoCheck.Name = "checkBox_AutoCheck";
this.checkBox_AutoCheck.Size = new System.Drawing.Size(320, 17);
this.checkBox_AutoCheck.TabIndex = 2;
this.checkBox_AutoCheck.Text = "Auto check the web page for new version of the Secret Plugin";
this.checkBox_AutoCheck.UseVisualStyleBackColor = true;
this.checkBox_AutoCheck.MouseHover += new System.EventHandler(this.checkBox_AutoCheck_MouseHover);
//
// checkBox_ExportScript
//
this.checkBox_ExportScript.AutoSize = true;
this.checkBox_ExportScript.Checked = true;
this.checkBox_ExportScript.CheckState = System.Windows.Forms.CheckState.Checked;
this.checkBox_ExportScript.Location = new System.Drawing.Point(15, 78);
this.checkBox_ExportScript.Name = "checkBox_ExportScript";
this.checkBox_ExportScript.Size = new System.Drawing.Size(157, 17);
this.checkBox_ExportScript.TabIndex = 3;
this.checkBox_ExportScript.Text = "Export results to TSW script";
this.checkBox_ExportScript.UseVisualStyleBackColor = true;
this.checkBox_ExportScript.CheckedChanged += new System.EventHandler(this.checkBox_ExportScript_CheckedChanged);
this.checkBox_ExportScript.MouseHover += new System.EventHandler(this.checkBox_ExportScript_MouseHover);
//
// checkBox_LimitNames
//
this.checkBox_LimitNames.AutoSize = true;
this.checkBox_LimitNames.Checked = true;
this.checkBox_LimitNames.CheckState = System.Windows.Forms.CheckState.Checked;
this.checkBox_LimitNames.Location = new System.Drawing.Point(35, 94);
this.checkBox_LimitNames.Name = "checkBox_LimitNames";
this.checkBox_LimitNames.Size = new System.Drawing.Size(159, 17);
this.checkBox_LimitNames.TabIndex = 4;
this.checkBox_LimitNames.Text = "Limit playernames to 7 chars";
this.checkBox_LimitNames.UseVisualStyleBackColor = true;
this.checkBox_LimitNames.MouseHover += new System.EventHandler(this.checkBox_LimitNames_MouseHover);
//
// checkBox_ExportRoundDPS
//
this.checkBox_ExportRoundDPS.AutoSize = true;
this.checkBox_ExportRoundDPS.Location = new System.Drawing.Point(35, 110);
this.checkBox_ExportRoundDPS.Name = "checkBox_ExportRoundDPS";
this.checkBox_ExportRoundDPS.Size = new System.Drawing.Size(150, 17);
this.checkBox_ExportRoundDPS.TabIndex = 5;
this.checkBox_ExportRoundDPS.Text = "Round DPS / HPS values";
this.checkBox_ExportRoundDPS.UseVisualStyleBackColor = true;
this.checkBox_ExportRoundDPS.MouseHover += new System.EventHandler(this.checkBox_ExportRoundDPS_MouseHover);
//
// checkBox_ExportShowLegend
//
this.checkBox_ExportShowLegend.AutoSize = true;
this.checkBox_ExportShowLegend.Checked = true;
this.checkBox_ExportShowLegend.CheckState = System.Windows.Forms.CheckState.Checked;
this.checkBox_ExportShowLegend.Location = new System.Drawing.Point(35, 126);
this.checkBox_ExportShowLegend.Name = "checkBox_ExportShowLegend";
this.checkBox_ExportShowLegend.Size = new System.Drawing.Size(155, 17);
this.checkBox_ExportShowLegend.TabIndex = 6;
this.checkBox_ExportShowLegend.Text = "Show legend in TSW script";
this.checkBox_ExportShowLegend.UseVisualStyleBackColor = true;
this.checkBox_ExportShowLegend.MouseHover += new System.EventHandler(this.checkBox_ExportShowLegend_MouseHover);
//
// checkBox_ExportColored
//
this.checkBox_ExportColored.AutoSize = true;
this.checkBox_ExportColored.Location = new System.Drawing.Point(35, 142);
this.checkBox_ExportColored.Name = "checkBox_ExportColored";
this.checkBox_ExportColored.Size = new System.Drawing.Size(87, 17);
this.checkBox_ExportColored.TabIndex = 7;
this.checkBox_ExportColored.Text = "Colored Chat";
this.checkBox_ExportColored.UseVisualStyleBackColor = true;
this.checkBox_ExportColored.MouseHover += new System.EventHandler(this.checkBox_ExportColored_MouseHover);
//
// checkBox_ExportSplit
//
this.checkBox_ExportSplit.AutoSize = true;
this.checkBox_ExportSplit.Location = new System.Drawing.Point(35, 158);
this.checkBox_ExportSplit.Name = "checkBox_ExportSplit";
this.checkBox_ExportSplit.Size = new System.Drawing.Size(71, 17);
this.checkBox_ExportSplit.TabIndex = 8;
this.checkBox_ExportSplit.Text = "Split Chat";
this.checkBox_ExportSplit.UseVisualStyleBackColor = true;
this.checkBox_ExportSplit.MouseHover += new System.EventHandler(this.checkBox_ExportSplit_MouseHover);
//
// checkBox_ExportHtml
//
this.checkBox_ExportHtml.AutoSize = true;
this.checkBox_ExportHtml.Checked = true;
this.checkBox_ExportHtml.CheckState = System.Windows.Forms.CheckState.Checked;
this.checkBox_ExportHtml.Location = new System.Drawing.Point(15, 174);
this.checkBox_ExportHtml.Name = "checkBox_ExportHtml";
this.checkBox_ExportHtml.Size = new System.Drawing.Size(151, 17);
this.checkBox_ExportHtml.TabIndex = 9;
this.checkBox_ExportHtml.Text = "Export results to TSW html";
this.checkBox_ExportHtml.UseVisualStyleBackColor = true;
this.checkBox_ExportHtml.MouseHover += new System.EventHandler(this.checkBox_ExportHtml_MouseHover);
//
// checkBox_ExportAllies
//
this.checkBox_ExportAllies.AutoSize = true;
this.checkBox_ExportAllies.Checked = true;
this.checkBox_ExportAllies.CheckState = System.Windows.Forms.CheckState.Checked;
this.checkBox_ExportAllies.Location = new System.Drawing.Point(15, 190);
this.checkBox_ExportAllies.Name = "checkBox_ExportAllies";
this.checkBox_ExportAllies.Size = new System.Drawing.Size(174, 17);
this.checkBox_ExportAllies.TabIndex = 10;
this.checkBox_ExportAllies.Text = "Export results for raid/team only";
this.checkBox_ExportAllies.UseVisualStyleBackColor = true;
this.checkBox_ExportAllies.MouseHover += new System.EventHandler(this.checkBox_ExportAllies_MouseHover);
//
// checkBox_DontExportShortEnc
//
this.checkBox_DontExportShortEnc.AutoSize = true;
this.checkBox_DontExportShortEnc.Checked = true;
this.checkBox_DontExportShortEnc.CheckState = System.Windows.Forms.CheckState.Checked;
this.checkBox_DontExportShortEnc.Location = new System.Drawing.Point(15, 206);
this.checkBox_DontExportShortEnc.Name = "checkBox_DontExportShortEnc";
this.checkBox_DontExportShortEnc.Size = new System.Drawing.Size(192, 17);
this.checkBox_DontExportShortEnc.TabIndex = 11;
this.checkBox_DontExportShortEnc.Text = "Dont export sub 10 sec encounters";
this.checkBox_DontExportShortEnc.UseVisualStyleBackColor = true;
this.checkBox_DontExportShortEnc.MouseHover += new System.EventHandler(this.checkBox_DontExportShortEnc_MouseHover);
//
// checkBox_EnableTSWAddon
//
this.checkBox_EnableTSWAddon.AutoSize = true;
this.checkBox_EnableTSWAddon.Location = new System.Drawing.Point(15, 222);
this.checkBox_EnableTSWAddon.Name = "checkBox_EnableTSWAddon";
this.checkBox_EnableTSWAddon.Size = new System.Drawing.Size(183, 17);
this.checkBox_EnableTSWAddon.TabIndex = 12;
this.checkBox_EnableTSWAddon.Text = "Enable TSWACT Addon features";
this.checkBox_EnableTSWAddon.UseVisualStyleBackColor = true;
this.checkBox_EnableTSWAddon.CheckedChanged += new System.EventHandler(this.checkBox_EnableTSWAddon_CheckedChanged);
this.checkBox_EnableTSWAddon.MouseHover += new System.EventHandler(this.checkBox_EnableTSWAddon_MouseHover);
//
// checkBox_AutofixDBConf
//
this.checkBox_AutofixDBConf.AutoSize = true;
this.checkBox_AutofixDBConf.Location = new System.Drawing.Point(35, 238);
this.checkBox_AutofixDBConf.Name = "checkBox_AutofixDBConf";
this.checkBox_AutofixDBConf.Size = new System.Drawing.Size(148, 17);
this.checkBox_AutofixDBConf.TabIndex = 13;
this.checkBox_AutofixDBConf.Text = "Auto fix dbDebug.conf file";
this.checkBox_AutofixDBConf.UseVisualStyleBackColor = true;
this.checkBox_AutofixDBConf.MouseHover += new System.EventHandler(this.checkBox_AutofixDBConf_MouseHover);
//
// checkBox_HideUnknown
//
this.checkBox_HideUnknown.AutoSize = true;
this.checkBox_HideUnknown.Location = new System.Drawing.Point(15, 254);
this.checkBox_HideUnknown.Name = "checkBox_HideUnknown";
this.checkBox_HideUnknown.Size = new System.Drawing.Size(180, 17);
this.checkBox_HideUnknown.TabIndex = 14;
this.checkBox_HideUnknown.Text = "Hide the TSW_Unknown entries";
this.checkBox_HideUnknown.UseVisualStyleBackColor = true;
this.checkBox_HideUnknown.MouseHover += new System.EventHandler(this.checkBox_HideUnknown_MouseHover);
//
// checkBox_SelfDamage
//
this.checkBox_SelfDamage.AutoSize = true;
this.checkBox_SelfDamage.Location = new System.Drawing.Point(15, 270);
this.checkBox_SelfDamage.Name = "checkBox_SelfDamage";
this.checkBox_SelfDamage.Size = new System.Drawing.Size(113, 17);
this.checkBox_SelfDamage.TabIndex = 15;
this.checkBox_SelfDamage.Text = "Show self-damage";
this.checkBox_SelfDamage.UseVisualStyleBackColor = true;
this.checkBox_SelfDamage.MouseHover += new System.EventHandler(this.checkBox_SelfDamage_MouseHover);
//
// checkBox_SelfPlayerDamage
//
this.checkBox_SelfPlayerDamage.AutoSize = true;
this.checkBox_SelfPlayerDamage.Location = new System.Drawing.Point(35, 286);
this.checkBox_SelfPlayerDamage.Name = "checkBox_SelfPlayerDamage";
this.checkBox_SelfPlayerDamage.Size = new System.Drawing.Size(99, 17);
this.checkBox_SelfPlayerDamage.TabIndex = 16;
this.checkBox_SelfPlayerDamage.Text = "Show by Player";
this.checkBox_SelfPlayerDamage.UseVisualStyleBackColor = true;
this.checkBox_SelfPlayerDamage.MouseHover += new System.EventHandler(this.checkBox_SelfPlayerDamage_MouseHover);
//
// checkBox_ReduceAegis
//
this.checkBox_ReduceAegis.AutoSize = true;
this.checkBox_ReduceAegis.Location = new System.Drawing.Point(15, 302);
this.checkBox_ReduceAegis.Name = "checkBox_ReduceAegis";
this.checkBox_ReduceAegis.Size = new System.Drawing.Size(142, 17);
this.checkBox_ReduceAegis.TabIndex = 17;
this.checkBox_ReduceAegis.Text = "Reduce Aegis on names";
this.checkBox_ReduceAegis.UseVisualStyleBackColor = true;
this.checkBox_ReduceAegis.MouseHover += new System.EventHandler(this.checkBox_ReduceAegis_MouseHover);
//
// labelFilterinig
//
this.labelFilterinig.AutoSize = true;
this.labelFilterinig.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelFilterinig.Location = new System.Drawing.Point(12, 355);
this.labelFilterinig.Name = "labelFilterinig";
this.labelFilterinig.Size = new System.Drawing.Size(43, 13);
this.labelFilterinig.TabIndex = 18;
this.labelFilterinig.Text = "Filtering";
//
// checkBox_Filter
//
this.checkBox_Filter.AutoSize = true;
this.checkBox_Filter.Location = new System.Drawing.Point(15, 373);
this.checkBox_Filter.Name = "checkBox_Filter";
this.checkBox_Filter.Size = new System.Drawing.Size(143, 17);
this.checkBox_Filter.TabIndex = 19;
this.checkBox_Filter.Text = "Enable character filtering";
this.checkBox_Filter.UseVisualStyleBackColor = true;
this.checkBox_Filter.CheckedChanged += new System.EventHandler(this.checkBox_Filter_CheckedChanged);
this.checkBox_Filter.MouseHover += new System.EventHandler(this.checkBox_Filter_MouseHover);
//
// labelFilteringName
//
this.labelFilteringName.AutoSize = true;
this.labelFilteringName.Location = new System.Drawing.Point(12, 404);
this.labelFilteringName.Name = "labelFilteringName";
this.labelFilteringName.Size = new System.Drawing.Size(35, 13);
this.labelFilteringName.TabIndex = 20;
this.labelFilteringName.Text = "Name";
//
// textBox_FilterName
//
this.textBox_FilterName.Enabled = false;
this.textBox_FilterName.Location = new System.Drawing.Point(53, 401);
this.textBox_FilterName.MaxLength = 32;
this.textBox_FilterName.Name = "textBox_FilterName";
this.textBox_FilterName.Size = new System.Drawing.Size(149, 20);
this.textBox_FilterName.TabIndex = 21;
this.textBox_FilterName.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBox_FilterName_KeyDown);
this.textBox_FilterName.MouseHover += new System.EventHandler(this.textBox_FilterName_MouseHover);
//
// button_AddCharacter
//
this.button_AddCharacter.Enabled = false;
this.button_AddCharacter.Location = new System.Drawing.Point(15, 427);
this.button_AddCharacter.Name = "button_AddCharacter";
this.button_AddCharacter.Size = new System.Drawing.Size(83, 26);
this.button_AddCharacter.TabIndex = 22;
this.button_AddCharacter.Text = "Add";
this.button_AddCharacter.UseVisualStyleBackColor = true;
this.button_AddCharacter.Click += new System.EventHandler(this.button_AddCharacter_Click);
this.button_AddCharacter.MouseHover += new System.EventHandler(this.button_AddCharacter_MouseHover);
//
// button_DeleteCharacter
//
this.button_DeleteCharacter.Enabled = false;
this.button_DeleteCharacter.Location = new System.Drawing.Point(119, 427);
this.button_DeleteCharacter.Name = "button_DeleteCharacter";
this.button_DeleteCharacter.Size = new System.Drawing.Size(83, 26);
this.button_DeleteCharacter.TabIndex = 23;
this.button_DeleteCharacter.Text = "Delete";
this.button_DeleteCharacter.UseVisualStyleBackColor = true;
this.button_DeleteCharacter.Click += new System.EventHandler(this.button_DeleteCharacter_Click);
this.button_DeleteCharacter.MouseHover += new System.EventHandler(this.button_DeleteCharacter_MouseHover);
//
// checkBox_filterExclude
//
this.checkBox_filterExclude.AutoSize = true;
this.checkBox_filterExclude.Location = new System.Drawing.Point(15, 469);
this.checkBox_filterExclude.Name = "checkBox_filterExclude";
this.checkBox_filterExclude.Size = new System.Drawing.Size(107, 17);
this.checkBox_filterExclude.TabIndex = 24;
this.checkBox_filterExclude.Text = "Exclusive filtering";
this.checkBox_filterExclude.UseVisualStyleBackColor = true;
this.checkBox_filterExclude.MouseHover += new System.EventHandler(this.checkBox_filterExclude_MouseHover);
//
// checkBox_filterScript
//
this.checkBox_filterScript.AutoSize = true;
this.checkBox_filterScript.Location = new System.Drawing.Point(15, 492);
this.checkBox_filterScript.Name = "checkBox_filterScript";
this.checkBox_filterScript.Size = new System.Drawing.Size(131, 17);
this.checkBox_filterScript.TabIndex = 25;
this.checkBox_filterScript.Text = "Filter Generated Script";
this.checkBox_filterScript.UseVisualStyleBackColor = true;
this.checkBox_filterScript.MouseHover += new System.EventHandler(this.checkBox_filterScript_MouseHover);
//
// labelChatExport
//
this.labelChatExport.AutoSize = true;
this.labelChatExport.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelChatExport.Location = new System.Drawing.Point(275, 92);
this.labelChatExport.Name = "labelChatExport";
this.labelChatExport.Size = new System.Drawing.Size(92, 13);
this.labelChatExport.TabIndex = 26;
this.labelChatExport.Text = "Chat Export Fields";
//
// checkedListBox_ExportFields
//
this.checkedListBox_ExportFields.Enabled = false;
this.checkedListBox_ExportFields.FormattingEnabled = true;
this.checkedListBox_ExportFields.Items.AddRange(new object[] {
"DPS",
"Crit%",
"Pen%",
"Glance%",
"Block%",
"HPS",
"HealCrit%",
"Evade%",
"AegisMismatch%",
"TakenDamage",
"TakenCrit%",
"TakenPen%",
"TakenGlance%",
"TakenBlock%",
"TakenEvade%"});
this.checkedListBox_ExportFields.Location = new System.Drawing.Point(222, 110);
this.checkedListBox_ExportFields.Name = "checkedListBox_ExportFields";
this.checkedListBox_ExportFields.Size = new System.Drawing.Size(227, 139);
this.checkedListBox_ExportFields.TabIndex = 27;
//
// labelFilterChars
//
this.labelFilterChars.AutoSize = true;
this.labelFilterChars.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelFilterChars.Location = new System.Drawing.Point(275, 261);
this.labelFilterChars.Name = "labelFilterChars";
this.labelFilterChars.Size = new System.Drawing.Size(83, 13);
this.labelFilterChars.TabIndex = 28;
this.labelFilterChars.Text = "Filter Characters";
//
// checkedListBox_Filters
//
this.checkedListBox_Filters.Enabled = false;
this.checkedListBox_Filters.FormattingEnabled = true;
this.checkedListBox_Filters.Location = new System.Drawing.Point(222, 279);
this.checkedListBox_Filters.Name = "checkedListBox_Filters";
this.checkedListBox_Filters.Size = new System.Drawing.Size(227, 199);
this.checkedListBox_Filters.TabIndex = 29;
this.checkedListBox_Filters.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.checkedListBox_Filters_ItemCheck);
this.checkedListBox_Filters.MouseHover += new System.EventHandler(this.checkedListBox_Filters_MouseHover);
//
// SecretParse
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.checkBox_SelfPlayerDamage);
this.Controls.Add(this.labelHeader);
this.Controls.Add(this.labelGeneral);
this.Controls.Add(this.labelLanguage);
this.Controls.Add(this.comboBox_Language);
this.Controls.Add(this.checkBox_AutoCheck);
this.Controls.Add(this.checkBox_ExportScript);
this.Controls.Add(this.checkBox_LimitNames);
this.Controls.Add(this.checkBox_ExportRoundDPS);
this.Controls.Add(this.checkBox_ExportShowLegend);
this.Controls.Add(this.checkBox_ExportColored);
this.Controls.Add(this.checkBox_ExportSplit);
this.Controls.Add(this.checkBox_ExportHtml);
this.Controls.Add(this.checkBox_ExportAllies);
this.Controls.Add(this.checkBox_DontExportShortEnc);
this.Controls.Add(this.checkBox_EnableTSWAddon);
this.Controls.Add(this.checkBox_AutofixDBConf);
this.Controls.Add(this.checkBox_HideUnknown);
this.Controls.Add(this.checkBox_SelfDamage);
this.Controls.Add(this.checkBox_ReduceAegis);
this.Controls.Add(this.labelFilterinig);
this.Controls.Add(this.checkBox_Filter);
this.Controls.Add(this.labelFilteringName);
this.Controls.Add(this.textBox_FilterName);
this.Controls.Add(this.button_AddCharacter);
this.Controls.Add(this.button_DeleteCharacter);
this.Controls.Add(this.checkBox_filterExclude);
this.Controls.Add(this.checkBox_filterScript);
this.Controls.Add(this.labelChatExport);
this.Controls.Add(this.checkedListBox_ExportFields);
this.Controls.Add(this.labelFilterChars);
this.Controls.Add(this.checkedListBox_Filters);
this.Name = "SecretParse";
this.Size = new System.Drawing.Size(494, 534);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label labelHeader;
private System.Windows.Forms.Label labelGeneral;
private System.Windows.Forms.Label labelLanguage;
private System.Windows.Forms.ComboBox comboBox_Language;
private System.Windows.Forms.CheckBox checkBox_AutoCheck;
private System.Windows.Forms.CheckBox checkBox_ExportScript;
private System.Windows.Forms.CheckBox checkBox_LimitNames;
private System.Windows.Forms.CheckBox checkBox_ExportRoundDPS;
private System.Windows.Forms.CheckBox checkBox_ExportShowLegend;
private System.Windows.Forms.CheckBox checkBox_ExportColored;
private System.Windows.Forms.CheckBox checkBox_ExportSplit;
private System.Windows.Forms.CheckBox checkBox_ExportHtml;
private System.Windows.Forms.CheckBox checkBox_ExportAllies;
private System.Windows.Forms.CheckBox checkBox_DontExportShortEnc;
private System.Windows.Forms.CheckBox checkBox_EnableTSWAddon;
private System.Windows.Forms.CheckBox checkBox_AutofixDBConf;
private System.Windows.Forms.CheckBox checkBox_HideUnknown;
private System.Windows.Forms.CheckBox checkBox_SelfDamage;
private System.Windows.Forms.CheckBox checkBox_SelfPlayerDamage;
private System.Windows.Forms.CheckBox checkBox_ReduceAegis;
private System.Windows.Forms.Label labelFilterinig;
private System.Windows.Forms.CheckBox checkBox_Filter;
private System.Windows.Forms.Label labelFilteringName;
private System.Windows.Forms.TextBox textBox_FilterName;
private System.Windows.Forms.Button button_AddCharacter;
private System.Windows.Forms.Button button_DeleteCharacter;
private System.Windows.Forms.CheckBox checkBox_filterExclude;
private System.Windows.Forms.CheckBox checkBox_filterScript;
private System.Windows.Forms.Label labelChatExport;
private System.Windows.Forms.CheckedListBox checkedListBox_ExportFields;
private System.Windows.Forms.Label labelFilterChars;
private System.Windows.Forms.CheckedListBox checkedListBox_Filters;
#endregion
public SecretParse()
{
InitializeComponent();
}
private const string ALL = "All";
private const string OUT_DAMAGE = "Attack (Out)";
private const string OUT_HEAL = "Healed (Out)";
private const string ALL_OUTGOING = "All Outgoing (Ref)";
private const string INC_DAMAGE = "Incoming Damage";
private const int CHAT_LIMIT = 2400;
private Label lblStatus;
private TreeNode optionsNode = null;
private string settingsFile = Path.Combine(ActGlobals.oFormActMain.AppDataFolder.FullName, "Secret.config.xml");
private SettingsSerializer xmlSettings;
private HashSet<string> filterNames = new HashSet<string>();
private int healCount = 0;
private int dpsCount = 0;
private static int runClientReadThread = 1;
private object locker = new object();
private object addonEnabledLocker = new object();
private bool addonEnabled;
private string charName = "";
private string combatEnding = null;
private DateTime lastCombatStart = DateTime.MinValue;
private DateTime lastCombatEnd = DateTime.MinValue;
private DateTime lastEvadeTime = DateTime.MinValue;
private Dictionary<string, BuffData> buffData = new Dictionary<string, BuffData>();
private HashSet<string> allies = new HashSet<string>();
private Dictionary<string, int> exportFieldMap = new Dictionary<string, int>();
private string previousLine = "";
private static Regex timeStamp = new Regex(@"^(\[[0-9]{2}:[0-9]{2}:[0-9]{2}\]\s*)+", RegexOptions.Compiled);
private static Regex fontHtml = new Regex(@"</?font[^>]*>", RegexOptions.Compiled);
private static string BUFFS = "BUFFS";
private static string HTML_HEADER = @"<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Strict//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"">
<html xmlns=""http://www.w3.org/1999/xhtml"" lang=""en-US"">
<head>
<meta charset=""utf-8"">
<script type=""text/javascript"" src=""https://ajax.googleapis.com/ajax/libs/jquery/1.10.0/jquery.min.js""></script>
<script>
$(document).ready(function() {
$(""#content div"").hide();
$(""#tabs li:first"").attr(""id"",""current"");
$(""#content div:first"").fadeIn();
$('#tabs a').click(function(e) {
e.preventDefault();
$(""#content div"").hide();
$(""#tabs li"").attr(""id"","""");
$(this).parent().attr(""id"",""current"");
$('#' + $(this).attr('title')).fadeIn();
});
});
function toggle(obj) {
var tr = document.getElementsByTagName(""tr"");
for (i=0;i<tr.length;i++) {
if (tr[i].className == obj) {
tr[i].style.display = (tr[i].style.display!='none' ? 'none' : '');
}
}
}
</script>
<style>
::-webkit-scrollbar {
width: 6px;
}
::-webkit-scrollbar-track {
border-radius: 6px;
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0);
}
::-webkit-scrollbar-thumb {
border-radius: 6px;
background: rgba(34,123,212,.7);
-webkit-box-shadow: inset 0 0 6px rgba(255,255,255,.3);
}
html {
overflow-y: scroll;
}
body {
font: 76%/160% ""Trebuchet MS"", sans-serif;
margin: 8px;
}
h1 {
margin: 0;
padding: 0 15px 0 0;
font:bold 22px/22px ""Trebuchet MS"", sans-serif;
color:#f72c17;
text-align:right;
}
#tabs {
overflow: auto;
width: 100%;
list-style: none;
margin: 0;
padding: 0;
}
#tabs li {
margin: 0;
padding: 0;
float: left;
}
#tabs li.title {
margin: -5px 0 0 0;
padding: 0 15px 0 0;
float: right;
font:bold 16px/35px ""Trebuchet MS"", sans-serif;
color:#fb8b13;
}
#tabs a {
background: #d0e5f5;
background: -webkit-linear-gradient(226deg, transparent 10px, #d0e5f5 10px);
background: -moz-linear-gradient(226deg, transparent 10px, #d0e5f5 10px);
background: -ms-linear-gradient(226deg, transparent 10px, #d0e5f5 10px);
background: -o-linear-gradient(226deg, transparent 10px, #d0e5f5 10px);
background: linear-gradient(226deg, transparent 10px, #d0e5f5 10px);
-webkit-box-shadow: -4px 0 0 rgba(0, 0, 0, .2);
-moz-box-shadow: -4px 0 0 rgba(0, 0, 0, .2);
box-shadow: -4px 0 0 rgba(0, 0, 0, .2);
font: bold 13px/35px 'Lucida sans', Arial, Helvetica;
color: #1d5987;
text-decoration: none;
float: left;
height: 35px;
padding: 0 30px;
}
#tabs a:hover {
background: #4e92d9;
background: -webkit-linear-gradient(226deg, transparent 10px, #4e92d9 10px);
background: -moz-linear-gradient(226deg, transparent 10px, #4e92d9 10px);
background: -ms-linear-gradient(226deg, transparent 10px, #4e92d9 10px);
background: -o-linear-gradient(226deg, transparent 10px, #4e92d9 10px);
background: linear-gradient(226deg, transparent 10px, #4e92d9 10px);
color: #fff;
}
#tabs a:focus {
outline: 0;
}
#tabs #current a {
background: #f6faff;
background: -webkit-linear-gradient(226deg, transparent 10px, #f6faff 10px);
background: -moz-linear-gradient(226deg, transparent 10px, #f6faff 10px);
background: -ms-linear-gradient(226deg, transparent 10px, #f6faff 10px);
background: -o-linear-gradient(226deg, transparent 10px, #f6faff 10px);
background: linear-gradient(226deg, transparent 10px, #f6faff 10px);
color: #d54e0b;
}
#content {
background-color: #f6faff;
background-image: -webkit-gradient(linear, left top, left bottom, from(#f6faff), to(#bedbff));
background-image: -webkit-linear-gradient(top, #f6faff, #bedbff);
background-image: -moz-linear-gradient(top, #f6faff, #bedbff);
background-image: -ms-linear-gradient(top, #f6faff, #bedbff);
background-image: -o-linear-gradient(top, #f6faff, #bedbff);
background-image: linear-gradient(top, #f6faff, #bedbff);
-webkit-border-radius: 0 6px 6px 6px;
-moz-border-radius: 0 6px 6px 6px;
border-radius: 0 6px 6px 6px;
padding: 6px;
}
#content table {
width:100%;
border-collapse:collapse;
}
#content th {
background:#e2f0fd;
border: 1px solid #dae8f5;
text-align:center;
font:bold 13px/16px ""Trebuchet MS"", sans-serif;
color:#0a2e74;
height:40px;
}
#content td {
border:1px solid #dae8f5;
text-align:right;
color:#678197;
padding:0 5px;
}
#content tfoot td {
background:#e2f0fd;
border: 1px solid #dae8f5;
text-align:center;
font:italic 12px/22px ""Trebuchet MS"", sans-serif;
color:#636363;
}
#content th.heal, #content td.heal {
border-left:5px solid #dae8f5;
}
#content td.col1 {
text-align:left;
padding:3px 5px;
}
#content td strong {
font:bold 13px/28px ""Trebuchet MS"", sans-serif;
color:#2937FF;
}
#content td b {
font-weight:normal;
color:#434DDE;
padding:0 10px;
}
#content tr.even, tr.buffeven {
background:#f0f7fe;
}
#content tr.odd, tr.buffodd {
background:#f7fbff;
}
#content tr.even:hover, #content tr.odd:hover {
background:#FCFFB0;
cursor:pointer;
}
#content tr.buffeven:hover, #content tr.buffodd:hover {
background:#FCFFB0;
}
";
private static string HTML_TITLE = @"
</style>
</head>
<body>
<h1>{0}</h1>
<ul id=""tabs"">
<li><a href="""" title=""tab1"">Group Damage</a></li>
<li><a href="""" title=""tab2"">My Buffs</a></li>
<li><a href="""" title=""tab3"">Big Numbers</a></li>
<li class=""title"">total: {3} dmg, {1} dps in {2}</li>
</ul>";
private static string HTML_TABLE_DAMAGE = @"
<div id=""content"">
<div id=""tab1"">
<table>
<thead>
<tr>
<th>Name - (combat time)</th>
<th width=""8%"">Damage</th>
<th width=""6%"">DPS</th>
<th width=""6%"">Pen</th>
<th width=""6%"">Crit</th>
<th width=""6%"">Glnc</th>
<th width=""6%"">Block</th>
<th width=""6%"">Evade</th>
<th width=""3%"">Aegis damage</th>
<th width=""3%"">Aegis DPS</th>
<th width=""3%"">Aegis mismatch</th>
<th width=""8%"" class=""heal"">Heal</th>
<th width=""6%"">HPS</th>
<th width=""6%"">HCrit</th>
<th width=""3%"">Aegis heal</th>
<th width=""3%"">Aegis HPS</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan=""16"">Click on a row to show the detailed skill breakdown</td>
</tr>
</tfoot>
<tbody>
";
private static string HTML_TABLE_BUFFS = @"
</tbody>
</table>
</div>
<div id=""tab2"">
<table>
<thead>
<tr>
<th>Name</th>
<th width=""18%"">Duration</th>
<th width=""18%"">Percent</th>
</tr>
</thead>
<tbody>
";
private static string HTML_TABLE_MAX = @"
</tbody>
</table>
</div>
<div id=""tab3"">
<table>
<thead>
<tr>
<th>Name</th>
<th width=""25%"">Max Hit</th>
<th width=""25%"">Max Heal</th>
<th width=""25%"">Max Incoming</th>
</tr>
</thead>
<tbody>
";
private static string HTML_CLOSE = @"
</tbody>
</table>
</div>
</div>
</body>
</html>";
public void InitPlugin(TabPage pluginScreenSpace, Label pluginStatusText)
{
lblStatus = pluginStatusText;
// Push the option screen into the option tab
int dcIndex = -1;
for (int i = 0; i < ActGlobals.oFormActMain.OptionsTreeView.Nodes.Count; i++)
{
if (ActGlobals.oFormActMain.OptionsTreeView.Nodes[i].Text == "Secret Parsing")
dcIndex = i;
}
if (dcIndex != -1)
{
optionsNode = ActGlobals.oFormActMain.OptionsTreeView.Nodes[dcIndex].Nodes.Add("General");
ActGlobals.oFormActMain.OptionsControlSets.Add(@"Secret Parsing\General", new List<Control> { this });
Label lblConfig = new Label();
lblConfig.AutoSize = true;
lblConfig.Text = "Find the applicable options in the Options tab, Secret Parsing section.";
pluginScreenSpace.Controls.Add(lblConfig);
}
else
{
ActGlobals.oFormActMain.OptionsTreeView.Nodes.Add("Secret Parsing");
dcIndex = ActGlobals.oFormActMain.OptionsTreeView.Nodes.Count - 1;
optionsNode = ActGlobals.oFormActMain.OptionsTreeView.Nodes[dcIndex].Nodes.Add("General");
ActGlobals.oFormActMain.OptionsControlSets.Add(@"Secret Parsing\General", new List<Control> { this });
Label lblConfig = new Label();
lblConfig.AutoSize = true;
lblConfig.Text = "Find the applicable options in the Options tab, Secret Parsing section.";
pluginScreenSpace.Controls.Add(lblConfig);
}
ActGlobals.oFormActMain.OptionsTreeView.Nodes[dcIndex].Expand();
ActGlobals.oFormActMain.SetOptionsHelpText("testing");
// Add the export item to the treeview menu
var exportButton = new ToolStripMenuItem();
exportButton.Name = "ACT_export_button";
exportButton.Text = "Export to TSW chat script";
exportButton.Click += new System.EventHandler(ExportEncounterToScript);
int sepIndx = 0;
for (sepIndx = 0; sepIndx < ActGlobals.oFormActMain.MainTreeView.ContextMenuStrip.Items.Count; ++sepIndx)
{
if (ActGlobals.oFormActMain.MainTreeView.ContextMenuStrip.Items[sepIndx] is ToolStripSeparator)
{
break;
}
}
ActGlobals.oFormActMain.MainTreeView.ContextMenuStrip.Items.Insert(sepIndx, exportButton);
ActGlobals.oFormActMain.MainTreeView.ContextMenuStrip.Opening += new CancelEventHandler((a, b) =>
{
exportButton.Enabled = IsEncounterSelected();
});
xmlSettings = new SettingsSerializer(this);
string FileName = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\Secret\\recents.cfg";
FileInfo RecFile = new FileInfo(FileName);
SetExportFieldDefaults();
LoadSettings();
SetExportFieldStatus();
checkBox_EnableTSWAddon_CheckedChanged(null, null);
SetupSecretEnglishEnvironment();
//ActGlobals.oFormActMain.SetParserToNull(); // Set the input log file language to (None)
ActGlobals.oFormActMain.LogPathHasCharName = false;
ActGlobals.oFormActMain.LogFileFilter = "CombatLog*.txt";
ActGlobals.oFormActMain.ResetCheckLogs();
ActGlobals.oFormActMain.TimeStampLen = 8; // Size of timestamp section in the logfile
ActGlobals.oFormActMain.GetDateTimeFromLog = new FormActMain.DateTimeLogParser(ParseDateTime); // Replace internal Eq2 date parser
ActGlobals.oFormActMain.BeforeLogLineRead += new LogLineEventDelegate(oFormActMain_BeforeLogLineRead); // Interupt the EQ2 parse, and replace it with Secret.
ActGlobals.oFormActMain.OnCombatEnd += new CombatToggleEventDelegate(oFormActMain_OnCombatEnd);
ActGlobals.oFormActMain.OnCombatStart += new CombatToggleEventDelegate(oFormActMain_OnCombatStart);
// Setup up update checks
ActGlobals.oFormActMain.UpdateCheckClicked += new FormActMain.NullDelegate(SecretCheckUpdate);
if (ActGlobals.oFormActMain.GetAutomaticUpdatesAllowed() == true)
{
new Thread(new ThreadStart(SecretCheckUpdate)).Start();
}
FixDBConfFile();
Task.Factory.StartNew(() => { CheckTSWACTEnabled(this); });
if ((lblStatus.Text != "Secret plugin unloaded") && (lblStatus.Text != "No Status"))
{
lblStatus.Text = lblStatus.Text + "\nSecret plugin loaded";
}
else
{
lblStatus.Text = "Secret plugin loaded";
}
}
private bool IsExportFieldSet(string name)
{
string lowName = name.ToLower();
if (exportFieldMap.ContainsKey(lowName))
{
return checkedListBox_ExportFields.GetItemChecked(exportFieldMap[lowName]);
}
return false;
}
private void SetExportFieldDefaults()
{
checkedListBox_ExportFields.SetItemChecked(0, true); // DPS
checkedListBox_ExportFields.SetItemChecked(1, true); // Crit%
checkedListBox_ExportFields.SetItemChecked(2, true); // Pen%
checkedListBox_ExportFields.SetItemChecked(3, true); // Glance%
checkedListBox_ExportFields.SetItemChecked(4, false); // Block%
checkedListBox_ExportFields.SetItemChecked(5, true); // HPS
checkedListBox_ExportFields.SetItemChecked(6, true); // HealCrit%
checkedListBox_ExportFields.SetItemChecked(7, true); // Evade%
checkedListBox_ExportFields.SetItemChecked(8, false); // AegisMismatch%
checkedListBox_ExportFields.SetItemChecked(9, true); // TakenDamage
checkedListBox_ExportFields.SetItemChecked(10, true); // TakenCrit%
checkedListBox_ExportFields.SetItemChecked(11, true); // TakenPen%
checkedListBox_ExportFields.SetItemChecked(12, true); // TakenGlance%
checkedListBox_ExportFields.SetItemChecked(13, true); // TakenBlock%
checkedListBox_ExportFields.SetItemChecked(14, true); // TakenEvade%
exportFieldMap.Add("dps", 0);
exportFieldMap.Add("crit%", 1);
exportFieldMap.Add("pen%", 2);
exportFieldMap.Add("glance%", 3);
exportFieldMap.Add("block%", 4);
exportFieldMap.Add("hps", 5);
exportFieldMap.Add("healcrit%", 6);
exportFieldMap.Add("evade%", 7);
exportFieldMap.Add("aegismismatch%", 8);
exportFieldMap.Add("takendamage", 9);
exportFieldMap.Add("takencrit%", 10);
exportFieldMap.Add("takenpen%", 11);
exportFieldMap.Add("takenglance%", 12);