-
Notifications
You must be signed in to change notification settings - Fork 14
/
RatingBuster.lua
4061 lines (3874 loc) · 136 KB
/
RatingBuster.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
local addonName, addon = ...
--[[
Name: RatingBuster
Revision: $Revision: 78903 $
Author: Whitetooth, raethkcj
Description: Converts combat ratings in tooltips into normal percentages.
]]
---------------
-- Libraries --
---------------
local StatLogic = LibStub("StatLogic")
local L = LibStub("AceLocale-3.0"):GetLocale("RatingBuster")
local S = setmetatable(addon.S, { __index = L })
---@cast L RatingBusterLocale
--------------------
-- AceAddon Setup --
--------------------
---@class RatingBuster: AceAddon, AceConsole-3.0, AceEvent-3.0, AceBucket-3.0
RatingBuster = LibStub("AceAddon-3.0"):NewAddon("RatingBuster", "AceConsole-3.0", "AceEvent-3.0", "AceBucket-3.0")
RatingBuster.title = "Rating Buster"
--[===[@non-debug@
RatingBuster.version = "@project-version@"
--@end-non-debug@]===]
--@debug@
RatingBuster.version = "(development)"
--@end-debug@
local addonNameWithVersion = ("%s %s"):format(addonName, RatingBuster.version)
RatingBuster.date = ("$Date: 2008-07-22 15:35:19 +0800 (星期二, 22 七月 2008) $"):gsub("^.-(%d%d%d%d%-%d%d%-%d%d).-$", "%1")
-----------
-- Cache --
-----------
local cache = setmetatable({}, {
__index = function(t, k)
t[k] = setmetatable({}, { __mode = "kv" })
return t[k]
end,
})
---------------------
-- Local Variables --
---------------------
local _
local _, class = UnitClass("player")
local playerLevel
local db -- Initialized in :OnInitialize()
-- Localize globals
local pairs = pairs
local ipairs = ipairs
local type = type
local select = select
local tinsert = tinsert
local tremove = tremove
local tsort = table.sort
local unpack = unpack
local tonumber = tonumber
local GetParryChance = GetParryChance
local GetBlockChance = GetBlockChance
---------------------------
-- Slash Command Options --
---------------------------
local function getOption(info, dataType)
dataType = dataType or "profile"
return db[dataType][info[#info]]
end
local function getGlobalOption(info)
return getOption(info, "global")
end
local function setOption(info, value, dataType)
dataType = dataType or "profile"
db[dataType][info[#info]] = value
RatingBuster:ClearCache()
end
local function setGlobalOption(info, value)
return setOption(info, value, "global")
end
local function getGem(info)
return db.profile[info[#info]].gemLink
end
local function setGem(info, value)
if value == "" then
db.profile[info[#info]].itemID = nil
db.profile[info[#info]].gemID = nil
db.profile[info[#info]].gemName = nil
db.profile[info[#info]].gemLink = nil
return
end
local gemID, gemText = StatLogic:GetGemID(value)
if gemID and gemText then
local name, link = C_Item.GetItemInfo(value)
local itemID = link:match("item:(%d+)")
db.profile[info[#info]].itemID = itemID
db.profile[info[#info]].gemID = gemID
db.profile[info[#info]].gemName = name
db.profile[info[#info]].gemLink = link
-- Trim spaces
gemText = gemText:trim()
-- Strip color codes
if gemText:sub(-2) == "|r" then
gemText = gemText:sub(1, -3)
end
if gemText:sub(1, 10):find("|c%x%x%x%x%x%x%x%x") then
gemText = gemText:sub(11)
end
db.profile[info[#info]].gemText = gemText
RatingBuster:ClearCache()
local socket = "EMPTY_SOCKET_" .. info[#info]:sub(7):upper()
if not debugstack():find("AceConsole") then
RatingBuster:Print(L["%s is now set to %s"]:format(_G[socket], link))
end
else
RatingBuster:Print(L["Queried server for Gem: %s. Try again in 5 secs."]:format(value))
end
end
local function getColor(info)
local color = db.global[info[#info]]
return color:GetRGB()
end
local function setColor(info, r, g, b)
local color = db.global[info[#info]]
color:SetRGB(r, g, b)
RatingBuster:ClearCache()
end
ColorPickerFrame:SetMovable(true)
ColorPickerFrame:EnableMouse(true)
ColorPickerFrame:RegisterForDrag("LeftButton")
ColorPickerFrame:SetScript("OnDragStart", function()
for _, frame in ipairs(C_System.GetFrameStack()) do
if frame == ColorPickerFrameHeader then
ColorPickerFrame:StartMoving()
end
end
end)
ColorPickerFrame:SetScript("OnDragStop", ColorPickerFrame.StopMovingOrSizing)
local options = {
type = 'group',
get = getOption,
set = setOption,
args = {
help = {
type = 'execute',
name = L["Help"],
desc = L["Show this help message"],
order = 1,
func = function()
LibStub("AceConfigCmd-3.0").HandleCommand(RatingBuster, "rb", addonNameWithVersion, "")
end,
dialogHidden = true,
},
debug = {
type = "execute",
name = "Debug",
desc = "Toggle debugging",
func = function()
RatingBuster:ClearCache()
StatLogic:ClearCache()
end,
dialogHidden = true,
},
pp = {
type = "execute",
name = "Performance Profile",
desc = "Execute a performance test and display the results",
func = function()
RatingBuster:PerformanceProfile()
end,
dialogHidden = true,
},
rating = {
type = 'group',
name = L["Rating"],
desc = L["Options for Rating display"],
order = 2,
hidden = function()
return addon.tocversion < 20000
end,
args = {
showRatings = {
type = 'toggle',
name = L["Show Rating conversions"],
desc = L["Show Rating conversions in tooltips"],
order = 1,
width = "full",
},
ratingPhysical = {
type = 'toggle',
name = L["Show Physical Hit/Haste"],
desc = L["Show Physical Hit/Haste from Hit/Haste Rating"],
order = 2,
width = "full",
hidden = function()
local genericHit = StatLogic.GenericStatMap[StatLogic.Stats.HitRating]
return (not genericHit)
end
},
ratingSpell = {
type = 'toggle',
name = L["Show Spell Hit/Haste"],
desc = L["Show Spell Hit/Haste from Hit/Haste Rating"],
order = 3,
width = "full",
hidden = function()
local genericHit = StatLogic.GenericStatMap[StatLogic.Stats.HitRating]
return (not genericHit) or (not tContains(genericHit, StatLogic.Stats.SpellHitRating))
end
},
enableAvoidanceDiminishingReturns = {
type = 'toggle',
name = L["Enable Avoidance Diminishing Returns"],
desc = L["Dodge, Parry, Miss Avoidance values will be calculated using the avoidance deminishing return formula with your current stats"],
order = 5,
width = "full",
hidden = function()
return not StatLogic.GetAvoidanceAfterDR
end,
},
},
},
stat = {
type = 'group',
name = L["Stat Breakdown"],
desc = L["Changes the display of base stats"],
order = 3,
args = {
showStats = {
type = 'toggle',
name = L["Show base stat conversions"],
desc = L["Show base stat conversions in tooltips"],
width = "full",
order = 1,
},
textColor = {
type = 'color',
name = L["Change text color"],
desc = L["Changes the color of added text"],
get = getColor,
set = setColor,
order = 2,
},
str = {
type = 'group',
name = L[StatLogic.Stats.Strength],
desc = L["Changes the display of %s"]:format(L[StatLogic.Stats.Strength]),
width = "full",
order = 3,
args = {},
hidden = true,
},
agi = {
type = 'group',
name = L[StatLogic.Stats.Agility],
desc = L["Changes the display of %s"]:format(L[StatLogic.Stats.Agility]),
width = "full",
order = 4,
args = {},
hidden = true,
},
sta = {
type = 'group',
name = L[StatLogic.Stats.Stamina],
desc = L["Changes the display of %s"]:format(L[StatLogic.Stats.Stamina]),
width = "full",
order = 5,
args = {},
hidden = true,
},
int = {
type = 'group',
name = L[StatLogic.Stats.Intellect],
desc = L["Changes the display of %s"]:format(L[StatLogic.Stats.Intellect]),
width = "full",
order = 6,
args = {},
hidden = true,
},
spi = {
type = 'group',
name = L[StatLogic.Stats.Spirit],
desc = L["Changes the display of %s"]:format(L[StatLogic.Stats.Spirit]),
width = "full",
order = 7,
args = {},
hidden = true,
},
spell_crit = {
type = 'group',
name = L[StatLogic.Stats.SpellCrit],
desc = L["Changes the display of %s"]:format(L[StatLogic.Stats.SpellCrit]),
width = "full",
order = 9,
args = {},
hidden = true,
},
health = {
type = 'group',
name = L[StatLogic.Stats.Health],
desc = L["Changes the display of %s"]:format(L[StatLogic.Stats.Health]),
width = "full",
order = 9,
args = {},
hidden = true,
},
ap = {
type = 'group',
name = L[StatLogic.Stats.AttackPower],
desc = L["Changes the display of %s"]:format(L[StatLogic.Stats.AttackPower]),
order = 10,
args = {},
hidden = true,
},
spell_dmg = {
type = 'group',
name = L[StatLogic.Stats.SpellDamage],
desc = L["Changes the display of %s"]:format(L[StatLogic.Stats.SpellDamage]),
order = 10,
args = {},
hidden = true,
},
mastery = {
type = 'group',
name = L[StatLogic.Stats.MasteryRating],
desc = L["Changes the display of %s"]:format(L[StatLogic.Stats.MasteryRating]),
order = 11,
args = {},
hidden = true,
},
weaponskill = {
type = 'group',
name = L[StatLogic.Stats.WeaponSkill],
desc = L["Changes the display of %s"]:format(L[StatLogic.Stats.WeaponSkill]),
order = 12,
hidden = true,
--[[
hidden = function()
return addon.tocversion >= 20000
end,
]]--
args = {
wpnBreakDown = {
type = 'toggle',
name = L["Weapon Skill breakdown"],
desc = L["Convert Weapon Skill into Crit, Hit, Dodge Reduction, Parry Reduction and Block Reduction"],
width = "full",
},
},
},
expertise = {
type = 'group',
name = L[StatLogic.Stats.ExpertiseRating],
desc = L["Changes the display of %s"]:format(L[StatLogic.Stats.ExpertiseRating]),
order = 13,
hidden = true,
args = {},
},
defense = {
type = 'group',
name = L[StatLogic.Stats.Defense],
desc = L["Changes the display of %s"]:format(L[StatLogic.Stats.Defense]),
order = 14,
hidden = true,
args = {},
},
armor = {
type = 'group',
name = L[StatLogic.Stats.Armor],
desc = L["Changes the display of %s"]:format(L[StatLogic.Stats.Armor]),
order = 15,
args = {},
hidden = true,
},
resilience = {
type = 'group',
name = L[StatLogic.Stats.ResilienceRating],
desc = L["Changes the display of %s"]:format(L[StatLogic.Stats.ResilienceRating]),
order = 16,
args = {},
hidden = true,
},
},
},
sum = {
type = 'group',
name = L["Stat Summary"],
desc = L["Options for stat summary"],
order = 4,
args = {
sumGroup = {
name = "",
type = 'group',
inline = true,
get = getGlobalOption,
set = setGlobalOption,
args = {
showSum = {
type = 'toggle',
name = L["Show stat summary"],
desc = L["Show stat summary in tooltips"],
order = 1,
},
calcSum = {
type = 'toggle',
name = L["Calculate stat sum"],
desc = L["Calculate the total stats for the item"],
order = 2,
},
calcDiff = {
type = 'toggle',
name = L["Calculate stat diff"],
desc = L["Calculate the stat difference for the item and equipped items"],
order = 3,
},
sumDiffStyle = {
type = 'select',
name = L["Display style for diff value"],
desc = L["Display diff values in the main tooltip or only in compare tooltips"],
values = {
["comp"] = "Compare",
["main"] = "Main"
},
order = 4,
},
hideBlizzardComparisons = {
type = 'toggle',
name = L["Hide Blizzard Item Comparisons"],
desc = L["Disable Blizzard stat change summary when using the built-in comparison tooltip"],
width = "double",
order = 5,
},
showItemID = {
type = 'toggle',
name = L["Show ItemID"],
desc = L["Show the ItemID in tooltips"],
order = 6,
},
showItemLevel = {
type = 'toggle',
name = L["Show ItemLevel"],
desc = L["Show the ItemLevel in tooltips"],
order = 7,
},
sumShowIcon = {
type = 'toggle',
name = L["Show icon"],
desc = L["Show the sigma icon before stat summary"],
order = 8,
},
sumShowTitle = {
type = 'toggle',
name = L["Show title text"],
desc = L["Show the title text before stat summary"],
order = 9,
},
sumShowProfile = {
type = 'toggle',
name = L["Show profile name"],
desc = L["Show profile name before stat summary"],
order = 10,
},
showZeroValueStat = {
type = 'toggle',
name = L["Show zero value stats"],
desc = L["Show zero value stats in summary for consistancy"],
order = 11,
},
sumSortAlpha = {
type = 'toggle',
name = L["Sort StatSummary alphabetically"],
desc = L["Enable to sort StatSummary alphabetically, disable to sort according to stat type(basic, physical, spell, tank)"],
order = 12,
},
sumStatColor = {
type = 'color',
name = L["Change text color"],
desc = L["Changes the color of added text"],
get = getColor,
set = setColor,
order = 13,
},
sumValueColor = {
type = 'color',
name = L["Change number color"],
desc = L["Changes the color of added text"],
get = getColor,
set = setColor,
order = 14,
},
space = {
type = 'group',
name = L["Add empty line"],
inline = true,
order = 15,
args = {
sumBlankLine = {
type = 'toggle',
name = L["Add before summary"],
desc = L["Add a empty line before stat summary"],
order = 10,
},
sumBlankLineAfter = {
type = 'toggle',
name = L["Add after summary"],
desc = L["Add a empty line after stat summary"],
order = 11,
},
},
},
},
},
ignore = {
type = 'group',
name = L["Ignore settings"],
desc = L["Ignore stuff when calculating the stat summary"],
get = getGlobalOption,
set = setGlobalOption,
args = {
sumIgnoreUnused = {
type = 'toggle',
name = L["Ignore unused item types"],
desc = L["Show stat summary only for highest level armor type and items you can use with uncommon quality and up"],
},
sumIgnoreNonPrimaryStat = {
type = 'toggle',
name = L["Ignore non-primary stat"],
desc = L["Show stat summary only for items with your specialization's primary stat"],
hidden = function()
return addon.tocversion < 40000
end,
},
sumIgnoreEquipped = {
type = 'toggle',
name = L["Ignore equipped items"],
desc = L["Hide stat summary for equipped items"],
},
sumIgnoreEnchant = {
type = 'toggle',
name = L["Ignore enchants"],
desc = L["Ignore enchants on items when calculating the stat summary"],
},
sumIgnoreGems = {
type = 'toggle',
name = L["Ignore gems"],
desc = L["Ignore gems on items when calculating the stat summary"],
hidden = function()
return addon.tocversion < 20000
end,
},
sumIgnoreExtraSockets = {
type = 'toggle',
name = L["Ignore extra sockets"],
desc = L["Ignore sockets from professions or consumable items when calculating the stat summary"],
hidden = function()
return addon.tocversion < 20000
end,
}
},
},
basic = {
type = 'group',
name = L["Stat - Basic"],
desc = L["Choose basic stats for summary"],
args = {
sumHP = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.Health]),
desc = L["Health <- Health, Stamina"],
order = 1,
},
sumMP = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.Mana]),
desc = L["Mana <- Mana, Intellect"],
order = 2,
},
sumMP5 = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.ManaRegen]),
desc = L["Mana Regen <- Mana Regen, Spirit"],
order = 3,
},
sumMP5NC = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.ManaRegenNotCasting]),
desc = L["Mana Regen while not casting <- Spirit"],
order = 4,
},
sumHP5 = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.HealthRegen]),
desc = L["Health Regen <- Health Regen"],
order = 5,
},
sumHP5OC = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.HealthRegenOutOfCombat]),
desc = L["Health Regen when out of combat <- Spirit"],
order = 6,
},
sumStr = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.Strength]),
order = 7,
},
sumAgi = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.Agility]),
order = 8,
},
sumSta = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.Stamina]),
order = 9,
},
sumInt = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.Intellect]),
order = 10,
},
sumSpi = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.Spirit]),
order = 11,
},
sumMastery = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.Mastery]),
order = 12,
hidden = function()
return not StatLogic:RatingExists(StatLogic.Stats.MasteryRating)
end,
},
sumMasteryEffect = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.MasteryEffect]),
order = 12,
hidden = function()
return not StatLogic:RatingExists(StatLogic.Stats.MasteryRating)
end,
},
},
},
physical = {
type = 'group',
name = L["Stat - Physical"],
desc = L["Choose physical damage stats for summary"],
args = {
sumAP = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.AttackPower]),
desc = L["Attack Power <- Attack Power, Strength, Agility"],
width = "double",
order = 1,
},
sumHit = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.MeleeHit]),
desc = L["Hit Chance <- Hit Rating, Weapon Skill Rating"],
order = 2,
},
sumHitRating = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.MeleeHitRating]),
order = 3,
hidden = function()
return not StatLogic:RatingExists(StatLogic.Stats.MeleeHitRating)
end,
},
sumCrit = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.MeleeCrit]),
desc = L["Crit Chance <- Crit Rating, Agility, Weapon Skill Rating"],
order = 4,
},
sumCritRating = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.MeleeCritRating]),
order = 5,
hidden = function()
return not StatLogic:RatingExists(StatLogic.Stats.MeleeCritRating)
end,
},
sumHaste = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.MeleeHaste]),
desc = L["Haste <- Haste Rating"],
order = 6,
},
sumHasteRating = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.MeleeHasteRating]),
order = 7,
hidden = function()
return not StatLogic:RatingExists(StatLogic.Stats.MeleeHasteRating)
end,
},
sumIgnoreArmor = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.IgnoreArmor]),
hidden = function()
return addon.tocversion >= 20000 and addon.tocversion < 30000
end,
order = 8,
},
sumArmorPenetration = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.ArmorPenetration]),
hidden = function()
return not StatLogic:RatingExists(StatLogic.Stats.ArmorPenetrationRating)
end,
order = 9,
},
sumArmorPenetrationRating = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.ArmorPenetrationRating]),
hidden = function()
return not StatLogic:RatingExists(StatLogic.Stats.ArmorPenetrationRating)
end,
order = 10,
},
ranged = {
type = 'header',
name = L["Ranged"],
order = 11,
},
sumRAP = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.RangedAttackPower]),
desc = L["Ranged Attack Power <- Ranged Attack Power, Intellect, Attack Power, Strength, Agility"],
width = "double",
order = 12,
},
sumRangedHit = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.RangedHit]),
desc = L["Ranged Hit Chance <- Hit Rating, Weapon Skill Rating, Ranged Hit Rating"],
order = 13,
},
sumRangedHitRating = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.RangedHitRating]),
order = 14,
hidden = function()
return not StatLogic:RatingExists(StatLogic.Stats.RangedHitRating)
end,
},
sumRangedCrit = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.RangedCrit]),
desc = L["Ranged Crit Chance <- Crit Rating, Agility, Weapon Skill Rating, Ranged Crit Rating"],
order = 15,
},
sumRangedCritRating = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.RangedCritRating]),
order = 16,
hidden = function()
return not StatLogic:RatingExists(StatLogic.Stats.RangedCritRating)
end,
},
sumRangedHaste = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.RangedHaste]),
desc = L["Ranged Haste <- Haste Rating, Ranged Haste Rating"],
order = 17,
},
sumRangedHasteRating = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.RangedHasteRating]),
order = 18,
hidden = function()
return not StatLogic:RatingExists(StatLogic.Stats.RangedHasteRating)
end,
},
weapon = {
type = 'header',
name = L["Weapon"],
order = 19,
},
sumWeaponAverageDamage = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.AverageWeaponDamage]),
order = 20,
},
sumWeaponDPS = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.WeaponDPS]),
order = 21,
},
sumDodgeNeglect = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.DodgeReduction]),
desc = L["Dodge Reduction <- Expertise, Weapon Skill Rating"],
order = 22,
},
sumParryNeglect = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.ParryReduction]),
desc = L["Parry Reduction <- Expertise, Weapon Skill Rating"],
order = 23,
},
sumWeaponSkill = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.WeaponSkill]),
desc = L["Weapon Skill <- Weapon Skill Rating"],
order = 24,
hidden = function()
return addon.tocversion >= 20000
end,
},
sumExpertise = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.Expertise]),
desc = L["Expertise <- Expertise Rating"],
order = 25,
hidden = function()
return not StatLogic:RatingExists(StatLogic.Stats.ExpertiseRating)
end,
},
},
},
spell = {
type = 'group',
name = L["Stat - Spell"],
desc = L["Choose spell damage and healing stats for summary"],
args = {
sumSpellDmg = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.SpellDamage]),
desc = L["Spell Damage <- Spell Damage, Intellect, Spirit, Stamina"],
},
sumHolyDmg = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.HolyDamage]),
desc = L["Holy Spell Damage <- Holy Spell Damage, Spell Damage, Intellect, Spirit"],
},
sumArcaneDmg = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.ArcaneDamage]),
desc = L["Arcane Spell Damage <- Arcane Spell Damage, Spell Damage, Intellect"],
},
sumFireDmg = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.FireDamage]),
desc = L["Fire Spell Damage <- Fire Spell Damage, Spell Damage, Intellect, Stamina"],
},
sumNatureDmg = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.NatureDamage]),
desc = L["Nature Spell Damage <- Nature Spell Damage, Spell Damage, Intellect"],
},
sumFrostDmg = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.FrostDamage]),
desc = L["Frost Spell Damage <- Frost Spell Damage, Spell Damage, Intellect"],
},
sumShadowDmg = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.ShadowDamage]),
desc = L["Shadow Spell Damage <- Shadow Spell Damage, Spell Damage, Intellect, Spirit, Stamina"],
},
sumHealing = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.HealingPower]),
desc = L["Healing <- Healing, Intellect, Spirit, Agility, Strength"],
},
sumSpellHit = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.SpellHit]),
desc = L["Spell Hit Chance <- Spell Hit Rating"],
},
sumSpellHitRating = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.SpellHitRating]),
hidden = function()
return not StatLogic:RatingExists(StatLogic.Stats.SpellHitRating)
end,
},
sumSpellCrit = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.SpellCrit]),
desc = L["Spell Crit Chance <- Spell Crit Rating, Intellect"],
},
sumSpellCritRating = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.SpellCritRating]),
hidden = function()
return not StatLogic:RatingExists(StatLogic.Stats.SpellCritRating)
end,
},
sumSpellHaste = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.SpellHaste]),
desc = L["Spell Haste <- Spell Haste Rating"],
},
sumSpellHasteRating = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.SpellHasteRating]),
hidden = function()
return not StatLogic:RatingExists(StatLogic.Stats.SpellHasteRating)
end,
},
sumPenetration = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.SpellPenetration]),
},
},
},
tank = {
type = 'group',
name = L["Stat - Tank"],
desc = L["Choose tank stats for summary"],
args = {
sumAvoidance = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.Avoidance]),
desc = L["Avoidance <- Dodge, Parry, MobMiss, Block(Optional)"],
order = 1,
},
sumAvoidWithBlock = {
type = 'toggle',
name = L["Include block chance in Avoidance summary"],
desc = L["Enable to include block chance in Avoidance summary, Disable for only dodge, parry, miss"],
order = 2,
},
sumDodge = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.Dodge]),
desc = L["Dodge Chance <- Dodge Rating, Agility, Defense Rating"],
order = 3,
},
sumDodgeRating = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.DodgeRating]),
order = 4,
hidden = function()
return not StatLogic:RatingExists(StatLogic.Stats.DodgeRating)
end,
},
sumBlock = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.BlockChance]),
desc = L["Block Chance <- Block Rating, Defense Rating"],
order = 5,
},
sumBlockRating = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.BlockRating]),
order = 6,
hidden = function()
return not StatLogic:RatingExists(StatLogic.Stats.BlockRating)
end,
},
sumBlockValue = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.BlockValue]),
desc = L["Block Value <- Block Value, Strength"],
order = 7,
hidden = function()
return addon.tocversion >= 40000
end,
},
sumParry = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.Parry]),
desc = L["Parry Chance <- Parry Rating, Defense Rating"],
order = 8,
},
sumParryRating = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.ParryRating]),
order = 9,
hidden = function()
return not StatLogic:RatingExists(StatLogic.Stats.ParryRating)
end,
},
sumHitAvoid = {
type = 'toggle',
name = L["Sum %s"]:format(L[StatLogic.Stats.Miss]),
desc = L["Hit Avoidance <- Defense Rating"],
order = 10,
hidden = function()
return addon.tocversion >= 40000
end,
},
sumArmor = {