Add files via upload
This commit is contained in:
+45
-10
@@ -14,6 +14,11 @@ local DEFAULTS = {
|
|||||||
gainedMessage = false,
|
gainedMessage = false,
|
||||||
largeMessageEnabled = true,
|
largeMessageEnabled = true,
|
||||||
|
|
||||||
|
-- Large message color (RGB 0-1 range)
|
||||||
|
largeMessageR = 1,
|
||||||
|
largeMessageG = 0.1,
|
||||||
|
largeMessageB = 0.1,
|
||||||
|
|
||||||
useCustomSound = true,
|
useCustomSound = true,
|
||||||
customSoundPath = "Interface\\AddOns\\InnerFireWatch\\sounds\\expire.wav",
|
customSoundPath = "Interface\\AddOns\\InnerFireWatch\\sounds\\expire.wav",
|
||||||
fallbackSound = "igQuestFailed",
|
fallbackSound = "igQuestFailed",
|
||||||
@@ -47,15 +52,15 @@ local function ShowCenterAlert(msg, r, g, b)
|
|||||||
CenterAlert.startTime = GetTime()
|
CenterAlert.startTime = GetTime()
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Fade out over ~1.6s
|
-- Fade out over ~2.5s
|
||||||
CenterAlert:SetScript("OnUpdate", function()
|
CenterAlert:SetScript("OnUpdate", function()
|
||||||
if not CenterAlert:IsShown() then return end
|
if not CenterAlert:IsShown() then return end
|
||||||
local t = GetTime() - (CenterAlert.startTime or 0)
|
local t = GetTime() - (CenterAlert.startTime or 0)
|
||||||
if t >= 1.6 then
|
if t >= 2.5 then
|
||||||
CenterAlert:Hide()
|
CenterAlert:Hide()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local alpha = 1 - (t / 1.6)
|
local alpha = 1 - (t / 2.5)
|
||||||
CenterAlert:SetAlpha(alpha)
|
CenterAlert:SetAlpha(alpha)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@@ -94,7 +99,7 @@ local function NotifyExpired(buffLabel)
|
|||||||
DEFAULT_CHAT_FRAME:AddMessage("|cffff3333" .. msg .. "|r")
|
DEFAULT_CHAT_FRAME:AddMessage("|cffff3333" .. msg .. "|r")
|
||||||
|
|
||||||
if InnerFireWatchDB.largeMessageEnabled then
|
if InnerFireWatchDB.largeMessageEnabled then
|
||||||
ShowCenterAlert(string.upper(buffLabel) .. " EXPIRED!")
|
ShowCenterAlert(string.upper(buffLabel) .. " EXPIRED!", InnerFireWatchDB.largeMessageR, InnerFireWatchDB.largeMessageG, InnerFireWatchDB.largeMessageB)
|
||||||
end
|
end
|
||||||
|
|
||||||
if UIErrorsFrame and UIErrorsFrame.AddMessage then
|
if UIErrorsFrame and UIErrorsFrame.AddMessage then
|
||||||
@@ -220,12 +225,42 @@ SlashCmdList["INNERFIREWATCH"] = function(msg)
|
|||||||
InnerFireWatchDB.largeMessageEnabled = false
|
InnerFireWatchDB.largeMessageEnabled = false
|
||||||
DEFAULT_CHAT_FRAME:AddMessage("InnerFireWatch: large message disabled")
|
DEFAULT_CHAT_FRAME:AddMessage("InnerFireWatch: large message disabled")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
elseif msg == "white" then
|
||||||
|
InnerFireWatchDB.largeMessageR, InnerFireWatchDB.largeMessageG, InnerFireWatchDB.largeMessageB = 1,1,1
|
||||||
|
DEFAULT_CHAT_FRAME:AddMessage("InnerFireWatch: color set to white")
|
||||||
|
elseif msg == "green" then
|
||||||
|
InnerFireWatchDB.largeMessageR, InnerFireWatchDB.largeMessageG, InnerFireWatchDB.largeMessageB = 0,1,0
|
||||||
|
DEFAULT_CHAT_FRAME:AddMessage("InnerFireWatch: color set to green")
|
||||||
|
elseif msg == "blue" then
|
||||||
|
InnerFireWatchDB.largeMessageR, InnerFireWatchDB.largeMessageG, InnerFireWatchDB.largeMessageB = 0,0.4,1
|
||||||
|
DEFAULT_CHAT_FRAME:AddMessage("InnerFireWatch: color set to blue")
|
||||||
|
elseif msg == "red" then
|
||||||
|
InnerFireWatchDB.largeMessageR, InnerFireWatchDB.largeMessageG, InnerFireWatchDB.largeMessageB = 1,0,0
|
||||||
|
DEFAULT_CHAT_FRAME:AddMessage("InnerFireWatch: color set to red")
|
||||||
|
elseif msg == "yellow" then
|
||||||
|
InnerFireWatchDB.largeMessageR, InnerFireWatchDB.largeMessageG, InnerFireWatchDB.largeMessageB = 1,1,0
|
||||||
|
DEFAULT_CHAT_FRAME:AddMessage("InnerFireWatch: color set to yellow")
|
||||||
|
elseif msg == "purple" then
|
||||||
|
InnerFireWatchDB.largeMessageR, InnerFireWatchDB.largeMessageG, InnerFireWatchDB.largeMessageB = 0.7,0,1
|
||||||
|
DEFAULT_CHAT_FRAME:AddMessage("InnerFireWatch: color set to purple")
|
||||||
else
|
else
|
||||||
DEFAULT_CHAT_FRAME:AddMessage("InnerFireWatch commands:")
|
DEFAULT_CHAT_FRAME:AddMessage("|cff00ccffInnerFireWatch Commands|r")
|
||||||
DEFAULT_CHAT_FRAME:AddMessage(" /ifw on|off")
|
DEFAULT_CHAT_FRAME:AddMessage(" ")
|
||||||
DEFAULT_CHAT_FRAME:AddMessage(" /ifw sound on|sound off")
|
DEFAULT_CHAT_FRAME:AddMessage("|cffffff00General|r")
|
||||||
DEFAULT_CHAT_FRAME:AddMessage(" /ifw custom on|custom off")
|
DEFAULT_CHAT_FRAME:AddMessage(" /ifw on")
|
||||||
DEFAULT_CHAT_FRAME:AddMessage(" /ifw gained on|gained off")
|
DEFAULT_CHAT_FRAME:AddMessage(" /ifw off")
|
||||||
DEFAULT_CHAT_FRAME:AddMessage(" /ifw large on|large off")
|
DEFAULT_CHAT_FRAME:AddMessage(" /ifw sound on|off")
|
||||||
|
DEFAULT_CHAT_FRAME:AddMessage(" /ifw gained on|off")
|
||||||
|
DEFAULT_CHAT_FRAME:AddMessage(" /ifw large on|off")
|
||||||
|
DEFAULT_CHAT_FRAME:AddMessage(" ")
|
||||||
|
DEFAULT_CHAT_FRAME:AddMessage("|cffffff00Color Presets|r")
|
||||||
|
DEFAULT_CHAT_FRAME:AddMessage(" /ifw white")
|
||||||
|
DEFAULT_CHAT_FRAME:AddMessage(" /ifw green")
|
||||||
|
DEFAULT_CHAT_FRAME:AddMessage(" /ifw blue")
|
||||||
|
DEFAULT_CHAT_FRAME:AddMessage(" /ifw red")
|
||||||
|
DEFAULT_CHAT_FRAME:AddMessage(" /ifw yellow")
|
||||||
|
DEFAULT_CHAT_FRAME:AddMessage(" /ifw purple")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
## Title: InnerFireWatch
|
## Title: InnerFireWatch
|
||||||
## Notes: Alerts you when key self-buffs expire (Priest/Warrior/Shaman).
|
## Notes: Alerts you when key self-buffs expire (Priest/Warrior/Shaman).
|
||||||
## Author: Olzon
|
## Author: Olzon
|
||||||
## Version: 1.1
|
## Version: 1.2
|
||||||
## SavedVariables: InnerFireWatchDB
|
## SavedVariables: InnerFireWatchDB
|
||||||
|
|
||||||
InnerFireWatch.lua
|
InnerFireWatch.lua
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# InnerFireWatch (Turtle WoW)
|
# InnerFireWatch (Turtle WoW)
|
||||||
|
|
||||||
Version: 1.1\
|
Version: 1.2\
|
||||||
Author: Olzon
|
Author: Olzon
|
||||||
|
|
||||||
A lightweight Turtle WoW (1.12.1) addon that alerts you when important
|
A lightweight Turtle WoW (1.12.1) addon that alerts you when important
|
||||||
@@ -38,52 +38,36 @@ self-buffs expire.
|
|||||||
- Prints a chat warning
|
- Prints a chat warning
|
||||||
- Displays red UI error text
|
- Displays red UI error text
|
||||||
- Optional large center-screen alert (toggleable)
|
- Optional large center-screen alert (toggleable)
|
||||||
|
- Preset color options for large alert
|
||||||
|
- Large center-screen alert lasts ~2.5s
|
||||||
- Optional sound alert (custom or default)
|
- Optional sound alert (custom or default)
|
||||||
- Extremely lightweight and vanilla-friendly
|
- Extremely lightweight and vanilla-friendly
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
1. Extract the zip file.
|
|
||||||
|
|
||||||
2. Place the `InnerFireWatch` folder inside:
|
|
||||||
|
|
||||||
`World of Warcraft\Interface\AddOns\`
|
|
||||||
|
|
||||||
3. Restart the client.
|
|
||||||
|
|
||||||
4. Enable the addon at the character selection screen if needed.
|
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
|
|
||||||
## Slash Commands
|
## Slash Commands
|
||||||
|
|
||||||
- `/ifw on` --- Enable addon\
|
- `/ifw on`
|
||||||
- `/ifw off` --- Disable addon\
|
- `/ifw off`
|
||||||
- `/ifw sound on` --- Enable sound\
|
- `/ifw sound on|off`
|
||||||
- `/ifw sound off` --- Disable sound\
|
- `/ifw gained on|off`
|
||||||
- `/ifw gained on` --- Message when buff is gained\
|
- `/ifw large on|off`
|
||||||
- `/ifw gained off` --- Disable gained message\
|
- `/ifw white`
|
||||||
- `/ifw large on` --- Enable large center-screen alert\
|
- `/ifw green`
|
||||||
- `/ifw large off` --- Disable large center-screen alert
|
- `/ifw blue`
|
||||||
|
- `/ifw red`
|
||||||
|
- `/ifw yellow`
|
||||||
|
- `/ifw purple`
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
## Optional: Custom Sound
|
## Optional: Custom Sound
|
||||||
|
|
||||||
To use your own alert sound:
|
Place `expire.wav` inside:
|
||||||
|
|
||||||
1. Create this folder inside the addon:
|
`Interface\AddOns\InnerFireWatch\sounds\`
|
||||||
|
|
||||||
`Interface\AddOns\InnerFireWatch\sounds\`
|
If present, it will be used automatically.
|
||||||
|
|
||||||
2. Place a file named:
|
|
||||||
|
|
||||||
`expire.wav`
|
|
||||||
|
|
||||||
If the file exists, it will be used automatically.\
|
|
||||||
If not, the default WoW alert sound will play.
|
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user