mirror of
https://github.com/brues-code/Vanilla_MikScrollingBattleText.git
synced 2026-10-12 16:40:02 +00:00
add resist sound
This commit is contained in:
@@ -0,0 +1 @@
|
||||
.history/
|
||||
@@ -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
|
||||
|
||||
@@ -198,6 +198,7 @@ MikSBT.DEFAULT_CONFIG = {
|
||||
ShowAllManaGains = false,
|
||||
LowHealthSound = true,
|
||||
LowManaSound = true,
|
||||
ResistSound = true,
|
||||
AnimationStep = 1.5,
|
||||
MasterFontSettings = {
|
||||
Normal = {FontIndex=7, OutlineIndex=2, FontSize=18},
|
||||
@@ -680,7 +681,7 @@ MikSBT.DEFAULT_CONFIG = {
|
||||
},
|
||||
MSBT_EVENTTYPE_OUTGOING_SPELL_ABSORB = {
|
||||
Show = true,
|
||||
Message = "(%s) "..ABSORB.."!",
|
||||
Message = "(%s) "..ABSORB.."!",
|
||||
FontSettings = {
|
||||
Color = {r=1, g=1, b=0},
|
||||
Normal = {FontIndex=0, OutlineIndex=0, FontSize=0},
|
||||
|
||||
Binary file not shown.
@@ -624,6 +624,10 @@ function MikSBTOpt.InitCheckboxes()
|
||||
key = "Tab1FrameLowManaSoundCheckbox";
|
||||
MikSBTOpt.SetupCheckbox(OPTIONS_FRAME_NAME .. key, MikSBTOpt.CHECKBOXES[key].Label, MikSBTOpt.CHECKBOXES[key].Tooltip, "LowManaSound");
|
||||
|
||||
-- Initialize the Resist Sound checkbox.
|
||||
key = "Tab1FrameResistSoundCheckbox";
|
||||
MikSBTOpt.SetupCheckbox(OPTIONS_FRAME_NAME .. key, MikSBTOpt.CHECKBOXES[key].Label, MikSBTOpt.CHECKBOXES[key].Tooltip, "ResistSound");
|
||||
|
||||
-- Initialize the show scroll area events checkboxes.
|
||||
key = "Tab2FrameShowEventsCheckbox"; MikSBTOpt.SetupCheckbox(OPTIONS_FRAME_NAME .. key, MikSBTOpt.CHECKBOXES[key].Label, MikSBTOpt.CHECKBOXES[key].Tooltip, "DisplaySettings.Incoming.Show");
|
||||
key = "Tab3FrameShowEventsCheckbox"; MikSBTOpt.SetupCheckbox(OPTIONS_FRAME_NAME .. key, MikSBTOpt.CHECKBOXES[key].Label, MikSBTOpt.CHECKBOXES[key].Tooltip, "DisplaySettings.Outgoing.Show");
|
||||
@@ -3676,6 +3680,9 @@ function MikSBTOpt.PopulateProfileOptions()
|
||||
-- Populate the Low Mana Sound checkbox.
|
||||
MikSBTOpt.PopulateCheckbox(OPTIONS_FRAME_NAME .. "Tab1FrameLowManaSoundCheckbox");
|
||||
|
||||
-- Populate the Resist Sound checkbox.
|
||||
MikSBTOpt.PopulateCheckbox(OPTIONS_FRAME_NAME .. "Tab1FrameResistSoundCheckbox");
|
||||
|
||||
-- Populate the scroll area show events checkboxes to the values in the profile.
|
||||
MikSBTOpt.PopulateCheckbox(OPTIONS_FRAME_NAME .. "Tab2FrameShowEventsCheckbox");
|
||||
MikSBTOpt.PopulateCheckbox(OPTIONS_FRAME_NAME .. "Tab3FrameShowEventsCheckbox");
|
||||
|
||||
@@ -2664,6 +2664,16 @@
|
||||
</Anchors>
|
||||
</CheckButton>
|
||||
|
||||
<CheckButton name="$parentResistSoundCheckbox" inherits="MSBTCheckTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parentLowManaSoundCheckbox">
|
||||
<Offset>
|
||||
<AbsDimension x="80" y="0" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</CheckButton>
|
||||
|
||||
<!-- Animation Step Slider -->
|
||||
<Slider name="$parentAnimationStepSlider" inherits="MSBTSliderTemplate">
|
||||
<Anchors>
|
||||
|
||||
@@ -90,6 +90,7 @@ MikSBTOpt.CHECKBOXES = {
|
||||
["Tab1FrameShowAllManaGainsCheckbox"] = { Label="Show All Mana Gains", Tooltip="Sets whether or not to show all mana gains: mp5, drinking, etc. |cffff0000(spammy !)"},
|
||||
["Tab1FrameLowHealthSoundCheckbox"] = { Label="Low Health Sound", Tooltip="Sets whether or not to play a sound when your health is low."},
|
||||
["Tab1FrameLowManaSoundCheckbox"] = { Label="Low Mana Sound", Tooltip="Sets whether or not to play a sound when your mana is low."},
|
||||
["Tab1FrameResistSoundCheckbox"] = { Label="Resist Sound", Tooltip="Sets whether or not to play a sound when you get a resist on coc/nova."},
|
||||
["Tab1FrameUseStickyCritsCheckbox"] = { Label="Display Crits Sticky", Tooltip="Sets whether or not to display crits using the sticky style."},
|
||||
["Tab1FrameShowOverhealsCheckbox"] = { Label="Show Overheals", Tooltip="Sets whether or not to display overhealing information."},
|
||||
["Tab1FrameShowGameDamageCheckbox"] = { Label="Show Game Damage", Tooltip="Sets whether or not to display the game's damage above the enemy's heads."},
|
||||
|
||||
Reference in New Issue
Block a user