add resist sound

This commit is contained in:
pepopo978
2023-12-12 23:20:15 -08:00
parent 0bf2944346
commit e9228327c5
7 changed files with 32 additions and 1 deletions
@@ -1689,6 +1689,17 @@ function MikSBT.AddAnimation(animationEvent)
animDisplayInfo.IsCrit = animationEvent.IsCrit;
animDisplayInfo.IsSticky = animationEvent.IsSticky;
if (animationEvent.EventType == "MSBT_EVENTTYPE_OUTGOING_SPELL_RESIST") then
-- play sound if enabled
if MikSBT.CurrentProfile.ResistSound then
if animationEvent.EffectName then
if (string.find(animationEvent.EffectName, "Cone of Cold") or string.find(animationEvent.EffectName, "Frost Nova")) then
PlaySoundFile("Interface\\AddOns\\MikScrollingBattleText\\sounds\\Resist.mp3");
end
end
end
end
-- Set the font object properties.
animDisplayInfo.FontObject:ClearAllPoints();
-- SetTextHeight does NOT apply if the original font size wouldn't be changed by it