@@ -894,6 +894,11 @@ local numDamageEvents = 0
894
894
local lastDamageEventTime
895
895
local runningAverageDamageEvents = 0
896
896
function NameplateSCT :DamageEvent (guid , spellName , amount , overkill , school , crit , spellId , absorbed )
897
+ -- Hide small hits based on threshold
898
+ if (self .db .global .sizing .hideSmallHitsThreshold > 0 and self .db .global .sizing .hideSmallHitsThreshold > (amount + absorbed )) then
899
+ return
900
+ end
901
+
897
902
local text , animation , pow , size , alpha
898
903
local autoattack = spellName == " melee" or spellName == " pet"
899
904
@@ -955,7 +960,7 @@ function NameplateSCT:DamageEvent(guid, spellName, amount, overkill, school, cri
955
960
956
961
if ((not crit and amount < SMALL_HIT_MULTIPIER * runningAverageDamageEvents )
957
962
or (crit and amount / 2 < SMALL_HIT_MULTIPIER * runningAverageDamageEvents )) then
958
- if ( self .db .global .sizing .smallHitsHide ) then
963
+ if self .db .global .sizing .smallHitsHide then
959
964
-- skip this damage event, it's too small
960
965
return
961
966
else
@@ -1879,6 +1884,19 @@ local menu = {
1879
1884
set = function (_ , newValue ) NameplateSCT .db .global .sizing .smallHitsHide = newValue end ,
1880
1885
order = 22 ,
1881
1886
},
1887
+ hideSmallHitsThreshold = {
1888
+ type = ' range' ,
1889
+ name = L [" Hide Hits Threshold" ],
1890
+ desc = L [" Hide hits that are below this threshold." ],
1891
+ min = 0 ,
1892
+ max = 10000000 ,
1893
+ softMax = 10000 ,
1894
+ step = 1 ,
1895
+ get = function () return NameplateSCT .db .global .sizing .hideSmallHitsThreshold end ,
1896
+ set = function (_ , newValue ) NameplateSCT .db .global .sizing .hideSmallHitsThreshold = newValue end ,
1897
+ order = 23 ,
1898
+ width = " full" ,
1899
+ },
1882
1900
},
1883
1901
},
1884
1902
},
0 commit comments