-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathBetterBlizzPlates.lua
5870 lines (5159 loc) · 253 KB
/
BetterBlizzPlates.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
-- I did not know what a variable was when I started. I know a little bit more now and I am so sorry.
local LSM = LibStub("LibSharedMedia-3.0")
LSM:Register("statusbar", "Dragonflight (BBP)", [[Interface\Addons\BetterBlizzPlates\media\DragonflightTexture]])
LSM:Register("statusbar", "Dragonflight HD (BBP)", [[Interface\Addons\BetterBlizzPlates\media\DragonflightTextureHD]])
LSM:Register("statusbar", "Shattered DF (BBP)", [[Interface\Addons\BetterBlizzPlates\media\focusTexture]])
LSM:Register("statusbar", "Checkered (BBP)", [[Interface\Addons\BetterBlizzPlates\media\targetTexture]])
LSM:Register("statusbar", "Smooth", [[Interface\Addons\BetterBlizzPlates\media\smooth]])
LSM:Register("font", "Yanone (BBP)", [[Interface\Addons\BetterBlizzPlates\media\YanoneKaffeesatz-Medium.ttf]])
LSM:Register("font", "Prototype", [[Interface\Addons\BetterBlizzPlates\media\Prototype.ttf]])
local addonVersion = "1.00" --too afraid to to touch for now
local addonUpdates = "1.6.8d"
local sendUpdate = false
BBP.VersionNumber = addonUpdates
local _, playerClass
local playerClassColor
local RAID_CLASS_COLORS = RAID_CLASS_COLORS
local UnitName = UnitName
local UnitIsUnit = UnitIsUnit
local UnitIsPlayer = UnitIsPlayer
local UnitGUID = UnitGUID
local UnitClassBase = UnitClassBase
local UnitReaction = UnitReaction
local InCombatLockdown = InCombatLockdown
local IsInInstance = IsInInstance
local IsActiveBattlefieldArena = IsActiveBattlefieldArena
BBP.variablesLoaded = false
BBP.OverlayFrame = CreateFrame("Frame", nil, WorldFrame)
local defaultSettings = {
version = addonVersion,
updates = "empty",
wasOnLoadingScreen = true,
setCVarAcrossAllCharacters = true,
-- General
removeRealmNames = true,
hideNameplateAuras = false,
hideTargetHighlight = false,
nameplateShowEnemyMinus = nil,
enemyNameplateHealthbarHeight = nil,
fadeOutNPC = false,
hideNPC = false,
hideNPCWhitelistOn = false,
hideNPCArenaOnly = false,
colorNPC = false,
colorNPCName = false,
raidmarkIndicator = false,
raidmarkIndicatorScale = 1,
raidmarkIndicatorAnchor = "TOP",
raidmarkIndicatorXPos = 0,
raidmarkIndicatorYPos = 0,
customTexture = "Dragonflight (BBP)",
customTextureFriendly = "Dragonflight (BBP)",
customTextureSelf = "Solid",
customTextureSelfMana = "Solid",
customFont = "Yanone (BBP)",
friendlyHideHealthBarNpc = true,
nameplateResourceScale = 0.7,
darkModeNameplateColor = 0.2,
fakeNameXPos = 0,
fakeNameYPos = 0,
fakeNameFriendlyXPos = 0,
fakeNameFriendlyYPos = 0,
fakeNameAnchor = "BOTTOM",
fakeNameAnchorRelative = "TOP",
fakeNameScaleWithParent = false,
fakeNameRaiseStrata = true,
guildNameColorRGB = {0, 1, 0},
npcTitleColorRGB = {1, 0.85, 0},
npcTitleScale = 1,
hideNpcMurlocScale = 1,
hideNpcMurlocYPos = 0,
partyPointerWidth = 36,
changeHealthbarHeight = false,
hpHeightEnemy = 4 * tonumber(GetCVar("NamePlateVerticalScale")),
hpHeightFriendly = 4 * tonumber(GetCVar("NamePlateVerticalScale")),
druidOverstacks = true,
personalBarPosition = 0.5,
alwaysShowPurgeTexture = true,
--health numbers
healthNumbersPlayers = true,
healthNumbersNpcs = true,
healthNumbers = false,
healthNumbersAnchor = "CENTER",
healthNumbersXPos = 0,
healthNumbersYPos = 0,
healthNumbersScale = 1,
healthNumbersFontOutline = "THICKOUTLINE",
nameplateBorderSize = 1,
nameplateTargetBorderSize = 3,
tankFullAggroColorRGB = {0, 1, 0, 1},
tankNoAggroColorRGB = {1, 0, 0, 1},
dpsOrHealFullAggroColorRGB = {1, 0, 0, 1},
dpsOrHealNoAggroColorRGB = {0, 1, 0, 1},
npBgColorRGB = {1, 1, 1, 1},
-- Enemy
enemyClassColorName = false,
showNameplateCastbarTimer = false,
showNameplateTargetText = false,
enemyNameScale = 1,
nameplateEnemyWidth = nil,
nameplateEnemyHeight = nil,
enemyHealthBarColorRGB = {1, 0, 0},
enemyNeutralHealthBarColorRGB = {1, 1, 0},
enemyColorNameRGB = {1, 0, 0},
enemyNeutralColorNameRGB = {1, 1, 0},
useCustomTextureForEnemy = true,
-- Friendly
friendlyNameplateClickthrough = false,
friendlyClassColorName = false,
friendlyNameScale = 1,
friendlyNameplatesOnlyInArena = false,
friendlyHealthBarColorRGB = {0, 1, 0},
guildNameScale = 1,
useCustomTextureForFriendly = true,
-- Nameplate Border
npBorderTargetColorRGB = {1, 1, 1, 1},
npBorderEnemyColorRGB = {1, 0, 0, 1},
npBorderFriendlyColorRGB = {0, 1, 0, 1},
npBorderNeutralColorRGB = {1, 1, 0, 1},
npBorderNpcColorRGB = {0, 0, 0, 1},
npBorderNonTargetColorRGB = {0, 0, 0, 1},
-- Bg Indicator
bgIndicatorAnchor = "BOTTOM",
bgIndicatorScale = 1,
bgIndicatorXPos = 0,
bgIndicatorYPos = 0,
bgIndicatorEnemyOnly = true,
bgIndicatorShowOrbs = true,
bgIndicatorShowFlags = true,
-- Arena Indicator
arenaIndicatorTestMode = false,
arenaIDScale = 1,
arenaSpecScale = 1,
arenaIndicatorModeOff = false,
arenaIndicatorModeOne = false,
arenaIndicatorModeTwo = false,
arenaIndicatorModeThree = false,
arenaIndicatorModeFour = false,
arenaIndicatorModeFive = false,
arenaIndicatorBg = true,
partyIDScale = 1,
partySpecScale = 1,
partyIndicatorModeOff = false,
partyIndicatorModeOne = false,
partyIndicatorModeTwo = false,
partyIndicatorModeThree = false,
partyIndicatorModeFour = false,
partyIndicatorModeFive = false,
arenaIdXPos = 0,
arenaIdYPos = 0,
arenaSpecXPos = 0,
arenaSpecYPos = 0,
arenaIdAnchor = "TOP",
arenaSpecAnchor = "TOP",
-- Absorb Indicator
absorbIndicatorTestMode = false,
absorbIndicator = false,
absorbIndicatorEnemyOnly = false,
absorbIndicatorOnPlayersOnly = true,
absorbIndicatorScale = 1,
absorbIndicatorXPos = 0,
absorbIndicatorYPos = 0,
absorbIndicatorAnchor = "LEFT",
-- Combat Indicator
combatIndicator = false,
combatIndicatorSap = false,
combatIndicatorEnemyOnly = false,
combatIndicatorPlayersOnly = true,
combatIndicatorArenaOnly = false,
combatIndicatorScale = 1,
combatIndicatorXPos = 0,
combatIndicatorYPos = 0,
combatIndicatorAnchor = "CENTER",
-- Execute Indicator
executeIndicator = false,
executeIndicatorTestMode = false,
executeIndicatorAnchor = "LEFT",
executeIndicatorScale = 1,
executeIndicatorXPos = 0,
executeIndicatorYPos = 0,
executeIndicatorThreshold = 40,
executeIndicatorAlwaysOn = false,
executeIndicatorNotOnFullHp = false,
executeIndicatorFriendly = false,
executeIndicatorShowDecimal = true,
-- Healer Indicator
healerIndicator = false,
healerIndicatorEnemyOnly = false,
healerIndicatorScale = 1,
healerIndicatorXPos = 0,
healerIndicatorYPos = 0,
healerIndicatorAnchor = "TOPRIGHT",
healerIndicatorTestMode = false,
healerIndicatorEnemyXPos = 0,
healerIndicatorEnemyYPos = 0,
healerIndicatorEnemyAnchor = "TOPRIGHT",
healerIndicatorEnemyScale = 1,
-- Class Icon
classIndicator = false,
classIndicatorXPos = 0,
classIndicatorFriendlyXPos = 0,
classIndicatorYPos = 0,
classIndicatorFriendlyYPos = 0,
classIndicatorAnchor = "TOP",
classIndicatorFriendlyAnchor = "TOP",
classIndicatorScale = 1,
classIndicatorFriendlyScale = 1,
classIndicatorEnemy = true,
classIndicatorFriendly = true,
classIconColorBorder = true,
classIndicatorHideRaidMarker = true,
-- Party Pointer
partyPointerXPos = 0,
partyPointerYPos = 0,
partyPointerScale = 1,
partyPointerHealerScale = 1,
partyPointerAnchor = "TOP",
partyPointerClassColor = true,
partyPointerHideRaidmarker = true,
partyPointerArenaOnly = true,
-- Pet Indicator
petIndicator = false,
petIndicatorScale = 1,
petIndicatorXPos = 0,
petIndicatorYPos = 0,
petIndicatorAnchor = "CENTER",
petIndicatorTestMode = false,
-- Target Indicator
targetIndicator = false,
targetIndicatorScale = 1,
targetIndicatorXPos = 0,
targetIndicatorYPos = 0,
targetIndicatorAnchor = "TOP",
targetIndicatorTestMode = false,
targetIndicatorColorNameplateRGB = {1, 0, 0.44},
targetIndicatorTexture = "Checkered (BBP)",
-- Focus Target Indicator
focusTargetIndicator = false,
focusTargetIndicatorScale = 1,
focusTargetIndicatorXPos = 0,
focusTargetIndicatorYPos = 0,
focusTargetIndicatorAnchor = "TOPRIGHT",
focusTargetIndicatorTestMode = false,
focusTargetIndicatorColorNameplate = false,
focusTargetIndicatorColorNameplateRGB = {1, 1, 1},
focusTargetIndicatorTexture = "Shattered DF (BBP)",
-- Totem Indicator
totemIndicator = false,
totemIndicatorColorName = true,
totemIndicatorColorHealthBar = true,
totemIndicatorScale = 1,
totemIndicatorXPos = 0,
totemIndicatorYPos = 0,
totemIndicatorAnchor = "TOP",
totemIndicatorScaleUpImportant = false,
totemIndicatorHideNameAndShiftIconDown = false,
totemIndicatorTestMode = false,
totemIndicatorEnemyOnly = true,
totemIndicatorDefaultCooldownTextSize = 0.85,
showTotemIndicatorCooldownSwipe = true,
totemIndicatorHideAuras = false,
totemIndicatorNpcList = {
[59764] = { name = "Healing Tide Totem", icon = C_Spell.GetSpellTexture(108280), hideIcon = false, size = 30, duration = 10, color = {0, 1, 0.39}, important = true },
[59712] = { name = "Stone Bulwark Totem", icon = C_Spell.GetSpellTexture(108270), hideIcon = false, size = 30, duration = 30, color = {0.98, 0.75, 0.17}, important = true },
[5925] = { name = "Grounding Totem", icon = C_Spell.GetSpellTexture(204336), hideIcon = false, size = 30, duration = 3, color = {1, 0, 1}, important = true },
[53006] = { name = "Spirit Link Totem", icon = C_Spell.GetSpellTexture(98008), hideIcon = false, size = 30, duration = 6, color = {0, 1, 0.78}, important = true },
[5913] = { name = "Tremor Totem", icon = C_Spell.GetSpellTexture(8143), hideIcon = false, size = 30, duration = 13, color = {0.49, 0.9, 0.08}, important = true },
[104818] = { name = "Ancestral Protection Totem", icon = C_Spell.GetSpellTexture(207399), hideIcon = false, size = 30, duration = 33, color = {0, 1, 0.78}, important = true },
[119052] = { name = "War Banner", icon = C_Spell.GetSpellTexture(236320), hideIcon = false, size = 30, duration = 15, color = {1, 0, 1}, important = true },
[61245] = { name = "Capacitor Totem", icon = C_Spell.GetSpellTexture(192058), hideIcon = false, size = 30, duration = 2, color = {1, 0.69, 0}, important = true },
[105451] = { name = "Counterstrike Totem", icon = C_Spell.GetSpellTexture(204331), hideIcon = false, size = 30, duration = 15, color = {1, 0.27, 0.59}, important = true },
[101398] = { name = "Psyfiend", icon = C_Spell.GetSpellTexture(199824), hideIcon = false, size = 35, duration = 12, color = {0.49, 0, 1}, important = true },
[225672] = { name = "Shadow", icon = C_Spell.GetSpellTexture(8122), hideIcon = false, size = 35, duration = 4, color = {0.78, 0.48, 1}, important = true },
[100943] = { name = "Earthen Wall Totem", icon = C_Spell.GetSpellTexture(198838), hideIcon = false, size = 30, duration = 18, color = {0.78, 0.49, 0.35}, important = true },
[107100] = { name = "Observer", icon = C_Spell.GetSpellTexture(112869), hideIcon = false, size = 30, duration = 20, color = {1, 0.69, 0}, important = true },
[135002] = { name = "Tyrant", icon = C_Spell.GetSpellTexture(265187), hideIcon = false, size = 30, duration = 15, color = {1, 0.69, 0}, important = true },
[114565] = { name = "Guardian of the Forgotten Queen", icon = C_Spell.GetSpellTexture(228049), hideIcon = false, size = 30, duration = 10, color = {1, 0, 1}, important = true },
[107024] = { name = "Fel Lord", icon = C_Spell.GetSpellTexture(212459), hideIcon = false, size = 30, duration = 15, color = {1, 0.69, 0}, important = true },
-- Less important
[224466] = { name = "Voidwrath", icon = C_Spell.GetSpellTexture(451234), hideIcon = false, size = 24, duration = 15, color = {1, 0.69, 0}, important = false },
[89] = { name = "Infernal", icon = C_Spell.GetSpellTexture(1122), hideIcon = false, size = 24, duration = 30, color = {1, 0.69, 0}, important = false },
[196111] = { name = "Pit Lord", icon = C_Spell.GetSpellTexture(138789), hideIcon = false, size = 24, duration = 10, color = {1, 0.69, 0}, important = false },
[3527] = { name = "Healing Stream Totem", icon = C_Spell.GetSpellTexture(5394), hideIcon = false, size = 24, duration = 18, color = {0, 1, 0.78}, important = false },
[78001] = { name = "Cloudburst Totem", icon = C_Spell.GetSpellTexture(157153), hideIcon = false, size = 24, duration = 15, color = {0, 1, 0.39}, important = false },
[10467] = { name = "Mana Tide Totem", icon = C_Spell.GetSpellTexture(16191), hideIcon = false, size = 24, duration = 8, color = {0.08, 0.82, 0.78}, important = false },
[97285] = { name = "Wind Rush Totem", icon = C_Spell.GetSpellTexture(192077), hideIcon = false, size = 24, duration = 18, color = {0.08, 0.82, 0.78}, important = false },
[60561] = { name = "Earthgrab Totem", icon = C_Spell.GetSpellTexture(51485), hideIcon = false, size = 24, duration = 30, color = {0.75, 0.31, 0.10}, important = false },
[2630] = { name = "Earthbind Totem", icon = C_Spell.GetSpellTexture(2484), hideIcon = false, size = 24, duration = 30, color = {0.78, 0.51, 0.39}, important = false },
[105427] = { name = "Totem of Wrath", icon = C_Spell.GetSpellTexture(204330), hideIcon = false, size = 24, duration = 15, color = {1, 0.27, 0.59}, important = false },
[97369] = { name = "Liquid Magma Totem", icon = C_Spell.GetSpellTexture(192222), hideIcon = false, size = 24, duration = 6, color = {1, 0.69, 0}, important = false },
[62982] = { name = "Mindbender", icon = C_Spell.GetSpellTexture(123040), hideIcon = false, size = 24, duration = 15, color = {1, 0.69, 0}, important = false },
[19668] = { name = "Shadowfiend", icon = C_Spell.GetSpellTexture(34433), hideIcon = false, size = 24, duration = 15, color = {1, 0.69, 0}, important = false },
[179867] = { name = "Static Field Totem", icon = C_Spell.GetSpellTexture(355580), hideIcon = false, size = 24, duration = 6, color = {0, 1, 0.78}, important = false },
[194117] = { name = "Stoneskin Totem", icon = C_Spell.GetSpellTexture(383017), hideIcon = false, size = 24, duration = 15, color = {0.78, 0.49, 0.35}, important = false },
[5923] = { name = "Poison Cleansing Totem", icon = C_Spell.GetSpellTexture(383013), hideIcon = false, size = 24, duration = 9, color = {0.49, 0.9, 0.08}, important = false },
[194118] = { name = "Tranquil Air Totem", icon = C_Spell.GetSpellTexture(383019), hideIcon = false, size = 24, duration = 20, color = {0, 1, 0.78}, important = false },
[225409] = { name = "Surging Totem", icon = C_Spell.GetSpellTexture(444995), hideIcon = false, size = 24, duration = 24, color = {1, 0.36, 0}, important = false },
[65282] = { name = "Void Tendril", icon = C_Spell.GetSpellTexture(108920), hideIcon = false, size = 24, duration = 6, color = {0.33, 0.35, 1}, important = false },
[185800] = { name = "Past Self", icon = C_Spell.GetSpellTexture(371869), hideIcon = false, size = 24, duration = 8, color = {1, 0, 0}, important = false }
},
-- Quest Indicator
questIndicator = false,
questIndicatorScale = 1,
questIndicatorXPos = 0,
questIndicatorYPos = 0,
questIndicatorAnchor = "LEFT",
questIndicatorTestMode = false,
-- Font and texture
customFontSizeEnabled = false,
customFontSize = 12,
useCustomFont = false,
enableCustomFontOutline = true,
customFontOutline = "THINOUTLINE",
useCustomTextureForBars = false,
-- Castbar
enableCastbarCustomization = false,
showCastBarIconWhenNoninterruptible = false,
enableCastbarEmphasis = false,
castBarEmphasisOnlyInterruptable = false,
castBarEmphasisColor = false,
castBarEmphasisIcon = false,
castBarEmphasisText = false,
castBarEmphasisHeight = false,
castBarEmphasisIconScale = 2,
castBarEmphasisTextScale = 2,
castBarEmphasisHeightValue = 24,
castBarEmphasisSparkHeight = 35,
castBarEmphasisHealthbarColor = false,
castBarDragonflightShield = true,
castBarShieldAnchor = "LEFT",
castBarShieldXPos = 0,
castBarShieldYPos = 0,
castBarShieldScale = 1,
castBarIconScale = 1,
castBarIconAnchor = "LEFT",
castBarIconXPos = 0,
castBarIconYPos = 0,
castBarTextScale = 1,
showCastbarIfTarget = false,
castBarRecolor = false,
castBarRecolorInterrupt = false,
castBarCastColor = {
1,
0.8431373238563538,
0.2000000178813934,
},
castBarChanneledColor = {
0.4862745404243469,
1,
0.294117659330368,
},
castBarNoninterruptibleColor = {
0.4,
0.4,
0.4,
},
castBarNoInterruptColor = {
1,
0,
0.01568627543747425,
},
castBarDelayedInterruptColor = {
1,
0.4784314036369324,
0.9568628072738647,
},
castBarBackgroundColor = {0.33,0.33,0.33,1},
-- Nameplate aura settings
enableNameplateAuraCustomisation = false,
nameplateAurasCenteredAnchor = false,
maxAurasOnNameplate = 12,
nameplateAuraRowAmount = 5,
targetNameplateAuraScale = 1,
nameplateAuraCountScale = 1,
--nameplateAuraRowFriendlyAmount = 5,
nameplateAuraSquare = false,
nameplateAuraTaller = false,
nameplateAuraRowAbove = true,
nameplateAuraHeightGap = 4,
nameplateAuraWidthGap = 4,
nameplateAurasYPos = 0,
nameplateAurasXPos = 0,
nameplateAuraAnchor = "BOTTOMLEFT",
nameplateAuraRelativeAnchor = "TOPLEFT",
nameplateAurasNoNameYPos = 0,
nameplateAuraScale = 1,
hideDefaultPersonalNameplateAuras = false,
defaultNpAuraCdSize = 0.5,
onlyPandemicAuraMine = true,
nameplateAuraEnlargedScale = 1,
nameplateAuraCompactedScale = 1,
nameplateAuraEnlargedSquare = true,
nameplateAuraCompactedSquare = true,
nameplateAuraBuffScale = 1,
nameplateAuraDebuffScale = 1,
sortEnlargedAurasFirst = true,
npAuraDiseaseRGB = {1,0.53,0.14},
npAuraOtherRGB = {0,0,0},
npAuraCurseRGB = {0.47,0,0.78},
npAuraBuffsRGB = {0,0.67,1},
npAuraPoisonRGB = {0,0.52,0.031},
npAuraMagicRGB = {0.13,0.44,1},
personalNpBuffEnable = true,
personalNpBuffFilterAll = false,
personalNpBuffFilterBlizzard = true,
personalNpBuffFilterWatchList = true,
personalNpBuffFilterLessMinite = false,
personalNpBuffFilterOnlyMe = false,
personalNpdeBuffEnable = false,
personalNpdeBuffFilterAll = false,
personalNpdeBuffFilterWatchList = true,
personalNpdeBuffFilterLessMinite = false,
otherNpBuffEnable = false,
otherNpBuffFilterAll = false,
otherNpBuffFilterWatchList = true,
otherNpBuffFilterLessMinite = false,
otherNpBuffPurgeGlow = false,
otherNpBuffBlueBorder = false,
otherNpBuffEmphasisedBorder = false,
otherNpdeBuffEnable = true,
otherNpdeBuffFilterAll = false,
otherNpdeBuffFilterBlizzard = true,
otherNpdeBuffFilterWatchList = true,
otherNpdeBuffFilterLessMinite = false,
otherNpdeBuffFilterOnlyMe = false,
otherNpdeBuffPandemicGlow = false,
friendlyNpBuffEnable = false,
friendlyNpBuffFilterAll = false,
friendlyNpBuffFilterWatchList = false,
friendlyNpBuffFilterLessMinite = false,
friendlyNpBuffFilterOnlyMe = false,
friendlyNpBuffPurgeGlow = false,
friendlyNpBuffBlueBorder = false,
friendlyNpBuffEmphasisedBorder = false,
friendlyNpdeBuffEnable = false,
friendlyNpdeBuffFilterAll = false,
friendlyNpdeBuffFilterBlizzard = false,
friendlyNpdeBuffFilterWatchList = false,
friendlyNpdeBuffFilterLessMinite = false,
friendlyNpdeBuffFilterOnlyMe = false,
personalNpBuffFilterBlacklist = true,
personalNpdeBuffFilterBlacklist = true,
friendlyNpBuffFilterBlacklist = true,
friendlyNpdeBuffFilterBlacklist = true,
otherNpBuffFilterBlacklist = true,
otherNpdeBuffFilterBlacklist = true,
testAllEnabledFeatures = false,
-- Default values for resets
nameplateDefaultFriendlyWidth = 110,
nameplateDefaultLargeFriendlyWidth = 154,
nameplateDefaultFriendlyHeight = 45,
nameplateDefaultLargeFriendlyHeight = 64.125,
nameplateDefaultEnemyWidth = 110,
nameplateDefaultLargeEnemyWidth = 154,
nameplateDefaultEnemyHeight = 45,
nameplateDefaultLargeEnemyHeight = 64.125,
nameplateNonTargetAlpha = 0.5,
enableNpNonTargetAlphaTargetOnly = true,
-- Fade out NPCs
fadeOutNPCsAlpha = 0.2,
defaultFadeOutNPCsList = {
{name = "DK pet", id = 26125, comment = ""},
{name = "Magus(Army of the Dead)", id = 163366, comment = ""},
{name = "Army of the Dead", id = 24207, comment = ""},
--{name = "Felguard (Demo Pet)", id = 17252, comment = ""},
--{name = "Hunter pet (they all have same ID)", id = 165189, comment = ""},
{name = "Spirit Wolves (Enha Shaman)", id = 29264, comment = ""},
{name = "Earth Elemental (Shaman)", id = 95072, comment = ""},
{name = "Mirror Images (Mage)", id = 31216, comment = ""},
{name = "Beast (Hunter)", id = 62005, comment = ""},
{name = "Dire Basilisk (Hunter)", id = 105419, comment = ""},
{name = "Void Tendril (Spriest)", id = 192337, comment = ""},
{name = "Illidari Satyr", id = 136398, comment = ""},
{name = "Darkhound", id = 136408, comment = ""},
{name = "Void Terror", id = 136403, comment = ""},
{name = "Treant", id = 54983, comment = ""},
},
hideNPCsList = {
{name = "Mirror Images (Mage)", id = 31216, comment = ""},
{name = "Wild Imp (Warlock)", id = 55659, comment = ""},
{name = "Wild Imp (Warlock)", id = 143622, comment = ""},
},
hideNPCsWhitelist = {
{name = "Hunter Pet (they all have same ID)", id = 165189, comment = ""},
{name = "Healing Tide Totem", id = 59764, comment = ""},
{name = "Grounding Totem", id = 5925, comment = ""},
{name = "Spirit Link Totem", id = 53006, comment = ""},
{name = "Tremor Totem", id = 5913, comment = ""},
{name = "Ancestral Protection Totem", id = 104818, comment = ""},
{name = "War Banner", id = 119052, comment = ""},
{name = "Capacitor Totem", id = 61245, comment = ""},
{name = "Counterstrike Totem", id = 105451, comment = ""},
{name = "Psyfiend (Spriest)", id = 101398, comment = ""},
{name = "Earthen Wall Totem", id = 100943, comment = ""},
{name = "Observer (Warlock)", id = 107100, comment = ""},
{name = "Tyrant (Warlock)", id = 135002, comment = ""},
{name = "Guardian Queen (prot pala)", id = 114565, comment = ""},
{name = "Healing Stream Totem", id = 3527, comment = ""},
{name = "Cloudburst Totem", id = 78001, comment = ""},
{name = "Mana Tide Totem", id = 10467, comment = ""},
{name = "Wind Rush Totem", id = 97285, comment = ""},
{name = "Earthgrab Totem", id = 60561, comment = ""},
{name = "Earthbind Totem", id = 2630, comment = ""},
{name = "Totem of Wrath", id = 105427, comment = ""},
{name = "Liquid Magma Totem", id = 97369, comment = ""},
{name = "Mindbender", id = 62982, comment = ""},
{name = "Static Field Totem", id = 179867, comment = ""},
{name = "Stoneskin Totem", id = 194117, comment = ""},
{name = "Poison Cleansing Totem", id = 5923, comment = ""},
{name = "Tranquil Air Totem", id = 194118, comment = ""},
{name = "Felguard (Demo Pet)", id = 17252, comment = ""},
{name = "Felhunter (Warlock)", id = 417, comment = ""},
{name = "Succubus (Warlock)", id = 1863, comment = ""},
{name = "Infernal (Warlock)", id = 89, comment = ""},
{name = "Stone Bulwark Totem", id = 59712, comment = ""},
{name = "Shadow (Priest Re-Fear)", id = 225672, comment = ""},
{name = "Voidwrath (Priest)", id = 224466, comment = ""},
{name = "Shadowfiend", id = 19668, comment = ""},
{name = "Surging Totem", id = 225409, comment = ""}
},
fadeOutNPCsWhitelist = {
{name = "Hunter Pet (they all have same ID)", id = 165189, comment = ""},
{name = "Healing Tide Totem", id = 59764, comment = ""},
{name = "Grounding Totem", id = 5925, comment = ""},
{name = "Spirit Link Totem", id = 53006, comment = ""},
{name = "Tremor Totem", id = 5913, comment = ""},
{name = "Ancestral Protection Totem", id = 104818, comment = ""},
{name = "War Banner", id = 119052, comment = ""},
{name = "Capacitor Totem", id = 61245, comment = ""},
{name = "Counterstrike Totem", id = 105451, comment = ""},
{name = "Psyfiend (Spriest)", id = 101398, comment = ""},
{name = "Earthen Wall Totem", id = 100943, comment = ""},
{name = "Observer (Warlock)", id = 107100, comment = ""},
{name = "Tyrant (Warlock)", id = 135002, comment = ""},
{name = "Guardian Queen (prot pala)", id = 114565, comment = ""},
{name = "Healing Stream Totem", id = 3527, comment = ""},
{name = "Cloudburst Totem", id = 78001, comment = ""},
{name = "Mana Tide Totem", id = 10467, comment = ""},
{name = "Wind Rush Totem", id = 97285, comment = ""},
{name = "Earthgrab Totem", id = 60561, comment = ""},
{name = "Earthbind Totem", id = 2630, comment = ""},
{name = "Totem of Wrath", id = 105427, comment = ""},
{name = "Liquid Magma Totem", id = 97369, comment = ""},
{name = "Mindbender", id = 62982, comment = ""},
{name = "Static Field Totem", id = 179867, comment = ""},
{name = "Stoneskin Totem", id = 194117, comment = ""},
{name = "Poison Cleansing Totem", id = 5923, comment = ""},
{name = "Tranquil Air Totem", id = 194118, comment = ""},
{name = "Felguard (Demo Pet)", id = 17252, comment = ""},
{name = "Felhunter (Warlock)", id = 417, comment = ""},
{name = "Succubus (Warlock)", id = 1863, comment = ""},
{name = "Infernal (Warlock)", id = 89, comment = ""},
{name = "Stone Bulwark Totem", id = 59712, comment = ""},
{name = "Shadow (Priest Re-Fear)", id = 225672, comment = ""},
{name = "Voidwrath (Priest)", id = 224466, comment = ""},
{name = "Shadowfiend", id = 19668, comment = ""},
{name = "Surging Totem", id = 225409, comment = ""}
},
hideCastbarList = {},
hideCastbarWhitelist = {},
colorNpcList = {},
auraWhitelist = {
{["name"] = "Example Aura :3 (delete me)",
["entryColors"] = {
["text"] = {
["b"] = 0,
["g"] = 1,
["r"] = 0,
},
},}
},
auraBlacklist = {},
auraColorList = {},
friendlyColorNameRGB = {1, 1, 1},
castEmphasisList = {
{name = "Cyclone"},
{name = "Polymorph"},
{name = "Sleep Walk"},
{name = "Fear"},
{name = "Repentance"},
{name = "Hex"},
{name = "Ring of Frost"},
{name = "Mass Polymorph"},
{name = "Shadowfury"},
{name = "Haymaker"},
{name = "Lightning Lasso"},
{name = "Song of Chi-Ji"},
},
castBarInterruptHighlighter = false,
castBarInterruptHighlighterColorDontInterrupt = false,
castBarInterruptHighlighterInterruptRGB = {0, 1, 0},
castBarInterruptHighlighterDontInterruptRGB = {0, 0, 0},
castBarInterruptHighlighterStartTime = 0.8,
castBarInterruptHighlighterEndTime = 0.6,
nameplateResourceXPos = 0,
nameplateResourceYPos = 0,
}
local function InitializeSavedVariables()
if not BetterBlizzPlatesDB then
BetterBlizzPlatesDB = {}
end
-- Check the stored version against the current addon version
if not BetterBlizzPlatesDB.version or BetterBlizzPlatesDB.version ~= addonVersion then
-- Perform database update here (if needed)
if not BetterBlizzPlatesDB.fadeOutNPCsList then
BetterBlizzPlatesDB.fadeOutNPCsList = defaultSettings.defaultFadeOutNPCsList
else
-- Check if any new NPC IDs need to be added to the user's list
for _, defaultNPC in ipairs(defaultSettings.defaultFadeOutNPCsList) do
local isFound = false
for _, userNPC in ipairs(BetterBlizzPlatesDB.fadeOutNPCsList) do
if defaultNPC.id == userNPC.id then
isFound = true
break
end
end
if not isFound then
table.insert(BetterBlizzPlatesDB.fadeOutNPCsList, defaultNPC)
end
end
end
BetterBlizzPlatesDB.version = addonVersion -- Update the version number in the database
end
if not BetterBlizzPlatesDB.classIndicatorFriendlyYPos then
BetterBlizzPlatesDB.classIndicatorFriendlyXPos = BetterBlizzPlatesDB.classIndicatorXPos
BetterBlizzPlatesDB.classIndicatorFriendlyYPos = BetterBlizzPlatesDB.classIndicatorYPos
BetterBlizzPlatesDB.classIndicatorFriendlyAnchor = BetterBlizzPlatesDB.classIndicatorAnchor
BetterBlizzPlatesDB.classIndicatorFriendlyScale = BetterBlizzPlatesDB.classIndicatorScale
end
if not BetterBlizzPlatesDB.healerIndicatorEnemyXPos then
BetterBlizzPlatesDB.healerIndicatorEnemyXPos = BetterBlizzPlatesDB.healerIndicatorXPos
BetterBlizzPlatesDB.healerIndicatorEnemyYPos = BetterBlizzPlatesDB.healerIndicatorYPos
BetterBlizzPlatesDB.healerIndicatorEnemyAnchor = BetterBlizzPlatesDB.healerIndicatorAnchor
BetterBlizzPlatesDB.healerIndicatorEnemyScale = BetterBlizzPlatesDB.healerIndicatorScale
end
if BetterBlizzPlatesDB.friendlyHealthBarColorPlayer == nil then
BetterBlizzPlatesDB.friendlyHealthBarColorPlayer = BetterBlizzPlatesDB.friendlyHealthBarColor
BetterBlizzPlatesDB.friendlyHealthBarColorNpc = BetterBlizzPlatesDB.friendlyHealthBarColor
end
if BetterBlizzPlatesDB.nameplateAuraRowFriendlyAmount == nil then
BetterBlizzPlatesDB.nameplateAuraRowFriendlyAmount = BetterBlizzPlatesDB.nameplateAuraRowAmount or 5
end
if BetterBlizzPlatesDB.alwaysHideFriendlyCastbar == nil then
BetterBlizzPlatesDB.alwaysHideFriendlyCastbar = BetterBlizzPlatesDB.hideFriendlyCastbar or false
end
for key, defaultValue in pairs(defaultSettings) do
if BetterBlizzPlatesDB[key] == nil then
BetterBlizzPlatesDB[key] = defaultValue
end
end
end
function BBP.ResetTotemList()
BetterBlizzPlatesDB.totemIndicatorNpcList = {}
BetterBlizzPlatesDB.totemIndicatorNpcList = defaultSettings.totemIndicatorNpcList
end
local function CVarFetcher()
if BBP.variablesLoaded then
local big = GetCVar("NamePlateHorizontalScale") == "1.4"
BetterBlizzPlatesDB.nameplateEnemyWidth, BetterBlizzPlatesDB.nameplateEnemyHeight = C_NamePlate.GetNamePlateEnemySize()
BetterBlizzPlatesDB.nameplateFriendlyWidth, BetterBlizzPlatesDB.nameplateFriendlyHeight = C_NamePlate.GetNamePlateFriendlySize()
BetterBlizzPlatesDB.nameplateSelfWidth, BetterBlizzPlatesDB.nameplateSelfHeight = C_NamePlate.GetNamePlateSelfSize()
BetterBlizzPlatesDB.nameplateEnemyWidth = big and 154 or 110
BetterBlizzPlatesDB.nameplateFriendlyWidth = big and 154 or 110
BetterBlizzPlatesDB.nameplateSelfWidth = big and 154 or 110
BetterBlizzPlatesDB.nameplateShowAll = GetCVar("nameplateShowAll")
BetterBlizzPlatesDB.nameplateOverlapH = GetCVar("nameplateOverlapH")
BetterBlizzPlatesDB.nameplateOverlapV = GetCVar("nameplateOverlapV")
BetterBlizzPlatesDB.nameplateMotionSpeed = GetCVar("nameplateMotionSpeed")
BetterBlizzPlatesDB.nameplateHorizontalScale = GetCVar("NamePlateHorizontalScale")
BetterBlizzPlatesDB.NamePlateVerticalScale = GetCVar("NamePlateVerticalScale")
BetterBlizzPlatesDB.nameplateMinScale = 0.9
BetterBlizzPlatesDB.nameplateMaxScale = 0.9
BetterBlizzPlatesDB.nameplateSelectedScale = GetCVar("nameplateSelectedScale")
BetterBlizzPlatesDB.NamePlateClassificationScale = GetCVar("NamePlateClassificationScale")
BetterBlizzPlatesDB.nameplateGlobalScale = GetCVar("nameplateGlobalScale")
BetterBlizzPlatesDB.nameplateLargerScale = GetCVar("nameplateLargerScale")
BetterBlizzPlatesDB.nameplatePlayerLargerScale = GetCVar("nameplatePlayerLargerScale")
BetterBlizzPlatesDB.nameplateResourceOnTarget = GetCVar("nameplateResourceOnTarget")
BetterBlizzPlatesDB.nameplateMinAlpha = GetCVar("nameplateMinAlpha")
BetterBlizzPlatesDB.nameplateMinAlphaDistance = GetCVar("nameplateMinAlphaDistance")
BetterBlizzPlatesDB.nameplateMaxAlpha = GetCVar("nameplateMaxAlpha")
BetterBlizzPlatesDB.nameplateMaxAlphaDistance = GetCVar("nameplateMaxAlphaDistance")
BetterBlizzPlatesDB.nameplateOccludedAlphaMult = GetCVar("nameplateOccludedAlphaMult")
BetterBlizzPlatesDB.nameplateMotion = GetCVar("nameplateMotion")
BetterBlizzPlatesDB.ShowClassColorInNameplate = GetCVar("ShowClassColorInNameplate")
BetterBlizzPlatesDB.ShowClassColorInFriendlyNameplate = GetCVar("ShowClassColorInFriendlyNameplate")
BetterBlizzPlatesDB.nameplateShowEnemyGuardians = GetCVar("nameplateShowEnemyGuardians")
BetterBlizzPlatesDB.nameplateShowEnemyMinions = GetCVar("nameplateShowEnemyMinions")
BetterBlizzPlatesDB.nameplateShowEnemyMinus = GetCVar("nameplateShowEnemyMinus")
BetterBlizzPlatesDB.nameplateShowEnemyPets = GetCVar("nameplateShowEnemyPets")
BetterBlizzPlatesDB.nameplateShowEnemyTotems = GetCVar("nameplateShowEnemyTotems")
BetterBlizzPlatesDB.nameplateShowFriendlyGuardians = GetCVar("nameplateShowFriendlyGuardians")
BetterBlizzPlatesDB.nameplateShowFriendlyMinions = GetCVar("nameplateShowFriendlyMinions")
BetterBlizzPlatesDB.nameplateShowFriendlyPets = GetCVar("nameplateShowFriendlyPets")
BetterBlizzPlatesDB.nameplateShowFriendlyTotems = GetCVar("nameplateShowFriendlyTotems")
BetterBlizzPlatesDB.nameplateShowFriendlyNPCs = GetCVar("nameplateShowFriendlyNPCs")
if GetCVar("NamePlateHorizontalScale") == "1.4" then
BetterBlizzPlatesDB.enemyNameplateHealthbarHeight = 10.8
BetterBlizzPlatesDB.castBarHeight = 18.8
BetterBlizzPlatesDB.largeNameplates = true
else
BetterBlizzPlatesDB.enemyNameplateHealthbarHeight = 4
BetterBlizzPlatesDB.castBarHeight = 8
BetterBlizzPlatesDB.largeNameplates = false
end
else
C_Timer.After(1, function()
CVarFetcher()
end)
end
end
local function FetchAndSaveValuesOnFirstLogin()
if BBP.variablesLoaded then
-- collect some cvars added at a later time
if not BetterBlizzPlatesDB.nameplateMinAlpha or not BetterBlizzPlatesDB.nameplateShowFriendlyMinions or not BetterBlizzPlatesDB.nameplateSelfWidth or not BetterBlizzPlatesDB.nameplateResourceOnTarget then
CVarFetcher()
end
if BetterBlizzPlatesDB.hasSaved then
if BetterBlizzPlatesDB.sendResetMessage then
DEFAULT_CHAT_FRAME:AddMessage("|A:gmchat-icon-blizz:16:16|aBetter|cff00c0ffBlizz|rPlates has been reset. If you are having any issues feel free to join the Discord. You'll find the link in the Support section /bbp")
BetterBlizzPlatesDB.sendResetMessage = nil
end
return
end
CVarFetcher()
C_Timer.After(5, function()
if not C_AddOns.IsAddOnLoaded("SkillCapped") then
DEFAULT_CHAT_FRAME:AddMessage("|A:gmchat-icon-blizz:16:16|aBetter|cff00c0ffBlizz|rPlates first run. Thank you for trying out my AddOn. Access settings with /bbp")
end
BetterBlizzPlatesDB.hasSaved = true
end)
else
C_Timer.After(1, function()
FetchAndSaveValuesOnFirstLogin()
end)
end
end
function BBP.CVarsAreSaved()
local db = BetterBlizzPlatesDB
if db.nameplateEnemyWidth and
db.nameplateFriendlyWidth and
db.nameplateSelfWidth and
db.nameplateOverlapH and
db.nameplateOverlapV and
db.nameplateMotionSpeed and
db.nameplateHorizontalScale and
db.NamePlateVerticalScale and
db.nameplateMinScale and
db.nameplateMaxScale and
db.nameplateSelectedScale and
db.NamePlateClassificationScale and
db.nameplateGlobalScale and
db.nameplateLargerScale and
db.nameplatePlayerLargerScale and
db.nameplateMinAlpha and
db.nameplateMinAlphaDistance and
db.nameplateMaxAlpha and
db.nameplateMaxAlphaDistance and
db.nameplateOccludedAlphaMult then
return true
else
return false
end
end
local function ResetNameplates()
local big = GetCVar("NamePlateHorizontalScale") == "1.4"
BetterBlizzPlatesDB.nameplateEnemyWidth, BetterBlizzPlatesDB.nameplateEnemyHeight = big and 154 or 110, big and 64.125 or 45
BetterBlizzPlatesDB.nameplateFriendlyWidth, BetterBlizzPlatesDB.nameplateFriendlyHeight = big and 154 or 110, big and 64.125 or 45
BetterBlizzPlatesDB.nameplateSelfWidth, BetterBlizzPlatesDB.nameplateSelfHeight = big and 154 or 110, big and 64.125 or 45
BetterBlizzPlatesDB.nameplateOverlapH = 0.8
BetterBlizzPlatesDB.nameplateOverlapV = 1.1
BetterBlizzPlatesDB.nameplateMotion = 0
BetterBlizzPlatesDB.nameplateMotionSpeed = 0.025
BetterBlizzPlatesDB.nameplateHorizontalScale = big and 1.4 or 1
BetterBlizzPlatesDB.NamePlateVerticalScale = big and 2.7 or 1
BetterBlizzPlatesDB.nameplateMinScale = 0.9
BetterBlizzPlatesDB.nameplateMaxScale = 0.9
BetterBlizzPlatesDB.nameplateSelectedScale = 1.2
BetterBlizzPlatesDB.NamePlateClassificationScale = 1
BetterBlizzPlatesDB.nameplateGlobalScale = 1
BetterBlizzPlatesDB.nameplateLargerScale = 1.2
BetterBlizzPlatesDB.nameplatePlayerLargerScale = 1.8
BetterBlizzPlatesDB.nameplateResourceOnTarget = "0"
BetterBlizzPlatesDB.nameplateMinAlpha = 0.6
BetterBlizzPlatesDB.nameplateMinAlphaDistance = 10
BetterBlizzPlatesDB.nameplateMaxAlpha = 1.0
BetterBlizzPlatesDB.nameplateMaxAlphaDistance = 40
BetterBlizzPlatesDB.nameplateOccludedAlphaMult = 0.4
BetterBlizzPlatesDB.nameplateShowEnemyGuardians = "1"
BetterBlizzPlatesDB.nameplateShowEnemyMinions = "1"
BetterBlizzPlatesDB.nameplateShowEnemyMinus = "0"
BetterBlizzPlatesDB.nameplateShowEnemyPets = "1"
BetterBlizzPlatesDB.nameplateShowEnemyTotems = "1"
BetterBlizzPlatesDB.nameplateShowFriendlyGuardians = "0"
BetterBlizzPlatesDB.nameplateShowFriendlyMinions = "0"
BetterBlizzPlatesDB.nameplateShowFriendlyPets = "0"
BetterBlizzPlatesDB.nameplateShowFriendlyTotems = "0"
BetterBlizzPlatesDB.enemyNameplateHealthbarHeight = big and 10.8 or 4
BetterBlizzPlatesDB.castBarHeight = big and 18.8 or 8
BetterBlizzPlatesDB.largeNameplates = big and true or false
C_CVar.SetCVar("nameplateOverlapH", BetterBlizzPlatesDB.nameplateOverlapH)
C_CVar.SetCVar("nameplateOverlapV", BetterBlizzPlatesDB.nameplateOverlapV)
C_CVar.SetCVar("nameplateMotion", BetterBlizzPlatesDB.nameplateMotion)
C_CVar.SetCVar("nameplateMotionSpeed", BetterBlizzPlatesDB.nameplateMotionSpeed)
C_CVar.SetCVar("nameplateHorizontalScale", BetterBlizzPlatesDB.nameplateHorizontalScale)
C_CVar.SetCVar("NamePlateVerticalScale", BetterBlizzPlatesDB.NamePlateVerticalScale)
C_CVar.SetCVar("nameplateMinScale", BetterBlizzPlatesDB.nameplateMinScale)
C_CVar.SetCVar("nameplateMaxScale", BetterBlizzPlatesDB.nameplateMaxScale)
C_CVar.SetCVar("nameplateSelectedScale", BetterBlizzPlatesDB.nameplateSelectedScale)
C_CVar.SetCVar("NamePlateClassificationScale", BetterBlizzPlatesDB.NamePlateClassificationScale)
C_CVar.SetCVar("nameplateGlobalScale", BetterBlizzPlatesDB.nameplateGlobalScale)
C_CVar.SetCVar("nameplateLargerScale", BetterBlizzPlatesDB.nameplateLargerScale)
C_CVar.SetCVar("nameplatePlayerLargerScale", BetterBlizzPlatesDB.nameplatePlayerLargerScale)
C_CVar.SetCVar("nameplateResourceOnTarget", BetterBlizzPlatesDB.nameplateResourceOnTarget)
C_CVar.SetCVar("nameplateMinAlpha", BetterBlizzPlatesDB.nameplateMinAlpha)
C_CVar.SetCVar("nameplateMinAlphaDistance", BetterBlizzPlatesDB.nameplateMinAlphaDistance)
C_CVar.SetCVar("nameplateMaxAlpha", BetterBlizzPlatesDB.nameplateMaxAlpha)
C_CVar.SetCVar("nameplateMaxAlphaDistance", BetterBlizzPlatesDB.nameplateMaxAlphaDistance)
C_CVar.SetCVar("nameplateOccludedAlphaMult", BetterBlizzPlatesDB.nameplateOccludedAlphaMult)
C_CVar.SetCVar("nameplateShowEnemyMinions", BetterBlizzPlatesDB.nameplateShowEnemyMinions)
C_CVar.SetCVar("nameplateShowEnemyGuardians", BetterBlizzPlatesDB.nameplateShowEnemyGuardians)
C_CVar.SetCVar("nameplateShowEnemyMinus", BetterBlizzPlatesDB.nameplateShowEnemyMinus)
C_CVar.SetCVar("nameplateShowEnemyPets", BetterBlizzPlatesDB.nameplateShowEnemyPets)
C_CVar.SetCVar("nameplateShowEnemyTotems", BetterBlizzPlatesDB.nameplateShowEnemyTotems)
C_CVar.SetCVar("nameplateShowFriendlyMinions", BetterBlizzPlatesDB.nameplateShowFriendlyMinions)
C_CVar.SetCVar("nameplateShowFriendlyGuardians", BetterBlizzPlatesDB.nameplateShowFriendlyGuardians)
C_CVar.SetCVar("nameplateShowFriendlyPets", BetterBlizzPlatesDB.nameplateShowFriendlyPets)
C_CVar.SetCVar("nameplateShowFriendlyTotems", BetterBlizzPlatesDB.nameplateShowFriendlyTotems)
C_CVar.SetCVar('nameplateShowOnlyNames', "0")
ReloadUI()
end
local function ResetBBP()
BetterBlizzPlatesDB = {}
ResetNameplates()
BetterBlizzPlatesDB.hasSaved = true
BetterBlizzPlatesDB.updates = addonUpdates
BetterBlizzPlatesDB.sendResetMessage = true
BetterBlizzPlatesDB.reopenOptions = true
ReloadUI()
end
StaticPopupDialogs["CONFIRM_RESET_BETTERBLIZZPLATESDB"] = {
text = "Are you sure you want to reset all BetterBlizzPlates settings?\nThis action cannot be undone.",
button1 = "Confirm",
button2 = "Cancel",
OnAccept = function()
ResetBBP()
end,
timeout = 0,
whileDead = true,
hideOnEscape = true,
preferredIndex = 3,
}
StaticPopupDialogs["CONFIRM_FIX_NAMEPLATES_BBP"] = {
text = "Are you sure you want to reset nameplate CVar's?\nThis action cannot be undone.",
button1 = "Confirm",
button2 = "Cancel",
OnAccept = function()
ResetNameplates()
end,
timeout = 0,
whileDead = true,
hideOnEscape = true,
preferredIndex = 3,
}
StaticPopupDialogs["BETTERBLIZZPLATES_COMBAT_WARNING"] = {
text = "Leave combat to adjust this setting.",
button1 = "Okay",
timeout = 0,
whileDead = true,
hideOnEscape = true,
preferredIndex = 3,
}
local function UpdateAuraColorsToGreen()
if BetterBlizzPlatesDB and BetterBlizzPlatesDB["auraWhitelist"] then
for _, entry in pairs(BetterBlizzPlatesDB["auraWhitelist"]) do
if entry.entryColors and entry.entryColors.text then
-- Update to green color
entry.entryColors.text.r = 0
entry.entryColors.text.g = 1
entry.entryColors.text.b = 0
else
entry.entryColors = { text = { r = 0, g = 1, b = 0 } }
end
end
end
end
local function AddAlphaValuesToAuraColors()
if BetterBlizzPlatesDB and BetterBlizzPlatesDB["auraWhitelist"] then
for _, entry in pairs(BetterBlizzPlatesDB["auraWhitelist"]) do
if entry.entryColors and entry.entryColors.text then
entry.entryColors.text.a = 1
else
entry.entryColors = { text = { r = 0, g = 1, b = 0, a = 1 } }
end
end
end
end
-- Update message
local function SendUpdateMessage()
if sendUpdate then
if not BetterBlizzPlatesDB.scStart then
C_Timer.After(7, function()
--bbp news
--PlaySoundFile(567439) --quest complete sfx
--BBP.CreateUpdateMessageWindow()
if BetterBlizzPlatesDB.fadeAllButTarget then
DEFAULT_CHAT_FRAME:AddMessage("|A:gmchat-icon-blizz:16:16|a Better|cff00c0ffBlizz|rPlates " .. addonUpdates .. ":")
DEFAULT_CHAT_FRAME:AddMessage("|A:QuestNormal:16:16|a Removed:")
DEFAULT_CHAT_FRAME:AddMessage(" - Removed Fade NPC's \"Fade all but Target\" setting, use whitelist mode instead.")
BetterBlizzPlatesDB.fadeAllButTarget = nil
end
-- DEFAULT_CHAT_FRAME:AddMessage("|A:Professions-Crafting-Orders-Icon:16:16|a Bugfixes/Tweaks:")
-- DEFAULT_CHAT_FRAME:AddMessage(" - Fix aura color module not working on buffs.")
-- DEFAULT_CHAT_FRAME:AddMessage(" - Fix class icon module causing a lua error sometimes.")
end)
else
BetterBlizzPlatesDB.scStart = nil
end
end
end
local function NewsUpdateMessage()
DEFAULT_CHAT_FRAME:AddMessage("|A:gmchat-icon-blizz:16:16|a Better|cff00c0ffBlizz|rPlates news:")
DEFAULT_CHAT_FRAME:AddMessage("|A:QuestNormal:16:16|a New Settings:")
DEFAULT_CHAT_FRAME:AddMessage(" - I changed up how nameplate aura filters work. I removed the \"All\" filter as a part of this.")
DEFAULT_CHAT_FRAME:AddMessage(" - Anchor Nameplate Combopoints to bottom of healthbar/castbar (Blizzard CVar's).")
DEFAULT_CHAT_FRAME:AddMessage(" - Hide nameplate auras on NPC's (Nameplate Auras).")
DEFAULT_CHAT_FRAME:AddMessage("|A:Professions-Crafting-Orders-Icon:16:16|a Bugfixes:")
DEFAULT_CHAT_FRAME:AddMessage(" - Fix \"Castbar Quick Hide\" setting.")
DEFAULT_CHAT_FRAME:AddMessage(" - Fixed the \"Center auras\" fix... They should now work properly.")
DEFAULT_CHAT_FRAME:AddMessage("|A:GarrisonTroops-Health:16:16|a Patreon link: www.patreon.com/bodydev")
end
local function CheckForUpdate()
if not BetterBlizzPlatesDB.hasSaved then