From b6092a0989a7224563a287fae5211823163cb84e Mon Sep 17 00:00:00 2001 From: totalllyswede Date: Tue, 24 Feb 2026 15:44:30 -0800 Subject: [PATCH] Add files via upload --- InnerFireWatch.lua | 136 +++++++++++++++++++++++++++++++++++++++++++++ InnerFireWatch.toc | 8 +++ README.md | 44 +++++++++++++++ sounds/expire.wav | Bin 0 -> 13422 bytes 4 files changed, 188 insertions(+) create mode 100644 InnerFireWatch.lua create mode 100644 InnerFireWatch.toc create mode 100644 README.md create mode 100644 sounds/expire.wav diff --git a/InnerFireWatch.lua b/InnerFireWatch.lua new file mode 100644 index 0000000..7be821f --- /dev/null +++ b/InnerFireWatch.lua @@ -0,0 +1,136 @@ +-- InnerFireWatch (Turtle WoW / 1.12.1) +-- Alerts when "Inner Fire" buff falls off. + +InnerFireWatchDB = InnerFireWatchDB or {} + +local f = CreateFrame("Frame") +local wasActive = false + +local DEFAULTS = { + enabled = true, + soundEnabled = true, + gainedMessage = false, + useCustomSound = true, + customSoundPath = "Interface\\AddOns\\InnerFireWatch\\sounds\\expire.wav", + fallbackSound = "igQuestFailed", +} + +local function ApplyDefaults() + for k, v in pairs(DEFAULTS) do + if InnerFireWatchDB[k] == nil then + InnerFireWatchDB[k] = v + end + end +end + +local function HasInnerFire() + local i = 1 + while true do + local texture = UnitBuff("player", i) + if not texture then break end + + texture = string.lower(texture) + if string.find(texture, "spell_holy_innerfire") then + return true + end + + i = i + 1 + end + return false +end + +local function PlayExpireSound() + if not InnerFireWatchDB.soundEnabled then return end + + if InnerFireWatchDB.useCustomSound and PlaySoundFile then + PlaySoundFile(InnerFireWatchDB.customSoundPath) + return + end + + if PlaySound then + PlaySound(InnerFireWatchDB.fallbackSound) + end +end + +local function NotifyExpired() + DEFAULT_CHAT_FRAME:AddMessage("|cffff3333Inner Fire has expired!|r") + + if UIErrorsFrame and UIErrorsFrame.AddMessage then + UIErrorsFrame:AddMessage("Inner Fire expired!", 1.0, 0.1, 0.1, 1.0, 5) + end + + PlayExpireSound() +end + +local function NotifyGained() + if not InnerFireWatchDB.gainedMessage then return end + DEFAULT_CHAT_FRAME:AddMessage("|cff33ff33Inner Fire active.|r") +end + +local function Check() + if not InnerFireWatchDB.enabled then return end + + local active = HasInnerFire() + + if wasActive and not active then + NotifyExpired() + elseif (not wasActive) and active then + NotifyGained() + end + + wasActive = active +end + +f:RegisterEvent("PLAYER_LOGIN") +f:RegisterEvent("PLAYER_AURAS_CHANGED") + +f:SetScript("OnEvent", function() + Check() +end) + +f:SetScript("OnUpdate", function() + f:SetScript("OnUpdate", nil) + ApplyDefaults() + wasActive = HasInnerFire() +end) + +SLASH_INNERFIREWATCH1 = "/ifw" +SlashCmdList["INNERFIREWATCH"] = function(msg) + msg = msg and string.lower(msg) or "" + + if msg == "on" then + InnerFireWatchDB.enabled = true + DEFAULT_CHAT_FRAME:AddMessage("InnerFireWatch: enabled") + elseif msg == "off" then + InnerFireWatchDB.enabled = false + DEFAULT_CHAT_FRAME:AddMessage("InnerFireWatch: disabled") + + elseif msg == "sound on" then + InnerFireWatchDB.soundEnabled = true + DEFAULT_CHAT_FRAME:AddMessage("InnerFireWatch: sound enabled") + elseif msg == "sound off" then + InnerFireWatchDB.soundEnabled = false + DEFAULT_CHAT_FRAME:AddMessage("InnerFireWatch: sound disabled") + + elseif msg == "custom on" then + InnerFireWatchDB.useCustomSound = true + DEFAULT_CHAT_FRAME:AddMessage("InnerFireWatch: custom sound enabled") + elseif msg == "custom off" then + InnerFireWatchDB.useCustomSound = false + DEFAULT_CHAT_FRAME:AddMessage("InnerFireWatch: custom sound disabled") + + elseif msg == "gained on" then + InnerFireWatchDB.gainedMessage = true + DEFAULT_CHAT_FRAME:AddMessage("InnerFireWatch: gained message enabled") + elseif msg == "gained off" then + InnerFireWatchDB.gainedMessage = false + DEFAULT_CHAT_FRAME:AddMessage("InnerFireWatch: gained message disabled") + + else + DEFAULT_CHAT_FRAME:AddMessage("InnerFireWatch commands:") + DEFAULT_CHAT_FRAME:AddMessage(" /ifw on|off") + DEFAULT_CHAT_FRAME:AddMessage(" /ifw sound on|sound off") + DEFAULT_CHAT_FRAME:AddMessage(" /ifw custom on|custom off") + DEFAULT_CHAT_FRAME:AddMessage(" /ifw gained on|gained off") + end +end diff --git a/InnerFireWatch.toc b/InnerFireWatch.toc new file mode 100644 index 0000000..4cf6d2c --- /dev/null +++ b/InnerFireWatch.toc @@ -0,0 +1,8 @@ +## Interface: 11200 +## Title: InnerFireWatch +## Notes: Alerts you when Priest buff Inner Fire expires. +## Author: Olzon +## Version: 1.0 +## SavedVariables: InnerFireWatchDB + +InnerFireWatch.lua diff --git a/README.md b/README.md new file mode 100644 index 0000000..5d720c7 --- /dev/null +++ b/README.md @@ -0,0 +1,44 @@ +# InnerFireWatch (Turtle WoW) + +Simple addon for Turtle WoW (1.12.1) that alerts you when **Inner Fire** +expires. + +## Features + +- Detects when Inner Fire falls off +- Prints chat warning +- Shows red error text in the middle of the screen +- Plays a sound (custom or default) +- Lightweight and vanilla-friendly + +## Installation + +1. Extract the addon folder. + +2. Place `InnerFireWatch` inside: + + World of Warcraft`\Interface`{=tex}`\AddOns`{=tex}\ + +3. Restart the client or type `/reload` if supported. + +4. Enable the addon at character select if needed. + +## Slash Commands + +- `/ifw on` --- Enable addon +- `/ifw off` --- Disable addon +- `/ifw sound on|off` --- Enable/disable sound +- `/ifw custom on|off` --- Enable/disable custom sound file +- `/ifw gained on|off` --- Message when Inner Fire is gained + +## Optional Custom Sound + +Place a file named: + +Interface`\AddOns`{=tex}`\InnerFireWatch`{=tex}`\sounds`{=tex}`\expire`{=tex}.wav + +The addon will automatically use it if available. + +------------------------------------------------------------------------ + +Made for Turtle WoW. diff --git a/sounds/expire.wav b/sounds/expire.wav new file mode 100644 index 0000000000000000000000000000000000000000..22c84d58963232bc8080b8ee9da8aaa6bf29d558 GIT binary patch literal 13422 zcmaKyO_Cf}6-G;z?Xj1@BG>=~R0LB7z|;|hXGCDR^@r>cNNUNl%|h5fZ_U_h^3>_0 z`?9)>6xE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