Skip to content

Commit

Permalink
Change to use a hook... can't say I like it, but it avoids the need t…
Browse files Browse the repository at this point in the history
…o localize the detection string
  • Loading branch information
tekkub committed Sep 4, 2008
1 parent 17c4517 commit a7f9642
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Rawr.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,12 @@ local buffs = {
-- The meaty insides --
---------------------------------

local f = CreateFrame("Frame")
f:SetScript("OnEvent", function(self, event, emote, name)
if name ~= playername or not string.find(emote, L.emote) then return end

hooksecurefunc("DoEmote", function(emote, msg)
if emote ~= "ROAR" then return end
for buff,sound in pairs(buffs) do
if (IS_WRATH_BUILD and UnitAura("player", buff)) or (not IS_WRATH_BUILD and GetPlayerBuffName(buff)) then return PlaySoundFile(sound) end
end

PlaySoundFile(rawrpath)
end)
f:RegisterEvent("CHAT_MSG_TEXT_EMOTE")

0 comments on commit a7f9642

Please sign in to comment.