Oh nice I didnt saw it, thanks.
My pet was killed by the dummy at Boralus and there was a coin sound.
UI_LEGENDARY_LOOT_TOAST is a nice sound.
Edit: I changed the sound and deleted f:RegisterUnitEvent("UNIT_PET", "player") because this part plays the sound a second time when I use the Revive Pet ability. Just f:RegisterUnitEvent("UNIT_HEALTH", "pet") is enough.
local f = CreateFrame("Frame")
f:RegisterUnitEvent("UNIT_HEALTH", "pet")
f:SetScript("OnEvent", function()
if not UnitExists("pet") or UnitHealth("pet") == 0 then
PlaySound(SOUNDKIT.UI_LEGENDARY_LOOT_TOAST)
end
end)
|