@@ -752,26 +752,7 @@ function NameplateSCT:CombatFilter(_, clue, _, sourceGUID, _, sourceFlags, _, de
752
752
if playerGUID == sourceGUID or (NameplateSCT .db .global .personal and playerGUID == destGUID ) then -- Player events
753
753
local destUnit = guidToUnit [destGUID ]
754
754
if (destUnit ) or (destGUID == playerGUID and NameplateSCT .db .global .personal ) then
755
- if string.find (clue , " _DAMAGE" ) or string.find (clue , " DAMAGE_SHIELD" ) then
756
- local spellName , amount , overkill , school , critical , spellId , absorbed
757
- if (string.find (clue , " SWING" )) then
758
- spellName , amount , overkill , _ , _ , _ , absorbed , critical = " melee" , ...
759
- elseif (string.find (clue , " ENVIRONMENTAL" )) then
760
- spellName , amount , overkill , school , _ , _ , absorbed , critical = ...
761
- else
762
- spellId , spellName , _ , amount , overkill , school , _ , _ , absorbed , critical = ...
763
- end
764
- if spellId and spellId == 0 then
765
- spellId = nil -- Don't pass spellId 0
766
- end
767
- if NameplateSCT .db .global .filterEnabled then
768
- local spellInFilter = filtersTable [tostring (spellId )] or filtersTable [spellName ]
769
- if (NameplateSCT .db .global .inverseSpellFilter and not spellInFilter ) or (not NameplateSCT .db .global .inverseSpellFilter and spellInFilter ) then
770
- return
771
- end
772
- end
773
- self :DamageEvent (destGUID , spellName , amount , overkill , school , critical , spellId , absorbed )
774
- elseif (string.find (clue , " _MISSED" )) then
755
+ if string.find (clue , " _MISSED" ) then
775
756
local spellName , missType , spellId , amount , school
776
757
777
758
if (string.find (clue , " SWING" )) then
@@ -797,19 +778,14 @@ function NameplateSCT:CombatFilter(_, clue, _, sourceGUID, _, sourceFlags, _, de
797
778
else
798
779
self :MissEvent (destGUID , spellName , missType , spellId )
799
780
end
800
- end
801
- end
802
- elseif (bit .band (sourceFlags , COMBATLOG_OBJECT_TYPE_GUARDIAN ) > 0 or bit .band (sourceFlags , COMBATLOG_OBJECT_TYPE_PET ) > 0 ) and bit .band (sourceFlags , COMBATLOG_OBJECT_AFFILIATION_MINE ) > 0 then -- Pet/Guardian events
803
- local destUnit = guidToUnit [destGUID ]
804
- if (destUnit ) or (destGUID == playerGUID and NameplateSCT .db .global .personal ) then
805
- if string.find (clue , " _DAMAGE" ) or string.find (clue , " DAMAGE_SHIELD" ) then
806
- local spellName , amount , overkill , critical , spellId , absorbed
781
+ elseif string.find (clue , " _DAMAGE" ) or string.find (clue , " DAMAGE_SHIELD" ) then -- After _MISSED to not catch SPELL_DAMAGE_SHIELD_MISSED
782
+ local spellName , amount , overkill , school , critical , spellId , absorbed
807
783
if (string.find (clue , " SWING" )) then
808
- spellName , amount , overkill , _ , _ , _ , absorbed , critical , _ , _ , _ = " pet " , ...
784
+ spellName , amount , overkill , _ , _ , _ , absorbed , critical = " melee " , ...
809
785
elseif (string.find (clue , " ENVIRONMENTAL" )) then
810
- spellName , amount , overkill , _ , _ , _ , absorbed , critical = ...
786
+ spellName , amount , overkill , school , _ , _ , absorbed , critical = ...
811
787
else
812
- spellId , spellName , _ , amount , overkill , _ , _ , _ , absorbed , critical = ...
788
+ spellId , spellName , _ , amount , overkill , school , _ , _ , absorbed , critical = ...
813
789
end
814
790
if spellId and spellId == 0 then
815
791
spellId = nil -- Don't pass spellId 0
@@ -820,8 +796,13 @@ function NameplateSCT:CombatFilter(_, clue, _, sourceGUID, _, sourceFlags, _, de
820
796
return
821
797
end
822
798
end
823
- self :DamageEvent (destGUID , spellName , amount , overkill , " pet" , critical , spellId , absorbed )
824
- elseif (string.find (clue , " _MISSED" )) then -- Check for absorbed damage
799
+ self :DamageEvent (destGUID , spellName , amount , overkill , school , critical , spellId , absorbed )
800
+ end
801
+ end
802
+ elseif (bit .band (sourceFlags , COMBATLOG_OBJECT_TYPE_GUARDIAN ) > 0 or bit .band (sourceFlags , COMBATLOG_OBJECT_TYPE_PET ) > 0 ) and bit .band (sourceFlags , COMBATLOG_OBJECT_AFFILIATION_MINE ) > 0 then -- Pet/Guardian events
803
+ local destUnit = guidToUnit [destGUID ]
804
+ if (destUnit ) or (destGUID == playerGUID and NameplateSCT .db .global .personal ) then
805
+ if string.find (clue , " _MISSED" ) then
825
806
local spellName , missType , spellId , amount
826
807
827
808
if (string.find (clue , " SWING" )) then
@@ -845,6 +826,25 @@ function NameplateSCT:CombatFilter(_, clue, _, sourceGUID, _, sourceFlags, _, de
845
826
if missType == " ABSORB" then
846
827
self :DamageEvent (destGUID , spellName , 0 , - 1 , " pet" , critical , spellId , amount )
847
828
end
829
+ elseif string.find (clue , " _DAMAGE" ) or string.find (clue , " DAMAGE_SHIELD" ) then -- After _MISSED to not catch SPELL_DAMAGE_SHIELD_MISSED
830
+ local spellName , amount , overkill , critical , spellId , absorbed
831
+ if (string.find (clue , " SWING" )) then
832
+ spellName , amount , overkill , _ , _ , _ , absorbed , critical , _ , _ , _ = " pet" , ...
833
+ elseif (string.find (clue , " ENVIRONMENTAL" )) then
834
+ spellName , amount , overkill , _ , _ , _ , absorbed , critical = ...
835
+ else
836
+ spellId , spellName , _ , amount , overkill , _ , _ , _ , absorbed , critical = ...
837
+ end
838
+ if spellId and spellId == 0 then
839
+ spellId = nil -- Don't pass spellId 0
840
+ end
841
+ if NameplateSCT .db .global .filterEnabled then
842
+ local spellInFilter = filtersTable [tostring (spellId )] or filtersTable [spellName ]
843
+ if (NameplateSCT .db .global .inverseSpellFilter and not spellInFilter ) or (not NameplateSCT .db .global .inverseSpellFilter and spellInFilter ) then
844
+ return
845
+ end
846
+ end
847
+ self :DamageEvent (destGUID , spellName , amount , overkill , " pet" , critical , spellId , absorbed )
848
848
end
849
849
end
850
850
end
0 commit comments