Ok, a mod I use (CombatSounds) detects critical hits and plays special sounds.
My problem is it detects anyone's critical hits on my target. I want to modift the lua to only play the sound on my critical hits.
Here is the current code:
Code:
function CombatSound_OnEvent()
if( event == "UNIT_COMBAT") then
if (CombatSoundConfig.useCrit) then
if (arg1=="target") and arg3=="CRITICAL") then
PlaySoundFile "Interface\\AddOns\\CombatSound\\Sounds\\crit.mp3");
end
end
end
end
Can I add UnitIsPlayer() somehow in there? If so, how? I checked thottbot and they only list 2 arguments for UNIT_COMBAT, yet this code references arg1 and arg3