forked from skennedysocal/WoW_Hardcore
-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathMainMenu.lua
More file actions
2269 lines (1994 loc) · 83.1 KB
/
MainMenu.lua
File metadata and controls
2269 lines (1994 loc) · 83.1 KB
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
local _menu_width = 900
local _inner_menu_width = 800
local _menu_height = 600
local AceGUI = LibStub("AceGUI-3.0")
hardcore_modern_menu = nil
hardcore_modern_menu_state = {}
hardcore_modern_menu_state.guild_online = {}
hardcore_modern_menu_state.guild_versions = {}
hardcore_modern_menu_state.guild_versions_status = {}
hardcore_modern_menu_state.online_pulsing = {}
hardcore_modern_menu_state.levels_sort_state = "date"
hardcore_modern_menu_state.accountability_sort_state = "v"
hardcore_modern_menu_state.levels_page = 1
hardcore_modern_menu_state.total_levels = 1
hardcore_modern_menu_state.levels_max_page = 1
hardcore_modern_menu_state.changeset = {}
hardcore_modern_menu_state.entry_tbl = {}
local function RequestHCData(target_name)
if
other_hardcore_character_cache[target_name] == nil
or time() - other_hardcore_character_cache[target_name].last_received > 30
then
Hardcore:RequestCharacterData(target_name)
end
end
local date_to_num = {
["Jan"] = 1,
["Feb"] = 2,
["Mar"] = 3,
["Apr"] = 4,
["May"] = 5,
["Jun"] = 6,
["Jul"] = 7,
["Aug"] = 8,
["Sep"] = 9,
["Oct"] = 10,
["Nov"] = 11,
["Dec"] = 12,
}
local function convertToStamp(date_str)
local pattern = "(%d+) (%d+):(%d+):(%d+) (%d+)"
local pattern2 = " (%a+)"
local runday, runhour, runminute, runseconds, runyear = date_str:match(pattern)
local runmonth = date_str:match(pattern2)
return time({
year = runyear,
month = date_to_num[runmonth],
day = runday,
hour = runhour,
min = runminute,
sec = runseconds,
})
end
local sort_functions = {
["Alph"] = function(t, a, b)
return a < b
end,
["rAlph"] = function(t, a, b)
return b < a
end,
["lvl"] = function(t, a, b)
return t[a]["level"] > t[b]["level"]
end,
["rlvl"] = function(t, a, b)
return t[b]["level"] > t[a]["level"]
end,
["v"] = function(t, a, b)
return (hardcore_modern_menu_state.guild_versions[a] or "0")
< (hardcore_modern_menu_state.guild_versions[b] or "0")
end,
["rv"] = function(t, a, b)
return (hardcore_modern_menu_state.guild_versions[a] or "0")
> (hardcore_modern_menu_state.guild_versions[b] or "0")
end,
["date"] = function(t, a, b)
local t1 = convertToStamp(t[a]["localtime"])
local t2 = convertToStamp(t[b]["localtime"])
return t1 > t2
end,
["rdate"] = function(t, a, b)
local t1 = convertToStamp(t[a]["localtime"])
local t2 = convertToStamp(t[b]["localtime"])
return t1 < t2
end,
["simpledate"] = function(t, a, b)
local player_name_short = string.split("-", a)
local t1 = ""
if other_hardcore_character_cache[player_name_short] == nil then
t1 = ""
else
t1 = other_hardcore_character_cache[player_name_short].first_recorded or ""
end
local t2 = ""
player_name_short = string.split("-", b)
if other_hardcore_character_cache[player_name_short] == nil then
t2 = ""
else
t2 = other_hardcore_character_cache[player_name_short].first_recorded or ""
end
return t1 > t2
end,
["rsimpledate"] = function(t, a, b)
local player_name_short = string.split("-", a)
local t1 = ""
if other_hardcore_character_cache[player_name_short] == nil then
t1 = ""
else
t1 = other_hardcore_character_cache[player_name_short].first_recorded or ""
end
local t2 = ""
player_name_short = string.split("-", b)
if other_hardcore_character_cache[player_name_short] == nil then
t2 = ""
else
t2 = other_hardcore_character_cache[player_name_short].first_recorded or ""
end
return t1 < t2
end,
["pt"] = function(t, a, b)
return t[b]["playedtime"] > t[a]["playedtime"]
end,
["rpt"] = function(t, a, b)
return t[b]["playedtime"] < t[a]["playedtime"]
end,
["achievements"] = function(t, a, b)
local player_name_short = string.split("-", a)
local t1 = 0
if other_hardcore_character_cache[player_name_short] == nil then
t1 = 0
else
t1 = #other_hardcore_character_cache[player_name_short].achievements or 0
end
local t2 = 0
player_name_short = string.split("-", b)
if other_hardcore_character_cache[player_name_short] == nil then
t2 = 0
else
t2 = #other_hardcore_character_cache[player_name_short].achievements or 0
end
return t1 > t2
end,
["rachievements"] = function(t, a, b)
local player_name_short = string.split("-", a)
local t1 = 0
if other_hardcore_character_cache[player_name_short] == nil then
t1 = 0
else
t1 = #other_hardcore_character_cache[player_name_short].achievements or 0
end
local t2 = 0
player_name_short = string.split("-", b)
if other_hardcore_character_cache[player_name_short] == nil then
t2 = 0
else
t2 = #other_hardcore_character_cache[player_name_short].achievements or 0
end
return t1 < t2
end,
["mode"] = function(t, a, b)
local player_name_short = string.split("-", a)
local t1 = "None"
if other_hardcore_character_cache[player_name_short] == nil then
t1 = "None"
else
t1 = other_hardcore_character_cache[player_name_short].party_mode or "None"
end
local t2 = "None"
player_name_short = string.split("-", b)
if other_hardcore_character_cache[player_name_short] == nil then
t2 = "None"
else
t2 = other_hardcore_character_cache[player_name_short].party_mode or "None"
end
return t1 > t2
end,
["rmode"] = function(t, a, b)
local player_name_short = string.split("-", a)
local t1 = "None"
if other_hardcore_character_cache[player_name_short] == nil then
t1 = "None"
else
t1 = other_hardcore_character_cache[player_name_short].party_mode or "None"
end
local t2 = "None"
player_name_short = string.split("-", b)
if other_hardcore_character_cache[player_name_short] == nil then
t2 = "None"
else
t2 = other_hardcore_character_cache[player_name_short].party_mode or "None"
end
return t1 < t2
end,
["hctag"] = function(t, a, b)
local player_name_short = string.split("-", a)
local t1 = "None"
if other_hardcore_character_cache[player_name_short] == nil then
t1 = "None"
else
t1 = other_hardcore_character_cache[player_name_short].hardcore_player_name or "None"
end
local t2 = "None"
player_name_short = string.split("-", b)
if other_hardcore_character_cache[player_name_short] == nil then
t2 = "None"
else
t2 = other_hardcore_character_cache[player_name_short].hardcore_player_name or "None"
end
return t1 > t2
end,
["rhctag"] = function(t, a, b)
local player_name_short = string.split("-", a)
local t1 = "None"
if other_hardcore_character_cache[player_name_short] == nil then
t1 = "None"
else
t1 = other_hardcore_character_cache[player_name_short].hardcore_player_name or "None"
end
local t2 = "None"
player_name_short = string.split("-", b)
if other_hardcore_character_cache[player_name_short] == nil then
t2 = "None"
else
t2 = other_hardcore_character_cache[player_name_short].hardcore_player_name or "None"
end
return t1 < t2
end,
}
-- sort function from stack overflow
local function spairs(t, order)
local keys = {}
for k in pairs(t) do
keys[#keys + 1] = k
end
if order then
table.sort(keys, function(a, b)
return order(t, a, b)
end)
else
table.sort(keys)
end
local i = 0
return function()
i = i + 1
if keys[i] then
return keys[i], t[keys[i]]
end
end
end
local function CreateHeadingLabel(title, frame)
local label = AceGUI:Create("Label")
label:SetWidth(500)
label:SetText("\n" .. title)
label:SetFont("Fonts\\FRIZQT__.TTF", 16, "")
frame:AddChild(label)
end
local function CreateDescriptionLabel(text, frame)
local label = AceGUI:Create("Label")
label:SetWidth(900)
label:SetText(text)
label:SetFont("Fonts\\FRIZQT__.TTF", 12, "")
frame:AddChild(label)
end
local function DrawGeneralTab(container)
local scroll_container = AceGUI:Create("SimpleGroup")
scroll_container:SetFullWidth(true)
scroll_container:SetFullHeight(true)
scroll_container:SetLayout("Fill")
tabcontainer:AddChild(scroll_container)
local scroll_frame = AceGUI:Create("ScrollFrame")
scroll_frame:SetLayout("Flow")
scroll_container:AddChild(scroll_frame)
local first_menu_description_title = AceGUI:Create("Label")
first_menu_description_title:SetWidth(500)
first_menu_description_title:SetText("Welcome to Classic hardcore!")
first_menu_description_title:SetFont("Interface\\Addons\\Hardcore\\Media\\BreatheFire.ttf", 20, "")
-- first_menu_description_title:SetPoint("TOP", 2,5)
scroll_frame:AddChild(first_menu_description_title)
local first_menu_description = AceGUI:Create("Label")
first_menu_description:SetWidth(_menu_width)
first_menu_description:SetText(
"\n\n Check out the following tabs\n" ..
"\n\n |c00FFFF00Rules|r: Compiled list of hardcore challenge rules" ..
"\n\n |c00FFFF00Verify|r: Generate a verification string to confirm your max level character" ..
"\n\n |c00FFFF00Death Knight|r: Read about Death Knight rules and/or sacrifice/activate" ..
"\n\n |c00FFFF00Levels|r: See a list of your recorded character levels" ..
"\n\n |c00FFFF00Dungeons|r: See information about your recorded Dungeon runs" ..
"\n\n |c00FFFF00Accountability|r: See who is playing in your Hardcore guild and what addon versions they are using" ..
"\n\n |c00FFFF00Achievements|r: Check out all available achievements to try" ..
"\n\n |c00FFFF00Death stats|r: See death statistics (of players using this addon).\n\n"
)
first_menu_description:SetFont("Fonts\\FRIZQT__.TTF", 12, "")
-- first_menu_description:SetPoint("TOP", 2,5)
scroll_frame:AddChild(first_menu_description)
local changelog_title = AceGUI:Create("Label")
changelog_title:SetWidth(500)
changelog_title:SetText("\n\nChangelog")
changelog_title:SetFont("Interface\\Addons\\Hardcore\\Media\\BreatheFire.ttf", 20, "")
scroll_frame:AddChild(changelog_title)
CreateHeadingLabel("11.57b", scroll_frame)
CreateDescriptionLabel(
"- Fixed Lua error related to missing Monk class color.\n- Added checks to prevent errors when extra rules are not defined.\n- Enabled tracked time to update correctly on the character screen.",
scroll_frame
)
CreateHeadingLabel("11.56", scroll_frame)
CreateDescriptionLabel(
"- Removed GreenWall entirely",
scroll_frame
)
CreateHeadingLabel("11.56", scroll_frame)
CreateDescriptionLabel(
"- Removed GreenWall entirely",
scroll_frame
)
CreateHeadingLabel("11.55", scroll_frame)
CreateDescriptionLabel(
"- Fix opening main HC window after Blizzard API changes\n- Update GreenWall library to latest version\n- Update Ace3 libraries to latest versions",
scroll_frame
)
CreateHeadingLabel("11.54", scroll_frame)
CreateDescriptionLabel(
"- Dungeon tracker updates for Cataclysm\n- Achievement fixes for Cataclysm",
scroll_frame
)
CreateHeadingLabel("11.53", scroll_frame)
CreateDescriptionLabel(
"- Level toast and dungeon database patches for Cataclysm",
scroll_frame
)
CreateHeadingLabel("11.52", scroll_frame)
CreateDescriptionLabel(
"- User interface fixes for Cataclysm",
scroll_frame
)
CreateHeadingLabel("11.51", scroll_frame)
CreateDescriptionLabel(
"- Miscellaneous patches for Cataclysm",
scroll_frame
)
CreateHeadingLabel("11.50", scroll_frame)
CreateDescriptionLabel(
"- Emergency patch for Cataclysm",
scroll_frame
)
CreateHeadingLabel("11.49", scroll_frame)
CreateDescriptionLabel(
"- Added handling of Fury of Frostmourne spell (WoTLK)",
scroll_frame
)
CreateHeadingLabel("11.48", scroll_frame)
CreateDescriptionLabel(
"- Fixed problem with Achievements tab when used with ElvUI",
scroll_frame
)
CreateHeadingLabel("11.47", scroll_frame)
CreateDescriptionLabel(
"- Support for SoD (access to string prior to level 60)",
scroll_frame
)
CreateHeadingLabel("11.46", scroll_frame)
CreateDescriptionLabel(
"- Heirloom detection for Wrath version",
scroll_frame
)
CreateHeadingLabel("11.45", scroll_frame)
CreateDescriptionLabel(
"- Fixed Grounded achievement",
scroll_frame
)
CreateHeadingLabel("11.44", scroll_frame)
CreateDescriptionLabel(
"- Fixed bug for death message in dungeons\n- Added Gold Tracker\n- Added Parkour achievement",
scroll_frame
)
CreateHeadingLabel("11.43", scroll_frame)
CreateDescriptionLabel(
"- Added appeal utilities\n- Bug fixes for WotLK, achievement animation\n- Corrected grounded achievement forcing naturalist for druids\n- Fix grammer in verification screen; Uses undead instead of scourge\n- Better description for minimum alert level\n- Added 60 announcement toast",
scroll_frame
)
CreateHeadingLabel("11.40", scroll_frame)
CreateDescriptionLabel(
"- Asian client support for death alerts, death logs and levels\n- Dungeon tracker improvements\n- Achievement bugfixes\n- File handling upgrades\n- Reload reminder\n- Miscellaneous bug fixes",
scroll_frame
)
CreateHeadingLabel("11.31", scroll_frame)
CreateDescriptionLabel(
"- Dungeon tracker improvements\n- Inspect tab improvements\n- File handling upgrades",
scroll_frame
)
CreateHeadingLabel("11.22", scroll_frame)
CreateDescriptionLabel(
"- Added elemental balance achievement for mage. Complete the Hardcore challenge without at any point casting two elemental damage spells of the same element (fire or ice) in a row. Arcane spells that deal damage are not allowed to be cast.\n- Added Shadow and Flame achievement for warlock. Complete the Hardcore challenge without at any point casting two shadow or two flame spells in a row during combat.\n- Fixes for death log when greenwall only is enabled and for grief protection.\n- Improvements for dungeon tracker and new warning for entering dungeon when you shouldn't.\n- Added Death Statistics Page, which shows your statistics of deaths that you have witnessed via the death log.",
scroll_frame
)
CreateHeadingLabel("11.21", scroll_frame)
CreateDescriptionLabel(
"- Faction-wide death alerts now require the sender to be in a guild\n- Update to dungeon tracking\n- Make death alerts sending more robust; about half of all deaths were previously broadcasted\n- Added option to reset death log position in interface options\n- Fix bug where death log icon wouldn't get hidden when it was specified in interface options",
scroll_frame
)
CreateHeadingLabel("11.20", scroll_frame)
CreateDescriptionLabel(
"- Add class colors to faction-wide death alerts\n- Added minimize function to death log\n- Fix bug where death marker stays on map after viewing death location from death log\n- Updated messages regarding dataloss and mod pinging\n- Dungeon tracker; re-introduced dungeon kills per mod id\n- Added diagnostic information to verify tab\n- Record death log entries for statistics (capped at 100 for now)\n- Bug fixes related to travelling between continents with death log frame\n- Block failing starting achievements when max level",
scroll_frame
)
CreateHeadingLabel("11.19", scroll_frame)
CreateDescriptionLabel(
"- Fixed minimum level alerts for faction-wide death alerts\n- Fixed issue where death alerts channel always takes the first channel spot\n- Fixed conflict with other addons where system messages wouldn't show up\n- Players can now see death locations by right clicking on death log entry and choosing the see death location item\n- Level filtering in LFG GW mode fixed",
scroll_frame
)
CreateHeadingLabel("11.18", scroll_frame)
CreateDescriptionLabel(
"- Enabled greenwall! Greenwall is back with limited support. Death alerts, last words, and level up announcements shared via\n greenwall have been disabled. Death alerts and last words will be configurable via the death log. Level up announcements will \nuse a similar interface. \n- Death log added. Death log keeps track of deaths that occur faction wide. You can now enable death alerts faction wide (see\n interface options). Via the interface options you can also disable the death log frame. You can open up interface options by \nright clicking the logo on the death log. \n- Dungeon tracker improvements",
scroll_frame
)
CreateHeadingLabel("11.16", scroll_frame)
CreateDescriptionLabel("- Disable greenwall\n", scroll_frame)
---
CreateHeadingLabel("11.15", scroll_frame)
CreateDescriptionLabel(
"- Dungeon tracker improvements\n"
.. "- HC Defense fix; resurrecting no longer causes alert\n"
.. "- LF mode fixes; no longer crashes for lower version players.\n"
.. "- Disable automatic recovery methods\n"
.. "- Removed summon mounts from failing Imp Master\n",
scroll_frame
)
---
CreateHeadingLabel("11.14", scroll_frame)
CreateDescriptionLabel("- Fix minor crash on quest turn in\n", scroll_frame)
---
CreateHeadingLabel("11.13", scroll_frame)
CreateDescriptionLabel(
"- Fix guild chat crash in WotLK\n"
.. "- Ammend Griefer list\n"
.. "- LF mode in greenwall\n"
.. "- Added officer tools\n"
.. "- No longer generate verification strings under max level\n"
.. "- Added HC announcements\n"
.. "- Added reminder to fill in HC tag\n"
.. "- Added remove achievement command\n"
.. "- Automatic DC recovery\n"
.. "- Automatic server/name change recovery\n"
.. "- Fixed Kill the Betrayer achievement\n"
.. "- Fixed achievements from not showing up in accountability tab\n",
scroll_frame
)
---
CreateHeadingLabel("11.12", scroll_frame)
CreateDescriptionLabel(
"- Improved anti-grief security\n"
.. "- Updated Hardcore Contract\n"
.. "- Dungeon Tracker localization\n"
.. "- Fixed 'out of date' problem\n"
.. "- Improved in-guild muting\n"
.. "- Option to block death messages from levels/guilds\n"
.. "- Fix Thunderstruck achievement\n"
.. "- Fix Against Lord Shalzaru achievement\n",
scroll_frame
)
CreateHeadingLabel("11.10", scroll_frame)
CreateDescriptionLabel(
"- Various wording changes\n- Added more quests to pvp flag warning\n- Added banned guilds in greenwall\n- Fix to <MOD>\n- Felfire skull fix\n- Dungeon tracker improvements",
scroll_frame
)
---
CreateHeadingLabel("11.9", scroll_frame)
CreateDescriptionLabel("- Added `Hardcore contract` to intro splash", scroll_frame)
---
CreateHeadingLabel("11.8", scroll_frame)
CreateDescriptionLabel(
"- Small trio fix where countdown would immediately fail\n- Fixed minor crash for achievements\n- Fixed earthen arise, Goggeroc kills not registering\n- Player pronouns added\n- auto appeal griefing for under 40 characters.\n- Fixed bug where 60 characters can get achievements intended for non-60s",
scroll_frame
)
---
CreateHeadingLabel("11.7", scroll_frame)
CreateDescriptionLabel(
"- Fixed Deep in the Ban'ethil Barrow Den from missing Rageclaw kill\n- Fixed kill target for Death to Goggeroc\n- Made profession achievements more reliable and check on reload\n- Fixed minor crash on forced achievement selection\n- Removed checks for duo/trios when 60+",
scroll_frame
)
---
CreateHeadingLabel("11.6", scroll_frame)
CreateDescriptionLabel("- Better WoTLK patch compatibility (Overhauled AceGUI)", scroll_frame)
---
CreateHeadingLabel("11.5", scroll_frame)
CreateDescriptionLabel("-WoTLK patch compatibility", scroll_frame)
---
CreateHeadingLabel("11.4", scroll_frame)
CreateDescriptionLabel(
"- Fixed stinkys escape for Alliance\n- Fixed the crown of will showing for horde\n- Fixed Kromgrul from not showing up in achievement list\n- Added new achievement `Serum to the Forsaken`.",
scroll_frame
)
---
CreateHeadingLabel("11.3", scroll_frame)
CreateDescriptionLabel(
"- Fixed burning shadow specific bug\n- Tuned achievement animation\n- Dungeon tracking fixes",
scroll_frame
)
---
CreateHeadingLabel("11.2", scroll_frame)
CreateDescriptionLabel(
"- Made a variety of new achievements more robust\n- duo/trio will no longer fail at lvl 1\n- <MOD> tag no longer applied to say\n- Added legacy support for duo/trio trades",
scroll_frame
)
---
CreateHeadingLabel("11.1", scroll_frame)
CreateDescriptionLabel(
"- Fixed bug with Stadics' challenge\n- Added Achievement Animation (see interface addons menu to test with `show`\n- Fixed bug with PartnerUp! which failed when players had class achievements\n- Dungeon tracking additions; removed infractions for lvl 60's, added appeals\n- Fixed some spelling and grammar for new achievements\n- Fixed bug where quests which have a level requirement would not award achievement if turning in quest leveled up the character.",
scroll_frame
)
---
CreateHeadingLabel("11.0", scroll_frame)
CreateDescriptionLabel(
"- Added a dungeon tab for tracking dungeon stats and completion.\n- Changes to actively prevent illegal trades (addon will block trades from non-trade partners unless you are lvl 60).\n- Increased rep. requirement for Stadic's to 45,000\n- Added 50+ new achievements. New achievements do not need to be selected at level 1. See the Achievements tab for more information.\n- Added Duo/Trio appeal codes",
scroll_frame
)
---
end
local function DrawRulesTab(container)
local function DrawRulesLabel(text, _scroll_frame)
local general_rules_label = AceGUI:Create("HardcoreClassTitleLabel")
general_rules_label:SetWidth(_inner_menu_width)
general_rules_label:SetHeight(60)
general_rules_label:SetText(text)
general_rules_label:SetFont("Interface\\Addons\\Hardcore\\Media\\BreatheFire.ttf", 20, "")
_scroll_frame:AddChild(general_rules_label)
end
local scroll_container = AceGUI:Create("SimpleGroup")
scroll_container:SetFullWidth(true)
scroll_container:SetFullHeight(true)
scroll_container:SetLayout("Fill")
tabcontainer:AddChild(scroll_container)
local scroll_frame = AceGUI:Create("ScrollFrame")
scroll_frame:SetLayout("Flow")
scroll_container:AddChild(scroll_frame)
DrawRulesLabel("General", scroll_frame)
local general_rules_description = AceGUI:Create("Label")
general_rules_description:SetWidth(_inner_menu_width)
general_rules_description:SetText(
"\nFor more info, rules, news, hall of legends, challenges, and more visit the classichc website. Help is available on discord (link on website)" ..
"\n\nAll professions allowed" ..
"\n\nNo restriction on talents" ..
"\n\nYou can use gear that you pickup or craft" ..
"\n\nNo Auction house, No mailbox, No trading" ..
"\n\nNo grouping in open world" ..
"\n\nNo battlegrounds allowed" ..
"\n\nBuffs from others are allowed, don't ask for others for buffs\n\n\n\n"
)
general_rules_description:SetFont("Fonts\\FRIZQT__.TTF", 12, "")
scroll_frame:AddChild(general_rules_description)
local function DrawDungeonLevels(scroll_Frame)
local function addEntry(_scroll_frame, _name, _era, _wotlk)
local entry = AceGUI:Create("SimpleGroup")
entry:SetLayout("Flow")
entry:SetFullWidth(true)
_scroll_frame:AddChild(entry)
local filler_label = AceGUI:Create("Label")
filler_label:SetWidth(200)
filler_label:SetText("")
filler_label:SetFont("Fonts\\FRIZQT__.TTF", 12, "")
entry:AddChild(filler_label)
local name_label = AceGUI:Create("Label")
name_label:SetWidth(175)
name_label:SetText(_name)
name_label:SetFont("Fonts\\FRIZQT__.TTF", 12, "")
entry:AddChild(name_label)
local level_label = AceGUI:Create("Label")
level_label:SetWidth(155)
level_label:SetText(_era)
level_label:SetFont("Fonts\\FRIZQT__.TTF", 12, "")
entry:AddChild(level_label)
local wotlk_level = AceGUI:Create("Label")
wotlk_level:SetWidth(100)
wotlk_level:SetText(_wotlk)
wotlk_level:SetFont("Fonts\\FRIZQT__.TTF", 12, "")
entry:AddChild(wotlk_level)
end
local row_header = AceGUI:Create("SimpleGroup")
row_header:SetLayout("Flow")
row_header:SetFullWidth(true)
scroll_frame:AddChild(row_header)
local filler_label = AceGUI:Create("Label")
filler_label:SetWidth(200)
filler_label:SetText("")
filler_label:SetFont("Fonts\\FRIZQT__.TTF", 12, "")
row_header:AddChild(filler_label)
local name_label = AceGUI:Create("Label")
name_label:SetWidth(150)
name_label:SetText("|c00FFFF00Dungeon Name|r")
name_label:SetFont("Fonts\\FRIZQT__.TTF", 12, "")
row_header:AddChild(name_label)
local level_label = AceGUI:Create("Label")
level_label:SetWidth(150)
level_label:SetText("|c00FFFF00Max Lvl (Era)|r")
level_label:SetFont("Fonts\\FRIZQT__.TTF", 12, "")
row_header:AddChild(level_label)
local max_level_label = AceGUI:Create("Label")
max_level_label:SetWidth(200)
if _G["HardcoreBuildLabel"] == "Cata" then
max_level_label:SetText("|c00FFFF00Max Lvl (Cata)|r")
else
max_level_label:SetText("|c00FFFF00Max Lvl (WotLK)|r")
end
max_level_label:SetFont("Fonts\\FRIZQT__.TTF", 12, "")
row_header:AddChild(max_level_label)
local max_level_table = DungeonTrackerGetAllDungeonMaxLevels()
for i, v in pairs(max_level_table) do
addEntry(scroll_frame, v[1], v[2], v[3])
end
addEntry(scroll_frame, "\n\n\n\n", "", "")
end
DrawRulesLabel("Dungeon Groups", scroll_frame)
local general_rules_description = AceGUI:Create("Label")
general_rules_description:SetWidth(_inner_menu_width)
general_rules_description:SetText(
"\nDungeon Groups are authorized but only ONE run of each Dungeon per character. Everyone in party must be following hardcore rules. Everyone must be in level range of the meeting stone. Group at the meeting stone to start the dungeon. You can invite people who are on the way. If you level up inside of the dungeon and exceed the meeting stone requirement you can stay. Warlocks are allowed to summon players to the meeting stone\n\n\n\n"
)
general_rules_description:SetFont("Fonts\\FRIZQT__.TTF", 12, "")
scroll_frame:AddChild(general_rules_description)
DrawDungeonLevels(scroll_frame)
DrawRulesLabel("Class and Item Specific", scroll_frame)
local general_rules_description = AceGUI:Create("Label")
general_rules_description:SetWidth(_inner_menu_width)
general_rules_description:SetText(
"\nWarlocks can’t resurrect via SS. Shamans can’t resurrect via Ankh. Paladins can’t Bubble Hearth. \n\nNo Light of Elune + Hearthstone\n\n\n\n"
)
general_rules_description:SetFont("Fonts\\FRIZQT__.TTF", 12, "")
scroll_frame:AddChild(general_rules_description)
DrawRulesLabel("Verification", scroll_frame)
local general_rules_description = AceGUI:Create("Label")
general_rules_description:SetWidth(_inner_menu_width)
general_rules_description:SetText(
"\nYou can verify your run using this addon (Get verified tab). Recording or streaming is also recommended to provide evidence for special circumstances such as disconnection deaths.\n\nAt MAX level you earn your IMMORTALITY and become a full fledged character with insane bragging rights.\n\n\n\n"
)
general_rules_description:SetFont("Fonts\\FRIZQT__.TTF", 12, "")
scroll_frame:AddChild(general_rules_description)
DrawRulesLabel("Duos/Trios", scroll_frame)
local general_rules_description = AceGUI:Create("Label")
general_rules_description:SetWidth(_inner_menu_width)
general_rules_description:SetText(
"\nYou must not leave the same zone as each other, unless you are a Druid going to Moonglade to complete essential class quests.\nYou must choose a combo that spawns in the same starting location.\nIf one of you dies, the other must fall on the sword and the run is over.\nYou can trade your duo partner found or crafted items, including gold.\nMultiboxing goes against the spirit of the Hardcore Challenge and is not allowed.\nIf playing in a duo or trio, have all members reload ui at level 1 and click the 'Party' tab to setup your run.\n\n\n\n"
)
general_rules_description:SetFont("Fonts\\FRIZQT__.TTF", 12, "")
scroll_frame:AddChild(general_rules_description)
end
local function DrawVerifyTab(container, _hardcore_character)
local ATTRIBUTE_SEPARATOR = "_"
local string_format_new = true
local first_menu_description
local function GenerateVerificationString()
local version = GetAddOnMetadata("Hardcore", "Version")
local _, class, _, race, _, name = GetPlayerInfoByGUID(UnitGUID("player"))
local realm = GetRealmName()
local level = UnitLevel("player")
local tradePartners = Hardcore_join(_hardcore_character.trade_partners, ",")
local converted_successfully = "FALSE"
if _hardcore_character.converted_successfully then
converted_successfully = "TRUE"
end
local game_version_checker = _hardcore_character.game_version or { _G["HardcoreBuildLabel"] }
local baseVerificationData = {
version,
_hardcore_character.guid,
realm,
race,
class,
name,
level,
_hardcore_character.time_played,
_hardcore_character.time_tracked,
#_hardcore_character.deaths,
tradePartners,
_hardcore_character.sacrificed_at,
converted_successfully,
game_version_checker,
}
local baseVerificationString =
Hardcore_join(Hardcore_map(baseVerificationData, Hardcore_stringOrNumberToUnicode), ATTRIBUTE_SEPARATOR)
local bubbleHearthIncidentsVerificationString =
Hardcore_tableToUnicode(_hardcore_character.bubble_hearth_incidents)
local playedtimeGapsVerificationString = Hardcore_tableToUnicode(_hardcore_character.played_time_gap_warnings)
if string_format_new == false then
return Hardcore_join({
baseVerificationString,
bubbleHearthIncidentsVerificationString,
playedtimeGapsVerificationString,
}, ATTRIBUTE_SEPARATOR)
else
local d1, d2 = DungeonTrackerGetVerificationData()
return Hardcore_join({
baseVerificationString,
bubbleHearthIncidentsVerificationString,
playedtimeGapsVerificationString,
Hardcore_stringOrNumberToUnicode(d1),
Hardcore_stringOrNumberToUnicode(d2),
Hardcore_stringOrNumberToUnicode(""), -- Future expansion for dungeon data
Hardcore_stringOrNumberToUnicode(Hardcore_GetSecurityStatus()),
Hardcore_stringOrNumberToUnicode(Hardcore_Character.last_segment_time_resolution), -- Probably don't need this here
Hardcore_stringOrNumberToUnicode(""), -- Future expansion for other data
}, ATTRIBUTE_SEPARATOR)
end
end
local version = GetAddOnMetadata("Hardcore", "Version")
local _, class, _, race, _, name = GetPlayerInfoByGUID(UnitGUID("player"))
local realm = GetRealmName()
local level = UnitLevel("player")
local party_mode = _hardcore_character.party_mode
local team_1, team_2 = "", ""
if _hardcore_character.team ~= nil then
team_1 = _hardcore_character.team[1] or "None"
team_2 = _hardcore_character.team[2] or "None"
end
local scroll_container = AceGUI:Create("SimpleGroup")
scroll_container:SetFullWidth(true)
scroll_container:SetFullHeight(true)
scroll_container:SetLayout("Fill")
tabcontainer:AddChild(scroll_container)
local scroll_frame = AceGUI:Create("ScrollFrame")
scroll_frame:SetLayout("Flow")
scroll_container:AddChild(scroll_frame)
local first_menu_description_title = AceGUI:Create("Label")
first_menu_description_title:SetWidth(500)
first_menu_description_title:SetText("Verify Your Character - " .. version)
first_menu_description_title:SetFont("Interface\\Addons\\Hardcore\\Media\\BreatheFire.ttf", 20, "")
scroll_frame:AddChild(first_menu_description_title)
local character_and_level_label = AceGUI:Create("Label")
character_and_level_label:SetWidth(_menu_width)
character_and_level_label:SetText(
"\n\n"
.. name
.. " (lvl "
.. level
.. " "
.. UnitRace("player")
.. " "
.. UnitClass("player")
.. ") on "
.. realm
.. "\n ["
.. party_mode
.. ", "
.. team_1
.. ", "
.. team_2
.. "]\n"
.. "Played: "
.. math.floor(0.5 + _hardcore_character.time_played / 360) / 10
.. " hrs\n\n"
)
character_and_level_label:SetFont("Fonts\\FRIZQT__.TTF", 14, "")
scroll_frame:AddChild(character_and_level_label)
local extra_lines = ""
local general_rules_description = AceGUI:Create("Label")
general_rules_description:SetWidth(600)
general_rules_description:SetText("\nTo get verified, copy the string below and visit the hardhead website.")
general_rules_description:SetFont("Fonts\\FRIZQT__.TTF", 12, "")
scroll_frame:AddChild(general_rules_description)
local switch_format_button = AceGUI:Create("Button")
switch_format_button:SetText("Use new format")
switch_format_button:SetWidth(130)
scroll_frame:AddChild(switch_format_button)
switch_format_button:SetCallback("OnClick", function()
if string_format_new == false then
switch_format_button:SetText("Use old format")
else
switch_format_button:SetText("Use new format")
end
string_format_new = not string_format_new
first_menu_description:SetText(GenerateVerificationString())
end)
first_menu_description = AceGUI:Create("MultiLineEditBox")
first_menu_description.button:Hide()
first_menu_description:SetMaxLetters(0)
first_menu_description:SetHeight(850)
first_menu_description.button:SetPoint("BOTTOMLEFT", 0, -150)
first_menu_description:SetWidth(750)
first_menu_description:SetLabel("")
first_menu_description:SetText(GenerateVerificationString())
scroll_frame:AddChild(first_menu_description)
local copy_tip_label = AceGUI:Create("Label")
local text = extra_lines .. "\n\n\n\n\n\n\n\n\n\n\n\n\nSelect All (Ctrl-A), Copy (Ctrl-C), and Paste (Ctrl-V)"
copy_tip_label:SetText(text)
copy_tip_label:SetWidth(700)
copy_tip_label:SetFontObject(GameFontHighlightSmall)
scroll_frame:AddChild(copy_tip_label)
local character_status_label = AceGUI:Create("Label")
local statusString1, statusString2 = Hardcore:GenerateVerificationStatusStrings()
local text = "\n" .. statusString1 .. "\n" .. statusString2
character_status_label:SetText(text)
character_status_label:SetWidth(700)
character_status_label:SetFontObject(GameFontHighlightMedium)
scroll_frame:AddChild(character_status_label)
end
local function DrawDKTab(container, dk_button_function)
local function DrawRulesLabel(text, _scroll_frame)
local general_rules_label = AceGUI:Create("HardcoreClassTitleLabel")
general_rules_label:SetWidth(_inner_menu_width)
general_rules_label:SetHeight(60)
general_rules_label:SetText(text)
general_rules_label:SetFont("Interface\\Addons\\Hardcore\\Media\\BreatheFire.ttf", 20, "")
_scroll_frame:AddChild(general_rules_label)
end
local scroll_container = AceGUI:Create("SimpleGroup")
scroll_container:SetFullWidth(true)
scroll_container:SetFullHeight(true)
scroll_container:SetLayout("List")
tabcontainer:AddChild(scroll_container)
local scroll_frame = AceGUI:Create("ScrollFrame")
scroll_frame:SetLayout("Flow")
scroll_frame:SetHeight(490)
scroll_container:AddChild(scroll_frame)
DrawRulesLabel("", scroll_frame)
local general_rules_description = AceGUI:Create("Label")
general_rules_description:SetWidth(_inner_menu_width)
general_rules_description:SetText(
"Death Knights are authorized for the Hardcore Challenge, adding in these following rules. You must level a character of the SAME FACTION following the standard HC Ruleset, at which point it must be sacrificed to create a Death Knight. The sacrificial level is a range between 55 and 58. You cannot sacrifice before or after these levels. As a side note, sacrificing a toon does not mean you must delete it, but it will no longer be valid HC toon.\n"
)
general_rules_description:SetFont("Fonts\\FRIZQT__.TTF", 12, "")
scroll_frame:AddChild(general_rules_description)
DrawRulesLabel("", scroll_frame)
local general_rules_description = AceGUI:Create("Label")
general_rules_description:SetWidth(_inner_menu_width)
general_rules_description:SetText(
"\nIf you should die or fail your run while playing as a Death Knight, you must start over from level 1, with a fresh toon to perform the sacrifice again. You may create your DK in advance if you wish to RSVP a name, but do not log onto them. Remember that you need to have a lvl 55 already on the server to create a DK. Duo and Trio groups who wish to have a DK in the party must follow some additional steps in creating a DK. These steps are listed further below. General achievements will carry over when you activate your DK\n\n\n\n"
)
general_rules_description:SetFont("Fonts\\FRIZQT__.TTF", 12, "")
scroll_frame:AddChild(general_rules_description)
DrawRulesLabel("Solo DK", scroll_frame)
local general_rules_description = AceGUI:Create("Label")
general_rules_description:SetWidth(_inner_menu_width)
general_rules_description:SetText(
"Listed below is a step by step process for creating a DK while solo.. \n Step 1: Level a character of the “SAME FACTION” to the required level range, following the HC rules.\n Step 2: Click on the “SACRIFICE” button below. This starts a 5 minute timer. You cannot activate the “SACRIFICE” button while in combat, stealthed, or during Feign Death.\n Step 3: During these 5 minutes, you must die on your current character. After dying, log out.\n Step 4: DO NOT DELETE THE TOON YOU SACRIFICED UNTIL AFTER THE DK IS ACTIVATED!!\n Step 5: Create or log onto your Death Knight.\n Step 6: Click on “ACTIVATE” below. Then do a /reload. You are now good to go.\nSurvive well out there!\n\n\n\n"
)
general_rules_description:SetFont("Fonts\\FRIZQT__.TTF", 12, "")
scroll_frame:AddChild(general_rules_description)
DrawRulesLabel("Duo/Trio DK", scroll_frame)
local general_rules_description = AceGUI:Create("Label")
general_rules_description:SetWidth(_inner_menu_width)
general_rules_description:SetText(
"There are some additional things you must do when you wish to create a DK for Duo or Trio groups.\n Step 1: Start your Duo/Trio group of the “SAME FACTION” and reach the level range for sacrifice, following the HC rules.\n Step 2: For the player who is sacrificing, click on the “SACRIFICE” button below. This starts a 5 minute timer. You cannot activate the “SACRIFICE” button while in combat, stealthed, or during Feign Death.\n Step 3: During these 5 minutes, you must die on your current character. After dying, drop group and logout. Your partners who are not sacrificing MUST STAY ONLINE!\n Step 4: DO NOT DELETE THE TOON YOU SACRIFICED UNTIL AFTER THE DK IS ACTIVATED!!\n Step 5: Create or log onto your Death Knight.\n Step 6: Click on “ACTIVATE” below.\n Step 7: Rejoin the party with your partners using /inv “Name” \n Step 8: All party member must /reload\n Step 9: If more than one player is creating a DK, then you must follow the steps ONE PERSON AT A TIME! Multiple players creating a DK in the party at the same time WILL invalidate your run. \n\n\n\n"
)
general_rules_description:SetFont("Fonts\\FRIZQT__.TTF", 12, "")
scroll_frame:AddChild(general_rules_description)
local button_container = AceGUI:Create("SimpleGroup")
button_container:SetFullWidth(true)
button_container:SetFullHeight(true)
button_container:SetLayout("Flow")
scroll_container:AddChild(button_container)
local sacrifice_button = AceGUI:Create("Button")
sacrifice_button:SetText("Sacrifice")
sacrifice_button:SetWidth(100)
button_container:AddChild(sacrifice_button)
local activate_button = AceGUI:Create("Button")
activate_button:SetText("Activate")
activate_button:SetWidth(100)
button_container:AddChild(activate_button)
sacrifice_button:SetCallback("OnClick", function()
dk_button_function(nil, "sacrifice")
end)
activate_button:SetCallback("OnClick", function()
dk_button_function(nil, "activate")
end)
end
local function DrawLevelsTab(container, _hardcore_settings)
local function DrawNameColumn(_scroll_frame, _level_list, _player_list, width, start, max_lines)
local entry = AceGUI:Create("SimpleGroup")
entry:SetLayout("List")
entry:SetWidth(width)
_scroll_frame:AddChild(entry)
local name_str = ""
for i = start, start + max_lines do