-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathWholly.lua
6285 lines (5954 loc) · 290 KB
/
Wholly.lua
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
--
-- Wholly
-- Written by [email protected]
--
-- This was inspired by my need to replace EveryQuest with something that was more accurate. The pins
-- was totally inspired by QuestHubber which I found when looking for a replacement for EveryQuest. I
-- initially made a port of QuestHubber to QuestHubberGrail to make use of the Grail database, but now
-- I have integrated that work into this addon. Many thanks for all the work put into QuestHubber. I
-- was inspired to add a quest breadcrumb area from seeing one in Quest Completist.
--
-- Version History
-- 001 Initial version.
-- 002 Support for displaysDungeonQuests now works properly.
-- Added the ability for the panel tooltip to display questgivers.
-- Added the ability to click a quest in the panel to create a TomTom waypoint.
-- Map pins are only displayed for the proper dungeon level of the map.
-- 003 Added a panel button to switch to the current zone.
-- Changed the Close button into a Sort button that switches between three different modes:
-- 1. Alphabetical 2. Quest level, then alphabetical 3. Quest status, then alphabetical
-- Made map pins only have one pin per NPC, indicating the "best" color possible.
-- The entire zone dropdown button on the quest log panel now can be clicked to change zones.
-- Corrected a problem where someone running without LibStub would get a LUA error.
-- Corrected a localization issue.
-- 004 Added the ability to display a basic quest prerequisite chain in the quest panel tooltip, requiring Grail 014 or later.
-- Added the ability to right-click a "prerequisite" quest in the panel to put a TomTom arrow to the first prerequisite quest.
-- Added Dungeons and Other menu items for map areas in the quest log panel.
-- The last-used sort preference is stored on a per-character basis.
-- 005 Corrected the fix introduced in version 003 putting the LibDataBroker icon back in place.
-- Corrected a problem where the quest log tooltip would have an error if the questgiver was in a dungeon appearing in the zone.
-- Added the ability for the quest log tooltip to show that the questgiver should be killed (like the map pin tooltip).
-- The problem where map pins would not live update unless the quest log panel was opened has been fixed as long
-- as the Wholly check button appears on the map.
-- Added the ability to show quest breadcrumb information when the Quest Frame opens, showing a tooltip of breadcrumb
-- quests when the mouse enters the "breadcrumb area", and putting TomTom waypoints when clicking in it.
-- 006 Added the new quest group "World Events" which has holiday quests in it, requiring Grail 015.
-- Added a tooltip to the Wholly check button on the map that indicates how many quests of each type are in the map.
-- Added a tooltip to the LibDataBroker icon that shows the quest log panel "map" selection and the quest count/type.
-- Added a tooltip to the quest log panel Zone button that shows the quest count/type.
-- Corrected the problem where the quest log panel and map pins were not live updating when quest givers inside dungeons checked.
-- Corrected the problem where an NPC that drops items that starts more than one quest does not display the information properly
-- in its tooltip.
-- Made it so the open World Map can be updated when crossing into a new zone.
-- 007 Added the ability to show whether quests in the quest log are completed or failed.
-- Made it so right-clicking an "in log" quest will put in TomTom waypoints for the turn in locations, which requires Grail 016
-- for proper functioning since Grail 015 had a bug.
-- Made the strings for the preferences color quest information like it appears in the UI.
-- Made it so alt-clicking a log in the Wholly quest log selects the NPC that gives the quest or for the case of "in log" quests
-- the one to which the quest is turned in.
-- 008 Split out Dungeons into dungeons in different continents, requiring Grail version 017.
-- Corrected a misspelling of the global game tooltip name.
-- 009 Added localization for ptBR in anticipation of the Brazilian release.
-- Changed over to using Blizzard-defined strings for as many things as possible.
-- Corrected a problem that was causing the tooltip for creatures that needed to be killed to start a quest not to appear properly.
-- Added a few basic localizations.
-- Made the breadcrumb frame hide by default to attempt to eliminate an edge case.
-- Fixed a problem where button clicking behavior would never be set if the button was first entered while in combat.
-- Made prerequisite information appear as question marks instead of causing a LUA error in case the Grail data is lacking.
-- 010 Made it so the color of the breadcrumb quest names match their current status.
-- The click areas to the right and bottom of the quest log window no longer extend past the window.
-- Added menu options for Class quests, Profession quests, Reputation quests, and Daily quests. The Class and Profession quests will show all the quests in the system except for the class and professions that match the player. For those, the quests are displayed using the normal filtering rules. The Reputation quests follow the normal filtering rules except those that fail to be acceptable solely because of reputation will be displayed instead of following the display unobtainable filter.
-- Changed over to using Grail's StatusCode() vice Status(), and making use of more modern bit values, thereby requiring version 20.
-- Removed a few event types that are handled because Grail now does that. Instead switched to using Grail's new Status notification.
-- The tooltips for quests in the panel show profession and reputation requirements as appropriate.
-- Corrected a problem where the quest panel may not update properly while in combat.
-- 011 Made it so the breadcrumb warning will disappear properly when the user dismisses the quest frame.
-- Made it so Grail's support for Monks does not cause headaches when Monks are not available in the game.
-- Made it so Classes that do not have any class quests will not show up in the list.
-- Put in a feature to limit quests shown to those that count towards Loremaster, thereby requiring Grail version 21.
-- When the quest details appear the quest ID is shown in the top right, and it has a tooltip with useful quest information.
-- Changed the behavior of right-clicking a quest in the quest panel to put arrows to the turn in locations for all but prerequisite quests.
-- The tooltip information describing the quest shows failure reasons by changing to red categories that fail, and to orange categories that fail in prerequisite quests.
-- The quest tooltip information now indicates the first quest(s) in the prerequisite quest list as appropriate.
-- The preference to control displaying prerequisite quests in the tooltip has been removed.
-- 012 Added the ability for the tooltip to display faction reputation changes that happen when a quest is turned in.
-- Grouped the Dungeons menu items under a single Dungeons menu item.
-- Added menu items for Reputation Changes quests, grouped by reputation.
-- Added menu items for Achievement quests, grouped by continent, requiring Grail 22.
-- Updated the TOC to support Interface 40300.
-- Fixed the map pin icons whose height Blizzard changed with the 4.3 release.
-- 013 Fixes a problem where map pins would not appear and the quest ID would not appear in the Blizzard Quest Frame because the events were not set up properly because sometimes Blizzard sends events in a different order than expected.
-- Makes all the Wholly quest panel update calls ensure they are performed out of combat.
-- Updates Portuguese translation thanks to weslleih and htgome.
-- Fixes a problem where quests in the Blizzard log sometimes would not appear purple in the Wholly Quest Log.
-- Fixes a problem where holidays are not detected properly because of timing issues.
-- 014 Fixes the problem where the NPC tooltip did not show the exclamation point properly (instead showing a different icon) when the NPC can start a quest.
-- Adds a search ability that allows searching for quests based on their titles.
-- Adds the ability to display player coordinates into a LibDataBroker feed.
-- Updates some localizations.
-- Fixes the problem where the panel would no longer update after a UI reload, requiring Grail 26.
-- Adds some more achievements to the menu that are world event related.
-- Makes it so quests in the Blizzard quest log will be colored purple in preference to other colors (like brown in case the player would no longer qualify getting the quest).
-- Makes it so the indicator for a completed repeatable quest will appear even if the quest is not colored blue.
-- 015 Adds the filtered and total quest counts to the tooltip that tells the counts of the types of quests. For the world map button tooltip the filtered quest count displays in red if the quest markers on the map are hidden.
-- Corrects a problem where lacking LibDataBroker would cause a LUA error associated with the player coordinates.
-- Fixes a cosmetic issue with the icon in the top left of the Wholly quest log panel to show the surrounding edge properly.
-- Changes the world map check box into a button that performs the same function.
-- Changes the classification of "weekly", "monthly" and "yearly" quests so they no longer appear as resettable quests, but as normal ones.
-- Adds a tooltip for the coordinates that shows the map area ID and name.
-- 016 *** Requires Grail 28 or later ***
-- Adds the ability to color the achievement menu items based on whether they are complete.
-- Corrects the problem where the tooltip does not show the different names of the NPCs that can drop an item to start a quest.
-- Corrects the problem where alt-clicking a quest would not select the NPC properly if the NPC drops an item to start a quest.
-- Tracks multiple waypoints that are logically added as a group so when one is removed all of them are removed.
-- Updates some Portuguese localizations.
-- Adds the ability to show bugged information about a quest.
-- Adds a preference to consider bugged quests unobtainable.
-- Makes it select the closest waypoint when more than one is added at the same time.
-- 017 *** Requires Grail 29 or later ***
-- Updates the preferences to allow more precise control of displayed quest types.
-- Creates the ability to control whether achievement and reputation change information is used.
-- Adds some Russian localization by freega3 but abused by me.
-- Adds basic structural support for the Italian localization.
-- Changes the presentation of prerequisite quest information to have all types unified in one location.
-- 018 Adds some missing Italian UI keys.
-- Removes UI keys no longer used.
-- Fixes the icon that appears in the tooltip when an NPC drops an item that starts a quest.
-- Adds the ability to display item quest prerequisites.
-- Changes the priority of quest classification to ensure truly repeatable quests are never green.
-- Adds support for Cooking and Fishing achievements, present in Grail 31.
-- Adds support to display LightHeaded data by shift-left-click a quest in the Wholly quest panel.
-- Adds the ability to display abandoned and accepted quest prerequisites.
-- 019 Adds German localization provided by polzi and aryl2mithril.
-- Adds French localization provided by deadse and Noeudtribal.
-- Corrects the problem where the preference to control holiday quests always was not working properly, requiring Grail 32.
-- Updates Russian localization provided by dartraiden.
-- Adds support for Just Another Day in Tol Barad achievements when Grail provides that data (starting in Grail 32).
-- Adds the ability to display all quests from the search menu.
-- Updates Portuguese localization provided by andrewalves.
-- Corrects a rare problem interacting with LDB.
-- Adds the ability to display quest prerequisites filtering through flag quests when Grail provides the functionality.
-- 020 *** Requires Grail 33 or later ***
-- Corrects the problem where quests in the log that are no longer obtainable do not appear properly.
-- Adds the ability to show daily quests that are too high for the character as orange.
-- Adds Spanish localization provided by Trisquite.
-- Moves the Daily quests into the Other category.
-- Adds the experimental option to have a wide quest panel.
-- 021 *** Requires Grail 34 or later ***
-- Makes it so Mists of Pandaria reputations can be handled.
-- Makes it so starter Pandarens no longer cause LUA errors.
-- Corrects the problem where removing all TomTom waypoints was not clearing them from Wholly's memory.
-- Corrects locations for Wholly informational frames placed on QuestFrame in MoP beta.
-- Updates the tooltip to better indicate when breadcrumb quests are problems for unobtainable quests.
-- Adds the ability to display profession prerequisites (in the prerequisites section vice its own for the few that need it).
-- 022 *** Requires Grail 36 or later ***
-- Corrects the problem where NPC tooltips may not be updated until the world map is shown.
-- Changes how map pins are created so no work is done unless the WorldMapFrame is being shown.
-- Adds the ability to show that quests are Scenario or Legendary.
-- Changes the artwork on the right side of the wide panel.
-- Fixes the problem where the search panel was not attaching itself to the Wholly quest panel.
-- Updates some Korean localization provided by next96.
-- Makes it so Legendary quests appear orange while daily quests that are too high level appear dark blue.
-- Adds two new sort techniques, and also a tooltip for the sort button that describes the active sort technique.
-- Adds the ability to show an abbreviated quest count for each map area in the second scroll area of the wide quest panel, with optional live updates.
-- Fixes the problem where the Wholly world map button can appear above other frames.
-- Makes changing the selection in the first scroll view in the wide version of the Wholly quest panel, remove the selection in the second scroll view, thereby allowing the zone button to properly switch to the current zone.
-- Adds a Wholly quest tooltip for each of the quests in the Blizzard quest log.
-- Updates searching in the wide frame to select the newly sought term.
-- 023 Updates some Korean localization provided by next96.
-- Updates some German localization provided by DirtyHarryGermany.
-- Updates from French localization provided by akirra83.
-- Adds support to indicate account-wide quests, starting with Grail 037 use.
-- 024 *** Requires Grail 38 or later ***
-- Updates some Russian localization provided by dartraiden.
-- Adds support for quests that require skills as prerequisites, requiring Grail 038.
-- Updates some Italian localization provided by meygan.
-- 025 *** Requires Grail 39 or later ***
-- Adds support to display quest required friendship levels.
-- Fixes the problem where NPC tooltips would not be updated (from changed addon data) upon reloading the UI.
-- Adds support to display prerequisites using Grail's newly added capabilities for OR within AND.
-- Adds support for quests that require lack of spells or spells ever being cast as prerequisites.
-- Adds a filter for Scenario quests.
-- Delays the creation of the dropdown menu until it is absolutely needed to attempt to minimize the taint in Blizzard's code.
-- Fixes an issue where considering bugged quests unobtainable would not filter as unobtainable properly.
-- 026 *** Requires Grail 40 or later ***
-- Adds support for displaying special reputation requirements currently only used in Tillers quests.
-- 027 *** Requires Grail 41 or later ***
-- Adds the ability to display requirements for spells that have ever been experienced.
-- Adds the ability to specify amounts above the minimum reputation level as provided in Grail 041 and later.
-- Updates some Traditional Chinese localization provided by machihchung and BNSSNB.
-- Adds the ability to display requirements from groups of quests, both turning in and accepting the quests.
-- Changes spell prerequisite failures to color red vice yellow.
-- Changes preference "Display holiday quests always" to become a "World Events" filter instead, making World Events always shown in their categories.
-- Changes world events titles to be brown (unobtainable) if they are not being celebrated currently.
-- Adds the ability to Ctrl-click any quest in the Wholly quest panel to add waypoints for EVERY quest in the panel.
-- Corrects the incorrect rendering of the wide panel that can happen on some systems.
-- Adds keybindings for toggling display of map pins and quests that need prerequsites, daily quests, repeatable quests, completed, and unobtainable quests.
-- Adds the ability to display maximum reputation requirements that are quest prerequisites.
-- Changes the maximum line count for the tooltip before the second is created, to be able to be overridden by WhollyDatabase.maximumTooltipLines value if it exists.
-- Adds the ability to Ctrl-Shift-click any quest in the Wholly quest panel to toggle whether the quest is ignored.
-- Adds the ability to filter quests that are marked ignored.
-- 028 Switches to using Blizzard's IGNORED string instead of maintaining a localized version.
-- Adds basic support for putting pins on the Omega Map addon.
-- Changes the display of the requirement for a quest to ever have been completed to be green if true, and not the actual status of the quest.
-- Updates the TOC to support interface 50100.
-- Replaces the calls to Grail:IsQuestInQuestLog() with the status bit mask use since (1) we know whether the quest is in the log from its status, and (2) the call was causing Grail to use a lot of memory.
-- 029 Adds support for Grail's T code prerequisites.
-- Adds Simplified Chinese localization provided by Sunteya.
-- 030 Changes to use some newly added API Grail provides, *** requiring Grail 45 or later ***.
-- Updates some Spanish localization provided by Davidinmoral.
-- Updates some French localization provided by Noeudtribal.
-- Reputation values that are not to be exceeded now have "< " placed in front of the value name.
-- Allows the key binding for toggling open/close the Wholly panel to work in combat, though this function will need to be rebound once.
-- Fixes a map pin problem with the addon Mapster Enhanced.
-- Changes the faction prerequisites to color green, red or brown depending on whether the prerequisite is met, can be met with increase in reputation or is not obtainable because reputation is too high.
-- Adds support for Grail's new "Other" map area where oddball quests are located.
-- Adds support for Grail's new NPC location flags of created and mailbox.
-- Updates some Portuguese localization provided by marciobruno.
-- Adds Pet Battle achievements newly provided by Grail.
-- 031 Updates some German localization provided by bigx2.
-- Updates some Russian localization provided by dartraiden.
-- Adds ability to display F code prerequisite information.
-- 032 Fixes a problem where the Achievements were not working properly unless the UI was reloaded.
-- Adds the ability to display NPCs with prerequisites, *** requiring Grail 47 or later ***.
-- Makes the X code prerequisite display with ![Turned in].
-- Adds the ability to display phase prerequisite information.
-- Adds some Spanish translations based on input by Davidinmoral.
-- 033 Adds a hidden default shouldNotRestoreDirectionalArrows that can be present in the WhollyDatabase saved variables to not reinstate directional arrows upon reloading.
-- Adds the ability to show when a quest is obsolete (removed) or pending.
-- Adds support for displaying Q prerequisites and for displaying pet "spells".
-- Changes the technique used to display reputation changes in the tooltip, *** requiring Grail 048 or later ***.
-- Adds support for Grail's new representation of prerequisite information.
-- 034 Changes the tooltip code to allow for better displaying of longer entries.
-- Adds some Korean localization provided by next96.
-- Changes the Interface to 50300 to support the 5.3.0 Blizzard release.
-- Adds the ability to control the Grail-When loadable addon to record when quests are turned in.
-- Adds the ability to display when quests are turned in, and if the quest can be done more than once, the count of how many times done.
-- Updates support for Grail's new representation of prerequisite information.
-- 035 Updates Chinese localizations by Isjyzjl.
-- Adds the ability to show equipped iLvl prerequisites.
-- Corrects the display problem with OR within AND prerequisites introduced in version 034.
-- Makes opening the preferences work even if Wholly causes the preferences to be opened the first time in a session.
-- 036 Updates Russian localizations by dartraiden.
-- Removes the prerequisite population code in favor of API provided by Grail, requiring Grail 054 or later.
-- 037 Fixes the problem where tooltips do not appear in non-English clients properly.
-- 038 Fixes the problem where tooltips that show the currently equipped iLevel cause a Lua error.
-- Adds a preference to control whether tooltips appear in the Blizzard Quest Log.
-- Corrects the problem introdced by Blizzard in their 5.4.0 release when they decided to call API (IsForbidden()) before checking whether it exists.
-- Makes the attached Lightheaded frame work better with the wide panel mode.
-- Corrects a problem where a variable was leaking into the global namespace causing a prerequisite evaluation failure.
-- Attempts to make processing a little quicker by making local references to many Blizzard functions.
-- 039 Fixes the problem where tooltips for map pins were not appearing correctly.
-- Fixes a Lua error with the non-wide Wholly quest panel's drop down menu.
-- Fixes a Lua error when Wholly is used for the first time (or has no saved variables file).
-- Adds a preference to control display of weekly quests.
-- Adds a color for weekly quests.
-- Enables quest colors to be stored in player preferences so users can changed them, albeit manually.
-- Fixes the problem where the keybindings or buttons not on the preference panel would not work the first time without the preference panel being opened.
-- 040 Updates Russian localizations by dartraiden.
-- Adds a workaround to supress the panel that appears because of Blizzard's IsDisabledByParentalControls taint issue.
-- Updates Simplified Chinese localizations by dh0000.
-- 041 Adds the capability to set the colors for each of the quest types.
-- Changes to use newer way Grail does things.
-- 042 Updates Russian localizations by dartraiden.
-- Corrects the search function to use the new Grail quest structures.
-- Makes it so quests that are pending or obsolete do not appear when the option indicates unobtainable quests should not appear.
-- Changed display of profession requirements to only show failure as quest prerequisites now show profession requirements consistently.
-- 043 Handles Grail's change in AZ quests to handle pre- and post-063 implementation.
-- Adds the ability to mark quests with arbitrary tags.
-- 044 Corrects the Lua error that happens when attempting to tag a quest when no tag exists.
-- Fixes the map icons to look cleaner by Shenj.
-- Updates Russian localizations by vitasikxp.
-- 045 Updates various localizations by Nimhfree.
-- Updates to support changes in WoD that Grail supports. *** Requires Grail 065 or later. ***
-- Adds hidden WhollyDatabase preference ignoreReputationQuests that controls whether the Reputations section of quests appears in the Wholly panel.
-- Adds hidden WhollyDatabase preference displaysEmptyZones that controls whether map zones where no quests start are displayed.
-- Changes the Interface to 60000.
-- 046 Regenerates installation package.
-- 047 Updates Traditional Chinese localizations by machihchung.
-- Updates Portuguese localizations by DMoRiaM.
-- Updates French localizations by Dabeuliou;
-- Changes level for pins to display over Blizzard POIs.
-- Changes level for pins so yellow/grey pins display over other colors.
-- Changes default behavior to only show in tooltips faction changes available to the player, with hidden WhollyDatabase preference showsAllFactionReputations to override.
-- 048 Fixes a problem where Wholly does not load properly when TomTom is not present.
-- 049 Adds the ability to display quests that reward followers.
-- Updates some Korean localization provided by next96.
-- Updates some German localization provided by DirtyHarryGermany.
-- 050 Adds support for garrison building requirements.
-- Updates Russian localization provided by dartraiden.
-- Updates German localization provided by DirtyHarryGermany.
-- Updates both Chinese localizations provided by FreedomL10n.
-- 051 Adds support to control display of bonus objective, rare mob and treasure quests.
-- Adds Wholly tooltip to the QuestLogPopupDetailFrame.
-- Updates French localization provided by aktaurus.
-- Breaks out the preferences into multiple pages, making the hidden preferences no longer hidden.
-- Adds ability to control the display of legendary quests.
-- Updates Russian localization provided by dartraiden.
-- Changes the Interface to 60200.
-- 052 Adds support to display new group prerequisite information.
-- Corrects the issue where NPC tooltips were not showing drops that start quests.
-- Updates Spanish (Latin America) localization by Moixe.
-- Updates German localization by Mistrahw.
-- Updates Korean localization by mrgyver.
-- Updates Spanish (Spain) localization by Ertziano.
-- Corrects the problem where the drop down button in the Wholly window does not update the follower name properly.
-- Adds the ability to display quest rewards.
-- Splits up zone drop downs that are too large.
-- 053 Adds the ability to filter pet battle quests.
-- Adds the ability to display a quest as a bonus objective, rare mob, treasure or pet battle.
-- Adds the ability to have the quest filter work for NPC tooltips.
-- Updates German localization by Rikade.
-- Updates prerequisite displays to match new Grail features.
-- 054 Adds support for Adventure Guide
-- Updates German localization by potsrabe.
-- 055 Updates Traditional Chinese localization by gaspy10.
-- Updates Spanish (Spain) localization by ISBILIANS.
-- Corrects the problem where the map location is lost on UI reload.
-- 056 Updates German localization by pas06.
-- Adds the ability to filter quests based on PVP.
-- Adds the ability to support Grail's ability to indicate working buildings.
-- 057 Changes the ability to display quest rewards without the need for Grail to have the information.
-- Updates Traditional Chinese localization by gaspy10.
-- Adds the ability to display prerequisites for classes.
-- Updates Spanish (Spain) localization by Ehren_H.
-- Changes the Interface to 70000.
-- 058 Adds the ability to control the display of some Blizzard world map icons.
-- Fixes the placement of the Wholly world map button so it appears when the world map is opened.
-- Fixes presenting a window when attempting to load an on-demand addon fails.
-- 059 Fixes the problem where hiding Blizzard map POIs in combat causes Lua errors.
-- Adds the ability to control the display of Blizzard story line quest markers.
-- Updates French translation by coldragon78.
-- Updates Traditional Chinese localization by gaspy10.
-- 060 Adds the ability to control the display of World Quests, including a key binding.
-- Adds a Legion Repuation Changes section.
-- Fixes the problem where the coordinates would cause issues in instances.
-- 061 Adds ability to show "available" prerequisite used for world quests.
-- Updates German localization by Broesel01.
-- Updates Korean localization by netaras.
-- 062 Updates Spanish (Spain) localization by annthizze.
-- Adds support for Grail's ability to detect withering in NPCs and therefore quest requirements.
-- Updates Brazilian Portuguese localization.
-- Updates French localization.
-- Updates Korean localization.
-- Updates Spanish (Latin America) localization.
-- Adds support for world quests to have their own pin color.
-- 063 Updates the Interface to 70200.
-- Adds support for artifact level prerequisites.
-- Updates Spanish (Latin America) localization.
-- Updates French localization by sk8cravis.
-- Updates German localization by RobbyOGK.
-- 064 Updates the Interface to 70300.
-- Updates the use of PlaySound based on Blizzard's changes based on Gello's post.
-- 065 Corrects a timing problem where the notification frame might be sent events before initialized properly.
-- Adds a binding to toggle Loremaster quests.
-- Updates technique to hide flight points on Blizzard map.
-- Adds ability to hide dungeon entrances on Blizzard map.
-- Updates Russian localization from iGreenGO and EragonJKee.
-- Updates German localization from Adrinator and Haipia.
-- 066 *** Requires Grail 93 or later ***
-- Adds the ability to display prerequisites for Class Hall Missions.
-- Adds support for Allied races.
-- Updates Russian localization from mihaha_xienor.
-- Updates Spanish localization from raquetty.
-- 067 *** Requires Grail 096 or later ***
-- Corrects the problem where some dungeons are not listed.
-- Updates French localization by deathart709 and MongooZz.
-- Updates Russian localization by RChernenko.
-- Updates Spanish localization by neinhalt_77.
-- Made it so we can handle Blizzard removing GetCurrentMapDungeonLevel() and GetCurrentMapAreaID().
-- Updates Italian localization by luigidirico96.
-- Groups the continents together under a heading.
-- Changes to use for WORLD_QUEST Blizzard's TRACKER_HEADER_WORLD_QUESTS.
-- Disables ability to hide Blizzard map items because Blizzard API has changed.
-- Updates Simplified Chinese localization by dh0000 and Aladdinn.
-- 068 Corrects the issue where the map was caused to change unexpectedly.
-- Corrects the problem where TomTom arrows were not being added properly with the new TomTom.
-- Updates Latin American Spanish localization by danvar33.
-- 069 Updates Russian localization by dartraiden.
-- Removes quest level for those quests that have no real level, and changes the display to show variable level maximums as appropriate.
-- Updates a bunch of localizations from users who provided input on: https://wow.curseforge.com/projects/wholly/localization
-- 070 Updates Interface in TOC to 80100.
-- Allows map button to work with Titan Location.
-- Adds a little defensive code to avoid a Lua error.
-- 071 Updates Interface in TOC to 80200.
-- Adds a little defensive code to avoid a Lua error.
-- Makes it so achievements are not loaded in Classic.
-- Makes it so some of the UI elements are not used in Classic.
-- Adds the ability to show a message in the chat indicating a breadcrumb is available.
-- Corrects issue where map pins could be the wrong type.
-- 072 Fixes a problem where the open world map in Classic errors when changing zones.
-- Fixes the problem where the Wholly map button was not appearing and working properly in Classic.
-- Fixes the problem where exclusive classes in Classic were failing because of Retail classes.
-- Adds the ability to have the Wholly information appear in a tooltip when hovering over a quest in the Blizzard quest panel.
-- Adds the ability to have the Wholly tooltip contain the quest title and description in Classic, with the description in white.
-- 073 Makes it so lack of NPC name for item drops no longer causes a Lua error.
-- Makes it so NPCs are colored red if they are not available to the player.
-- Adds the ability to display the NPC comments in the Wholly quest tooltip.
-- 074 Makes it so the Wholly map button does not move when TomTom is installed.
-- Makes it so the Wholly map button moves when Questie is also loaded.
-- Makes the Wholly quest panel appear much nicer in Classic.
-- 075 *** Requires Grail 104 or later ***
-- Fixes a problem where the search edit box was not created properly.
-- Shows quests that are turned in to a zone in the Wholly quest panel.
-- Adds the ability to show map pins for quest turn in locations.
-- 076 Updates the Classic Wholly quest panel to have a right side.
-- Changes the colors for turn in pins to be white and yellow to match the NPCs in the world.
-- Updates preferences to allow control over displaying turn in map pins that are complete or incomplete.
-- Corrects issue where map button does not appear upon first login for new character.
-- 077 Adjusts the position of the breadcrumb frame to look better in Classic.
-- Adds support for Heart of Azeroth level requirements.
-- 078 *** Requires Grail 109 or later ***
-- Updates the Classic interface to 11304 to match the latest Blizzard release.
-- Updates getting NPC locations to newer API use in Grail.
-- 079 *** Requires Grail 110 or later ***
-- Changes made to handle Grail's delayed loading of NPC names.
-- 080 *** Requires Grail 111 or later ***
-- Changes to start supporting Shadowlands.
-- Changes interface to 90001.
-- 081 *** Requires Grail 112 or later ***
-- Changes the reputation section to allow for future expansions without code change.
-- Adds the ability to use Blizzard's user waypoint.
-- Changes interface to 90002.
-- 082 *** Requires Grail 114 or later ***
-- Adds the ability to display covenant renown level prerequisites (minimum and maximum).
-- Adds the ability to display calling quests availability prerequisites.
-- Adds the ability to display quest types for biweekly, threat and calling quests.
-- Adds the ability to display covenant talent prerequisites.
-- Adds the ability to display custom achivements Grail supports.
-- 083 Adds the ability to display the expansion associated with the quest.
-- Changes interface to 90005 (and 20501 for Classic Burning Crusade).
-- 084 *** Requires Grail 116 or later ***
-- Switched to a unified addon for all of Blizzard's releases.
-- Enables displaying a requirement of a renown level independent of covenant.
-- Transforms the Wholly map button into one with just "W" and puts it at the top left of the map.
-- Reintroduces some ability to filter Blizzard map pins in Retail.
-- Changes retail interface to 90100.
-- 085 Updates _OnUpdate to ensure coordinates are returned before updating locations.
-- Changes retail interface to 90105, BCC to 20502 and Classic to 11400.
-- 086 Changes retail interface to 90205, BCC to 20504 and Classic to 11402.
-- Adds support for quests that only become available after the next daily reset.
-- Adds an option to hide the quest ID on the Quest Frame.
-- Adds support for quests that only become available when currency requirements are met.
-- 087 *** Requires Grail 119 or later ***
-- Changes retail interface to 100002, Wrath to 30400 and Vanilla to 11403.
-- 088 Corrects the problem where mouse clicks on the Wholly quest panel failed to act.
-- Corrects the problem where the location of the Wholly quest panel is not retained across restarts.
-- Adds support for quests that have major faction renown level prerequisites.
-- Adds support for quests that have POI presence prerequisites.
-- Adds support for items with specific counts as prerequisites.
-- Changes retail interface to 100005.
-- Adds support group membership completion counts being exact (to support Dragon Isles Waygate quests).
-- 089 Changes Classic Wrath interface to 30401.
-- 090 Changes retail interface to 100007.
-- 091 Adds initial support for The War Within.
-- Switches TOC to have a single Interface that lists all supported versions.
-- 092 Adds support to indicate a quest was completed by someone else in the account (warband).
-- Adds some new filters based on Grail support for different quest types.
--
-- Known Issues
--
-- The quest log quest colors are not updated live (when the panel is open).
--
-- UTF-8 file
--
local format, pairs, tContains, tinsert, tonumber = format, pairs, tContains, tinsert, tonumber
local ipairs, print, strlen, tremove, type = ipairs, print, strlen, tremove, type
local strsplit, strfind, strformat, strsub, strgmatch = strsplit, string.find, string.format, string.sub, string.gmatch
local bitband = bit.band
local tablesort = table.sort
local mathmax, mathmin, sqrt = math.max, math.min, math.sqrt
local CloseDropDownMenus = CloseDropDownMenus
local CreateFrame = CreateFrame
--local GetAchievementInfo = GetAchievementInfo
local GetAddOnMetadata = GetAddOnMetadata
local GetBuildInfo = GetBuildInfo
local GetCoinTextureString = GetCoinTextureString or C_CurrencyInfo.GetCoinTextureString
local GetCursorPosition = GetCursorPosition
local GetCVarBool = GetCVarBool
local GetLocale = GetLocale
local GetQuestID = GetQuestID
local GetRealZoneText = GetRealZoneText
--local GetSpellInfo = GetSpellInfo
local GetTitleText = GetTitleText
local InCombatLockdown = InCombatLockdown
--local InterfaceOptions_AddCategory = InterfaceOptions_AddCategory
local InterfaceOptionsFrame_OpenToCategory = InterfaceOptionsFrame_OpenToCategory
local IsControlKeyDown = IsControlKeyDown
local IsShiftKeyDown = IsShiftKeyDown
local LoadAddOn = LoadAddOn
local PlaySound = PlaySound
local ToggleDropDownMenu = ToggleDropDownMenu
local UIDropDownMenu_AddButton = UIDropDownMenu_AddButton
local UIDropDownMenu_CreateInfo = UIDropDownMenu_CreateInfo
local UIDropDownMenu_GetText = UIDropDownMenu_GetText
local UIDropDownMenu_Initialize = UIDropDownMenu_Initialize
local UIDropDownMenu_JustifyText = UIDropDownMenu_JustifyText
local UIDropDownMenu_SetText = UIDropDownMenu_SetText
local UIDropDownMenu_SetWidth = UIDropDownMenu_SetWidth
local UnitIsPlayer = UnitIsPlayer
local GameTooltip = GameTooltip
local UIErrorsFrame = UIErrorsFrame
local UIParent = UIParent
local QuestFrame = QuestFrame
local WorldMapFrame = WorldMapFrame
local GRAIL = nil -- will be set in PLAYER_LOGIN
local directoryName, _ = ...
local GetAddOnMetadata_API = GetAddOnMetadata or C_AddOns.GetAddOnMetadata
local versionFromToc = GetAddOnMetadata_API(directoryName, "Version")
local _, _, versionValueFromToc = strfind(versionFromToc, "(%d+)")
local Wholly_File_Version = tonumber(versionValueFromToc)
local requiredGrailVersion = 124
-- Set up the bindings to use the localized name Blizzard supplies. Note that the Bindings.xml file cannot
-- just contain the TOGGLEQUESTLOG because then the entry for Wholly does not show up. So, we use a version
-- named WHOLLY_TOGGLEQUESTLOG which maps to the same Global string, which works exactly as we want.
_G["BINDING_NAME_CLICK com_mithrandir_whollyFrameHiddenToggleButton:LeftButton"] = BINDING_NAME_TOGGLEQUESTLOG
--BINDING_NAME_WHOLLY_TOGGLEQUESTLOG = BINDING_NAME_TOGGLEQUESTLOG
BINDING_HEADER_WHOLLY = "Wholly"
BINDING_NAME_WHOLLY_TOGGLEMAPPINS = "Toggle map pins"
BINDING_NAME_WHOLLY_TOGGLESHOWNEEDSPREREQUISITES = "Toggle shows needs prerequisites"
BINDING_NAME_WHOLLY_TOGGLESHOWDAILIES = "Toggle shows dailies"
BINDING_NAME_WHOLLY_TOGGLESHOWWEEKLIES = "Toggle shows weeklies"
BINDING_NAME_WHOLLY_TOGGLESHOWREPEATABLES = "Toggle shows repeatables"
BINDING_NAME_WHOLLY_TOGGLESHOWUNOBTAINABLES = "Toggle shows unobtainables"
BINDING_NAME_WHOLLY_TOGGLESHOWCOMPLETED = "Toggle shows completed"
BINDING_NAME_WHOLLY_TOGGLESHOWWORLDQUESTS = "Toggle shows World Quests"
BINDING_NAME_WHOLLY_TOGGLESHOWLOREMASTER = "Toggle shows Loremaster quests"
BINDING_NAME_WHOLLY_TOGGLESHOWMAPFLIGHTPOINTS = "Toggle shows Blizzard flight points"
BINDING_NAME_WHOLLY_TOGGLESHOWMAPCALLINGQUESTS = "Toggle shows Blizzard calling quests"
BINDING_NAME_WHOLLY_TOGGLESHOWMAPCAMPAIGNQUESTS = "Toggle shows Blizzard campaign quests"
BINDING_NAME_WHOLLY_TOGGLESHOWMAPWORLDQUESTS = "Toggle shows Blizzard world quests"
if nil == Wholly or Wholly.versionNumber < Wholly_File_Version then
local function trim(s)
local n = s:find"%S"
return n and s:match(".*%S", n) or ""
end
WhollyDatabase = {}
Wholly = {
cachedMapCounts = {},
cachedPanelQuests = {}, -- quests and their status for map area self.zoneInfo.panel.mapId
cachedPinQuests = {}, -- quests and their status for map area self.zoneInfo.pins.mapId
carboniteMapLoaded = false,
carboniteNxMapOpen = nil,
checkedGrailVersion = false, -- used so the actual check can be simpler
checkedNPCs = {},
chooseClosestWaypoint = true,
clearNPCTooltipData = function(self)
self.checkedNPCs = {}
self.npcs = {}
self:_RecordTooltipNPCs(Grail.GetCurrentMapAreaID())
end,
color = {
['?'] = "FFFFFF00", -- yellow [turn in]
['*'] = "FFFFFFFF", -- white [turn in, not complete]
['!'] = "FFFF0000", -- red [turn in, failed]
['B'] = "FF996600", -- brown [unobtainable]
['C'] = "FF00FF00", -- green [completed]
['D'] = "FF0099CC", -- daily [repeatable]
['G'] = "FFFFFF00", -- yellow [can accept]
['H'] = "FF0000FF", -- blue [daily + too high level]
['I'] = "FFFF00FF", -- purple [in log]
['K'] = "FF66CC66", -- greenish [weekly]
['L'] = "FFFFFFFF", -- white [too high level]
['O'] = "FFFFC0CB", -- pink [world quest]
['P'] = "FFFF0000", -- red [does not meet prerequisites]
['R'] = "FF0099CC", -- daily [true repeatable - used for question mark in pins]
['U'] = "FF00FFFF", -- bogus default[unknown]
['W'] = "FF666666", -- grey [low-level can accept]
['Y'] = "FFCC6600", -- orange [legendary]
},
colorWells = {},
configurationScript1 = function(self)
Wholly:ScrollFrame_Update_WithCombatCheck()
Wholly.pinsNeedFiltering = true
Wholly:_UpdatePins()
Wholly:clearNPCTooltipData()
end,
configurationScript2 = function(self)
Wholly:_UpdatePins()
if Wholly.tooltip:IsVisible() and Wholly.tooltip:GetOwner() == Wholly.mapFrame then
Wholly.tooltip:ClearLines()
Wholly.tooltip:AddLine(Wholly.mapCountLine)
end
end,
configurationScript3 = function(self)
Wholly:_DisplayMapFrame(self:GetChecked())
end,
configurationScript4 = function(self)
Wholly:UpdateQuestCaches(true)
Wholly:ScrollFrame_Update_WithCombatCheck()
Wholly:_UpdatePins(true)
end,
configurationScript5 = function(self)
Wholly:UpdateBreadcrumb(Wholly)
end,
configurationScript7 = function(self)
Wholly:ScrollFrame_Update_WithCombatCheck()
end,
configurationScript8 = function(self)
Wholly:UpdateCoordinateSystem()
end,
configurationScript9 = function(self)
if WhollyDatabase.loadAchievementData and Grail.capabilities.usesAchievements then
Grail:LoadAddOn("Grail-Achievements")
end
Wholly:_InitializeLevelOneData()
end,
configurationScript10 = function(self)
if WhollyDatabase.loadReputationData then
Grail:LoadReputations()
end
Wholly:_InitializeLevelOneData()
end,
configurationScript11 = function(self)
Wholly:ToggleCurrentFrame()
end,
configurationScript12 = function(self)
Wholly:ScrollFrameTwo_Update()
end,
configurationScript13 = function(self)
end,
configurationScript14 = function(self)
if WhollyDatabase.loadDateData then
Grail:LoadAddOn("Grail-When")
end
end,
configurationScript15 = function(self)
if WhollyDatabase.loadRewardData then
Grail:LoadAddOn("Grail-Rewards")
end
end,
configurationScript16 = function(self)
-- WorldMapFrame_Update()
end,
ToggleWorldMapFrameMixin = function(provider, shouldHide)
local mixins = Wholly.GetMapProvidersForMixin(WorldMapFrame, provider)
if nil ~= mixins then
Wholly.mixinsRefreshAllData = Wholly.mixinsRefreshAllData or {} -- key is the provider, value is its original implementation of RefreshAllData
if nil == Wholly.mixinsRefreshAllData[provider] then
Wholly.mixinsRefreshAllData[provider] = provider.RefreshAllData
end
for _, mixin in pairs(mixins) do
if shouldHide then
mixin.RefreshAllData = function(fromOnShow) end
mixin:RemoveAllData()
else
mixin.RefreshAllData = Wholly.mixinsRefreshAllData[provider]
mixin:RefreshAllData(false)
end
end
end
end,
configurationScript17 = function(self)
-- Flight points are handled by FlightPointDataProviderMixin
-- Calling quests are handled by BonusObjectiveDataProviderMixin
-- Campaign (storyline) quests are handled by StorylineQuestDataProviderMixin
-- World quests are handled by WorldQuestDataProviderMixin
-- there is Blizzard UI to remove quest objectives, and world quests (albeit by reward)
-- DO NOT KNOW the following: InvasionDataProviderMixin
-- TODO: See whether there are other items we can remove from the map - dungeon entrances, treasures, teleportation hubs
-- DungeonEntranceDataProviderMixin DOES NOT seem to control dungeon entrances
end,
configurationScript18 = function(self)
Wholly:_InitializeLevelOneData()
Wholly:ScrollFrameOne_Update()
Wholly:ScrollFrameTwo_Update()
Wholly:ScrollFrame_Update_WithCombatCheck()
Wholly.pinsNeedFiltering = true
Wholly:_UpdatePins()
Wholly:clearNPCTooltipData()
end,
configurationScript19 = function(self)
Wholly.ToggleWorldMapFrameMixin(FlightPointDataProviderMixin, WhollyDatabase.hidesWorldMapFlightPoints)
end,
configurationScript20 = function(self)
Wholly.ToggleWorldMapFrameMixin(BonusObjectiveDataProviderMixin, WhollyDatabase.hidesBlizzardWorldMapCallingQuests)
end,
configurationScript21 = function(self)
-- StorylineQuestDataProviderMixin disappeared
-- Wholly.ToggleWorldMapFrameMixin(StorylineQuestDataProviderMixin, WhollyDatabase.hidesBlizzardWorldMapCampaignQuests)
end,
configurationScript22 = function(self)
Wholly.ToggleWorldMapFrameMixin(WorldQuestDataProviderMixin, WhollyDatabase.hidesBlizzardWorldMapWorldQuests)
end,
configurationScript23 = function(self)
-- Wholly.ToggleWorldMapFrameMixin(DungeonEntranceDataProviderMixin, WhollyDatabase.hidesDungeonEntrances)
-- Wholly.ToggleWorldMapFrameMixin(VignetteDataProviderMixin, WhollyDatabase.hidesWorldMapTreasures)
end,
configurationScript24 = function(self)
if WhollyDatabase.hidesIDOnQuestPanel then
com_mithrandir_whollyQuestInfoFrame:Hide()
else
com_mithrandir_whollyQuestInfoFrame:Show()
end
end,
coordinates = nil,
currentFrame = nil,
currentMaximumTooltipLines = 50,
currentTt = 0,
debug = true,
defaultMaximumTooltipLines = 50,
dropdown = nil,
dropdownLimit = 40,
dropdownText = nil,
dungeonTest = {},
eventDispatch = {
['PLAYER_REGEN_ENABLED'] = function(self, frame)
if self.combatScrollUpdate then
self.combatScrollUpdate = false
self:ScrollFrame_Update()
end
if self.combatHidePOI then
self.combatHidePOI = false
self:_HidePOIs()
end
frame:UnregisterEvent("PLAYER_REGEN_ENABLED")
end,
-- So in Blizzard's infinite wisdom it turns out that normal quests that just appear with the
-- quest giver post a QUEST_DETAIL event, unless they are quests like the Candy Bucket quests
-- which post a QUEST_COMPLETE event (even though they really are not complete until they are
-- accepted). And if there are more than one quest then QUEST_GREETING is posted, which also
-- is posted if one were to decline one of the selected ones to return to the multiple choice
-- frame again. Therefore, it seems three events are required to ensure the breadcrumb panel
-- is properly removed.
['QUEST_ACCEPTED'] = function(self, frame)
self:BreadcrumbUpdate(frame)
end,
['QUEST_COMPLETE'] = function(self, frame)
self:BreadcrumbUpdate(frame, true)
end,
['QUEST_DETAIL'] = function(self, frame)
self:BreadcrumbUpdate(frame)
end,
['QUEST_GREETING'] = function(self, frame)
com_mithrandir_whollyQuestInfoFrameText:SetText("")
com_mithrandir_whollyQuestInfoBuggedFrameText:SetText("")
com_mithrandir_whollyBreadcrumbFrame:Hide()
end,
['QUEST_LOG_UPDATE'] = function(self, frame) -- this is just here to record the tooltip information after a reload
frame:UnregisterEvent("QUEST_LOG_UPDATE")
-- This used to be in ADDON_LOADED but has been moved here because it was reported in 5.2.0
-- that the Achievements were not appearing properly, and this turned out to be caused by a
-- change that Blizzard seems to have done to make it so GetAchievementInfo() no longer has
-- a proper title in its return values at that point.
if WhollyDatabase.loadAchievementData and Grail.capabilities.usesAchievements then
self.configurationScript9()
end
self:_RecordTooltipNPCs(Grail.GetCurrentMapAreaID())
end,
['QUEST_PROGRESS'] = function(self, frame)
self:BreadcrumbUpdate(frame, true)
end,
['PLAYER_LOGIN'] = function(self, frame, arg1)
-- if "Wholly" == arg1 then -- this is a remnant from when this was ADDON_LOADED and not PLAYER_LOGIN
GRAIL = Grail
if not GRAIL or GRAIL.versionNumber < requiredGrailVersion then
local errorMessage = format(self.s.REQUIRES_FORMAT, requiredGrailVersion)
print(errorMessage)
UIErrorsFrame:AddMessage(errorMessage)
return
end
self.checkedGrailVersion = true
self:_RegisterSlashCommand()
self:_SetupWhollyQuestPanel()
self:_SetupSearchFrame()
com_mithrandir_whollyFrameTitleText:SetText("Wholly ".. com_mithrandir_whollyFrameTitleText:GetText())
com_mithrandir_whollyFrameWideTitleText:SetText("Wholly ".. com_mithrandir_whollyFrameWideTitleText:GetText())
self.toggleButton = CreateFrame("Button", "com_mithrandir_whollyFrameHiddenToggleButton", com_mithrandir_whollyFrame, "SecureHandlerClickTemplate")
self.toggleButton:SetAttribute("_onclick", [=[
local parent = self:GetParent()
if parent:IsShown() then
parent:Hide()
else
parent:Show()
end
]=])
self.currentFrame = com_mithrandir_whollyFrame
-- The frame is not allowing button presses to things just on the outside of its bounds so we move the hit rect
--frame:SetHitRectInsets(0, 32, 0, 84)
self:_SetupLibDataBroker()
self:_SetupTooltip()
self:_SetupWorldMapWhollyButton()
if ImmersionContentFrame then
QuestFrame = ImmersionContentFrame
com_mithrandir_whollyQuestInfoBuggedFrame:SetParent(QuestFrame)
com_mithrandir_whollyBreadcrumbFrame:SetParent(QuestFrame)
end
-- if the UI panel disappears (maximized WorldMapFrame) we need to change parents
UIParent:HookScript("OnHide", function()
self.tooltip:SetParent(WorldMapFrame);
self.tooltip:SetFrameStrata("TOOLTIP");
end)
UIParent:HookScript("OnShow", function()
self.tooltip:SetParent(UIParent);
self.tooltip:SetFrameStrata("TOOLTIP");
end)
-- Dragonflight introduces new tool tip processing
if TooltipDataProcessor then
TooltipDataProcessor.AddTooltipPostCall(Enum.TooltipDataType.Unit, Wholly._CheckNPCTooltip)
else
GameTooltip:HookScript("OnTooltipSetUnit", Wholly._CheckNPCTooltip)
end
self:_SetupBlizzardQuestLogSupport()
self:_SetupQuestInfoFrame()
-- Our frame positions are wrong for MoP, so we change them here.
com_mithrandir_whollyQuestInfoBuggedFrame:SetPoint("TOPLEFT", QuestFrame, "TOPLEFT", 100, -35)
if Grail.existsClassic then
com_mithrandir_whollyBreadcrumbFrame:SetPoint("TOPLEFT", QuestFrame, "BOTTOMLEFT", 16, 70)
else
com_mithrandir_whollyBreadcrumbFrame:SetPoint("TOPLEFT", QuestFrame, "BOTTOMLEFT", 16, -10)
end
if "deDE" == GetLocale() then
com_mithrandir_whollyFramePreferencesButton:SetText("Einstellungen")
end
if "ruRU" == GetLocale() then
com_mithrandir_whollyFrameSortButton:SetText("Сортировать")
end
com_mithrandir_whollyFrameSwitchZoneButton:SetText(self.s.MAP)
com_mithrandir_whollyFrameWideSwitchZoneButton:SetText(self.s.MAP)
local Grail = Grail
local TomTom = TomTom
local WDB = self:_SetupDefaults()
-- load all the localized quest names
Grail:LoadLocalizedQuestNames()
-- Add some options based on game capabilities (which basically means version (retail vs classic))
local S = Wholly.s
if Grail.capabilities.usesLegendaryQuests then
Wholly.configuration.Wholly = Grail:_TableAppend(Wholly.configuration.Wholly, { S.LEGENDARY, 'showsLegendaryQuests', 'configurationScript1', nil, nil, 'Y' })
end
if Grail.capabilities.usesPetBattles then
Wholly.configuration.Wholly = Grail:_TableAppend(Wholly.configuration.Wholly, { S.PET_BATTLES, 'showsPetBattleQuests', 'configurationScript1' })
end
Wholly.configuration.Wholly = Grail:_TableAppend(Wholly.configuration.Wholly, { S.PVP, 'showsPVPQuests', 'configurationScript1' })
if Grail.capabilities.usesWorldQuests then
Wholly.configuration.Wholly = Grail:_TableAppend(Wholly.configuration.Wholly, { S.WORLD_QUEST, 'showsWorldQuests', 'configurationScript1', nil, nil, 'O' })
end
if Grail.capabilities.usesCallingQuests then
Wholly.configuration.Wholly = Grail:_TableAppend(Wholly.configuration.Wholly, { S.CALLING, 'showsCallingQuests', 'configurationScript1' })
end
if Grail.capabilities.usesImportantQuests then
Wholly.configuration.Wholly = Grail:_TableAppend(Wholly.configuration.Wholly, { S.IMPORTANT, 'showsImportantQuests', 'configurationScript1' })
end
if Grail.capabilities.usesInvasionQuests then
Wholly.configuration.Wholly = Grail:_TableAppend(Wholly.configuration.Wholly, { S.INVASION, 'showsInvasionQuests', 'configurationScript1' })
end
if Grail.capabilities.usesAccountQuests then
Wholly.configuration.Wholly = Grail:_TableAppend(Wholly.configuration.Wholly, { S.ACCOUNT, 'showsAccountWideQuests', 'configurationScript1' })
end
if Grail.capabilities.usesWarbandQuests then
Wholly.configuration.Wholly = Grail:_TableAppend(Wholly.configuration.Wholly, { ACCOUNT_QUEST_LABEL, 'showsWarbandCompletedQuests', 'configurationScript1' }) -- "Warband"
end
if Grail.capabilities.usesFlightPoints then
tinsert(Wholly.configuration[S.WORLD_MAP], { S.HIDE_WORLD_MAP_FLIGHT_POINTS, 'hidesWorldMapFlightPoints', 'configurationScript19' })
end
if Grail.capabilities.usesCallingQuests then
tinsert(Wholly.configuration[S.WORLD_MAP], { S.HIDE_BLIZZARD_WORLD_MAP_CALLING_QUESTS, 'hidesBlizzardWorldMapCallingQuests', 'configurationScript20' })
end
if Grail.capabilities.usesCampaignQuests then
tinsert(Wholly.configuration[S.WORLD_MAP], { S.HIDE_BLIZZARD_WORLD_MAP_CAMPAIGN_QUESTS, 'hidesBlizzardWorldMapCampaignQuests', 'configurationScript21' })
end
if Grail.capabilities.usesWorldQuests then
tinsert(Wholly.configuration[S.WORLD_MAP], { S.HIDE_BLIZZARD_WORLD_MAP_WORLD_QUESTS, 'hidesBlizzardWorldMapWorldQuests', 'configurationScript22' })
end
-- Setup the preferences
-- local com_mithrandir_whollyConfigFrame = CreateFrame("Frame", nil, InterfaceOptionsFramePanelContainer)
-- com_mithrandir_whollyConfigFrame:SetScript("OnShow", function(self) Wholly:ConfigFrame_OnShow(self) end)
-- local com_mithrandir_whollyTitleAppearanceConfigFrame = CreateFrame("Frame", nil, InterfaceOptionsFramePanelContainer)
-- com_mithrandir_whollyTitleAppearanceConfigFrame:SetScript("OnShow", function(self) Wholly:ConfigFrame_OnShow(self) end)
-- local com_mithrandir_whollyWorldMapConfigFrame = CreateFrame("Frame", nil, InterfaceOptionsFramePanelContainer)
-- com_mithrandir_whollyWorldMapConfigFrame:SetScript("OnShow", function(self) Wholly:ConfigFrame_OnShow(self) end)
-- local com_mithrandir_whollyWidePanelConfigFrame = CreateFrame("Frame", nil, InterfaceOptionsFramePanelContainer)
-- com_mithrandir_whollyWidePanelConfigFrame:SetScript("OnShow", function(self) Wholly:ConfigFrame_OnShow(self) end)
-- local com_mithrandir_whollyLoadDataConfigFrame = CreateFrame("Frame", nil, InterfaceOptionsFramePanelContainer)
-- com_mithrandir_whollyLoadDataConfigFrame:SetScript("OnShow", function(self) Wholly:ConfigFrame_OnShow(self) end)
-- local com_mithrandir_whollyOtherConfigFrame = CreateFrame("Frame", nil, InterfaceOptionsFramePanelContainer)
-- com_mithrandir_whollyOtherConfigFrame:SetScript("OnShow", function(self) Wholly:ConfigFrame_OnShow(self) end)
self:ConfigFrame_OnLoad(com_mithrandir_whollyConfigFrame, "Wholly")
self:ConfigFrame_OnLoad(com_mithrandir_whollyTitleAppearanceConfigFrame, Wholly.s.TITLE_APPEARANCE, "Wholly")
self:ConfigFrame_OnLoad(com_mithrandir_whollyWorldMapConfigFrame, Wholly.s.WORLD_MAP, "Wholly")
self:ConfigFrame_OnLoad(com_mithrandir_whollyWidePanelConfigFrame, Wholly.s.WIDE_PANEL, "Wholly")
self:ConfigFrame_OnLoad(com_mithrandir_whollyLoadDataConfigFrame, Wholly.s.LOAD_DATA, "Wholly")
self:ConfigFrame_OnLoad(com_mithrandir_whollyOtherConfigFrame, Wholly.s.OTHER_PREFERENCE, "Wholly")
self:_SetupMapPinsProvider()
self:_SetupMapPinsProviderPin()
self:_SetupMapPinsPool() -- this needs to happen after calling _SetupMapPinsProviderPin() because it references items therein
self:_DisplayMapFrame(WDB.displaysMapFrame)
Grail:RegisterObserver("Status", self._CallbackHandler)
Grail:RegisterObserverQuestAbandon(self._CallbackHandler)
-- Find out which "map area" is for the player's class
for key, value in pairs(Grail.classMapping) do
if Grail.playerClass == value then
self.playerClassMap = Grail.classToMapAreaMapping['C'..key]
end
end
self:UpdateCoordinateSystem() -- installs OnUpdate script appropriately
frame:RegisterEvent("PLAYER_ENTERING_WORLD")
frame:RegisterEvent("QUEST_ACCEPTED")
frame:RegisterEvent("QUEST_COMPLETE") -- to clear the breadcrumb frame
frame:RegisterEvent("QUEST_GREETING") -- to clear the breadcrumb frame
frame:RegisterEvent("QUEST_LOG_UPDATE") -- just to be able update tooltips after reload UI
frame:RegisterEvent("QUEST_PROGRESS")
frame:RegisterEvent("ZONE_CHANGED_NEW_AREA") -- this is for the panel
self:UpdateBreadcrumb() -- sets up registration of events for breadcrumbs based on user preferences
if not WDB.shouldNotRestoreDirectionalArrows then
self:_ReinstateDirectionalArrows()
end
if WDB.loadReputationData then
self.configurationScript10()
end
if WDB.loadDateData then
self.configurationScript14()
end
-- if WDB.loadRewardData then
-- self.configurationScript15()
-- end
-- Execute the configurationScript appropriate for setting up specific WorldMapFrame settings
if Grail.capabilities.usesFlightPoints then self.configurationScript19() end
if Grail.capabilities.usesCallingQuests then self.configurationScript20() end
if Grail.capabilities.usesCampaignQuests then self.configurationScript21() end
if Grail.capabilities.usesWorldQuests then self.configurationScript22() end
-- We steal the TomTom:RemoveWaypoint() function because we want to override it ourselves
if TomTom and TomTom.RemoveWaypoint then
self.removeWaypointFunction = TomTom.RemoveWaypoint
TomTom.RemoveWaypoint = function(self, uid)
Wholly:_RemoveDirectionalArrows(uid)
Wholly.removeWaypointFunction(TomTom, uid)
end
end
if TomTom and TomTom.ClearAllWaypoints then
self.clearAllWaypointsFunction = TomTom.ClearAllWaypoints
TomTom.ClearAllWaypoints = function(self)
Wholly:_RemoveAllDirectionalArrows()
Wholly.clearAllWaypointsFunction(TomTom)
end
end
-- We steal Carbonite's Nx.TTRemoveWaypoint() function because we need it to clear our waypoints
if Nx and Nx.TTRemoveWaypoint then
self.carboniteRemoveWaypointFunction = Nx.TTRemoveWaypoint
Nx.TTRemoveWaypoint = function(self, uid)
Wholly:_RemoveDirectionalArrows(uid)
Wholly.carboniteRemoveWaypointFunction(Nx, uid)
end
end
self.easyMenuFrame = CreateFrame("Frame", "com_mithrandir_whollyEasyMenu", self.currentFrame, "UIDropDownMenuTemplate")
self.easyMenuFrame:Hide()
StaticPopupDialogs["com_mithrandir_whollyTagDelete"] = {
text = CONFIRM_COMPACT_UNIT_FRAME_PROFILE_DELETION,
button1 = ACCEPT,
button2 = CANCEL,
OnAccept = function(self, tagName)
WhollyDatabase.tags[tagName] = nil
Wholly:ScrollFrameTwo_Update()
end,
timeout = 0,
whileDead = true,
hideOnEscape = true,
preferredIndex = 3,
}
self:_InitializeLevelOneData()
if WDB.useWidePanel then self:ToggleCurrentFrame() end
-- end -- matching the if arg1 == "Wholly" then
end,