Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function(event, ...)
- if event == "COMBAT_LOG_EVENT_UNFILTERED" then
- local timestamp, eventType, _, _, sourceName, _, _, _, destName, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, amount = CombatLogGetCurrentEventInfo()
- if eventType == "UNIT_DIED" and UnitLevel(destName) >= 1 then
- -- Check if the death was from falling
- local lastDamageEvent = select(2, CombatLogGetCurrentEventInfo(-1))
- if lastDamageEvent == "ENVIRONMENTAL_DAMAGE" and select(12, CombatLogGetCurrentEventInfo(-1)) == "FALLING" then
- -- Play sound
- PlaySoundFile("Interface\\AddOns\\WeakAuras\\Media\\Sounds\\Goofy.mp3", "Master")
- -- Print death message
- print(destName .. " died from fall damage!")
- end
- end
- end
- end
- -- Trigger: Event(s)
- -- Events: COMBAT_LOG_EVENT_UNFILTERED
Advertisement
Add Comment
Please, Sign In to add comment