Thread Tools Display Modes
Prev Previous Post   Next Post Next
06-07-05, 01:48 PM   #1
Macer
A Defias Bandit
Join Date: Jun 2005
Posts: 2
Need Help Detecting Who Made a Critical Hit

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
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Need Help Detecting Who Made a Critical Hit


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off