diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0fd0354 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.history/ diff --git a/MikScrollingBattleText/MikScrollingBattleText.lua b/MikScrollingBattleText/MikScrollingBattleText.lua index 99a2c38..674ef7a 100644 --- a/MikScrollingBattleText/MikScrollingBattleText.lua +++ b/MikScrollingBattleText/MikScrollingBattleText.lua @@ -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 diff --git a/MikScrollingBattleText/localization.lua b/MikScrollingBattleText/localization.lua index e1dd99c..38411d7 100644 --- a/MikScrollingBattleText/localization.lua +++ b/MikScrollingBattleText/localization.lua @@ -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}, diff --git a/MikScrollingBattleText/sounds/Resist.mp3 b/MikScrollingBattleText/sounds/Resist.mp3 new file mode 100644 index 0000000..5ed38a8 Binary files /dev/null and b/MikScrollingBattleText/sounds/Resist.mp3 differ diff --git a/MikScrollingBattleTextOptions/MSBTOptions.lua b/MikScrollingBattleTextOptions/MSBTOptions.lua index 96455a1..25c5a54 100644 --- a/MikScrollingBattleTextOptions/MSBTOptions.lua +++ b/MikScrollingBattleTextOptions/MSBTOptions.lua @@ -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"); diff --git a/MikScrollingBattleTextOptions/MSBTOptions.xml b/MikScrollingBattleTextOptions/MSBTOptions.xml index 2229f9e..cae8c10 100644 --- a/MikScrollingBattleTextOptions/MSBTOptions.xml +++ b/MikScrollingBattleTextOptions/MSBTOptions.xml @@ -2664,6 +2664,16 @@ + + + + + + + + + + diff --git a/MikScrollingBattleTextOptions/localization_options.lua b/MikScrollingBattleTextOptions/localization_options.lua index 06bc7d7..71098b5 100644 --- a/MikScrollingBattleTextOptions/localization_options.lua +++ b/MikScrollingBattleTextOptions/localization_options.lua @@ -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."},