Fork of RavenOfSeven/LifeSafer_LowHealthWarning for OctoWoW
Only change vs upstream: lowercase the toc Title color escapes (|C... / |R -> |c... / |r) so the OctoLauncher addon browser renders the gradient name instead of the raw escape codes. Addon code unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,11 @@
|
|||||||
|
## Interface: 11200
|
||||||
|
## Title: |cFFB700B7Li|cFFFF00FFfe|cFFFF50FFSa|cFFFF99FFf|cFFFFC4FFe|cFFFFFFFFr|cFFFFC4FFLO|cFFFF99FFw|cFFFF50FFHea|cFFFF00FFlth |cFFB700B7Wa|cFFFFFFFFrn|cFF7FFF7Fing|r 🦇🦇
|
||||||
|
## Author: |cFF9482C9Silent|r ported and merged by tamara09🦇🦇
|
||||||
|
## Version: 0.7a
|
||||||
|
## Notes: Enables a flashing red effect when you are low on life, and a flasing blue effect when you're low on mana. This warning system was implemented by Blizzard but is not in use.|r
|
||||||
|
## SavedVariablesPerCharacter: LifeSafer_LowHealth_Thresholds, LifeSafer_LowHealth_Enabled, LifeSafer_LowHealth_SoundCombatOnly, LifeSafer_LowHealth_HealthCombatOnly, LifeSafer_LowHealth_ManaCombatOnly, LifeSafer_LowHealth_SoundEnabled, LifeSafer_LowHealth_HealthEnabled, LifeSafer_LowHealth_ManaEnabled, LifeSafer_LowHealth_HealthSync, LifeSafer_LowHealth_ManaSync, LifeSafer_LowHealth_HealthEmote, LifeSafer_LowHealth_ManaEmote, LifeSafer_LowHealth_UseAltTextures, LifeSafer_Nightfall_Enabled, LifeSafer_Nightfall_ShardEnabled, LifeSafer_Nightfall_UseLargeEffect,
|
||||||
|
LowHealth.xml
|
||||||
|
LowHealthSettings.xml
|
||||||
|
LifeSafer_Nightfall_SoundEffects
|
||||||
|
Nightfall.xml
|
||||||
|
NightfallSettings.xml
|
||||||
+285
@@ -0,0 +1,285 @@
|
|||||||
|
function LifeSafer_LowHealth_OnLoad()
|
||||||
|
|
||||||
|
local health, mana, sound = "UNIT_HEALTH", "UNIT_MANA", "SOUND"
|
||||||
|
|
||||||
|
LifeSafer_LowHealth_Version = "2.2.2"
|
||||||
|
|
||||||
|
-- these are the default values
|
||||||
|
LifeSafer_LowHealth_Default_Enabled = true
|
||||||
|
LifeSafer_LowHealth_Default_SoundEnabled = true
|
||||||
|
LifeSafer_LowHealth_Default_HealthEnabled = true
|
||||||
|
LifeSafer_LowHealth_Default_ManaEnabled = true
|
||||||
|
LifeSafer_LowHealth_Default_SoundCombatOnly = false
|
||||||
|
LifeSafer_LowHealth_Default_HealthCombatOnly = false
|
||||||
|
LifeSafer_LowHealth_Default_ManaCombatOnly = false
|
||||||
|
LifeSafer_LowHealth_Default_HealthSync = false
|
||||||
|
LifeSafer_LowHealth_Default_ManaSync = false
|
||||||
|
LifeSafer_LowHealth_Default_HealthEmote = false
|
||||||
|
LifeSafer_LowHealth_Default_ManaEmote = false
|
||||||
|
LifeSafer_LowHealth_Default_UseAltTextures = false
|
||||||
|
LifeSafer_LowHealth_Default_Thresholds = {
|
||||||
|
[health] = { [1] = 40, [2] = 20 }, -- regular and critical, in percent
|
||||||
|
[mana] = { [1] = 40, [2] = 20 },
|
||||||
|
[sound] = { [1] = 50 },
|
||||||
|
}
|
||||||
|
|
||||||
|
-- set variables to their default values. these will be overriden when variables are loaded
|
||||||
|
LifeSafer_LowHealth_Enabled = LifeSafer_LowHealth_Default_Enabled
|
||||||
|
LifeSafer_LowHealth_SoundEnabled = LifeSafer_LowHealth_Default_SoundEnabled
|
||||||
|
LifeSafer_LowHealth_HealthEnabled = LifeSafer_LowHealth_Default_HealthEnabled
|
||||||
|
LifeSafer_LowHealth_ManaEnabled = LifeSafer_LowHealth_Default_ManaEnabled
|
||||||
|
LifeSafer_LowHealth_SoundCombatOnly = LifeSafer_LowHealth_Default_SoundCombatOnly
|
||||||
|
LifeSafer_LowHealth_HealthCombatOnly = LifeSafer_LowHealth_Default_HealthCombatOnly
|
||||||
|
LifeSafer_LowHealth_ManaCombatOnly = LifeSafer_LowHealth_Default_ManaCombatOnly
|
||||||
|
LifeSafer_LowHealth_HealthSync = LifeSafer_LowHealth_Default_HealthSync
|
||||||
|
LifeSafer_LowHealth_ManaSync = LifeSafer_LowHealth_Default_ManaSync
|
||||||
|
LifeSafer_LowHealth_HealthEmote = LifeSafer_LowHealth_Default_HealthEmote
|
||||||
|
LifeSafer_LowHealth_ManaEmote = LifeSafer_LowHealth_Default_ManaEmote
|
||||||
|
LifeSafer_LowHealth_Thresholds = LifeSafer_LowHealth_Default_Thresholds
|
||||||
|
LifeSafer_LowHealth_UseAltTextures = LifeSafer_LowHealth_Default_UseAltTextures
|
||||||
|
|
||||||
|
LifeSafer_LowHealth_HealthFrame = LowHealthFrame
|
||||||
|
LifeSafer_LowHealth_ManaFrame = OutOfControlFrame
|
||||||
|
|
||||||
|
-- these values keep track of animation
|
||||||
|
this.states = { [health] = 0, [mana] = 0 }
|
||||||
|
|
||||||
|
-- change the blue frame to act as the red one
|
||||||
|
OutOfControlFrame:ClearAllPoints()
|
||||||
|
OutOfControlFrame:SetParent("WorldFrame")
|
||||||
|
OutOfControlFrame:SetAllPoints("WorldFrame")
|
||||||
|
|
||||||
|
-- set both frames transparent to avoid onload flashing
|
||||||
|
LowHealthFrame:SetAlpha(0)
|
||||||
|
OutOfControlFrame:SetAlpha(0)
|
||||||
|
|
||||||
|
-- command line
|
||||||
|
SlashCmdList["LOWHEALTHWARNINGCMD"] = LifeSafer_LowHealth_CMD
|
||||||
|
SLASH_LOWHEALTHWARNINGCMD1 = "/lowhealthwarning"
|
||||||
|
SLASH_LOWHEALTHWARNINGCMD2 = "/lowhealth"
|
||||||
|
SLASH_LOWHEALTHWARNINGCMD3 = "/lhw"
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function LifeSafer_LowHealth_ApplySettings()
|
||||||
|
|
||||||
|
-- for compatibility with older versions of saved variables
|
||||||
|
if (not LifeSafer_LowHealth_Thresholds["SOUND"]) then
|
||||||
|
LifeSafer_LowHealth_Thresholds["SOUND"] = { [1] = 30 }
|
||||||
|
end
|
||||||
|
|
||||||
|
local frame = getglobal("LowHealthWarningFrame")
|
||||||
|
|
||||||
|
LifeSafer_LowHealth_FlashFrameStop(LifeSafer_LowHealth_HealthFrame, "UNIT_HEALTH")
|
||||||
|
LifeSafer_LowHealth_FlashFrameStop(LifeSafer_LowHealth_ManaFrame, "UNIT_MANA")
|
||||||
|
|
||||||
|
-- register or unregister events
|
||||||
|
if (LifeSafer_LowHealth_Enabled) then
|
||||||
|
LifeSafer_LowHealth_HealthFrame = LifeSafer_LowHealth_UseAltTextures and LowHealthWarningFrameAltTexture1 or LowHealthFrame
|
||||||
|
frame:RegisterEvent("UNIT_DISPLAYPOWER")
|
||||||
|
if (LifeSafer_LowHealth_HealthEnabled or LifeSafer_LowHealth_SoundEnabled) then
|
||||||
|
frame:RegisterEvent("UNIT_HEALTH")
|
||||||
|
end
|
||||||
|
LifeSafer_LowHealth_ManaCheck()
|
||||||
|
LifeSafer_LowHealth_ManaFrame = LifeSafer_LowHealth_UseAltTextures and LowHealthWarningFrameAltTexture2 or OutOfControlFrame
|
||||||
|
else
|
||||||
|
frame:UnregisterEvent("UNIT_HEALTH")
|
||||||
|
frame:UnregisterEvent("UNIT_MANA")
|
||||||
|
frame:UnregisterEvent("UNIT_DISPLAYPOWER")
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function LifeSafer_LowHealth_FlashFrame(value, regular, critical, frame, state)
|
||||||
|
|
||||||
|
local REGULAR_FLASH, CRITICAL_FLASH = 1, 2
|
||||||
|
|
||||||
|
-- disable
|
||||||
|
if (value > regular or LifeSafer_LowHealth_CombatCheck(state) or UnitIsDeadOrGhost("player")) then
|
||||||
|
if (UIFrameIsFlashing(frame) or UIFrameIsFading(frame)) then
|
||||||
|
LifeSafer_LowHealth_FlashFrameStop(frame, state)
|
||||||
|
end
|
||||||
|
-- regular flash
|
||||||
|
elseif (value > critical) then
|
||||||
|
if (not (LowHealthWarningFrame.states[state] == REGULAR_FLASH)) then
|
||||||
|
if (UIFrameIsFlashing(frame)) then
|
||||||
|
--frame.flashDuration = frame.flashDuration + 10
|
||||||
|
frame.fadeInTime = 0.4
|
||||||
|
frame.fadeOutTime = 0.6
|
||||||
|
frame.flashInHoldTime = 1
|
||||||
|
else
|
||||||
|
UIFrameFlash(frame, 0.4, 0.6, -1, nil, 1, 0)
|
||||||
|
end
|
||||||
|
LowHealthWarningFrame.states[state] = REGULAR_FLASH
|
||||||
|
end
|
||||||
|
-- critical flash
|
||||||
|
else
|
||||||
|
if (not (LowHealthWarningFrame.states[state] == CRITICAL_FLASH)) then
|
||||||
|
if (LifeSafer_LowHealth_HealthEmote and state == "UNIT_HEALTH") then DoEmote("healme") end
|
||||||
|
if (LifeSafer_LowHealth_ManaEmote and state == "UNIT_MANA") then DoEmote("oom") end
|
||||||
|
if (UIFrameIsFlashing(frame)) then
|
||||||
|
--frame.flashDuration = frame.flashDuration + 10
|
||||||
|
frame.fadeInTime = 0.2
|
||||||
|
frame.fadeOutTime = 0.8
|
||||||
|
frame.flashInHoldTime = 0
|
||||||
|
else
|
||||||
|
UIFrameFlash(frame, 0.2, 0.8, -1, nil, 0, 0)
|
||||||
|
end
|
||||||
|
LowHealthWarningFrame.states[state] = CRITICAL_FLASH
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function LifeSafer_LowHealth_SmoothFlashFrame(value, threshold, frame, state)
|
||||||
|
|
||||||
|
-- disable
|
||||||
|
if (value > threshold or LifeSafer_LowHealth_CombatCheck(state) or UnitIsDeadOrGhost("player")) then
|
||||||
|
LifeSafer_LowHealth_FlashFrameStop(frame, state)
|
||||||
|
-- smooth flash
|
||||||
|
else
|
||||||
|
local rate = LifeSafer_LowHealth_GetHeartRate(state)
|
||||||
|
local flashIn, flashOut = rate * 0.1, rate * 0.4
|
||||||
|
if (UIFrameIsFlashing(frame)) then
|
||||||
|
frame.flashDuration = frame.flashDuration + rate + 1
|
||||||
|
if (rate < 1) then
|
||||||
|
frame.fadeInTime = rate * 0.15
|
||||||
|
frame.fadeOutTime = rate * 0.85
|
||||||
|
frame.flashInHoldTime = 0
|
||||||
|
else
|
||||||
|
frame.fadeInTime = 0.2
|
||||||
|
frame.fadeOutTime = 0.8
|
||||||
|
frame.flashInHoldTime = rate - 1
|
||||||
|
end
|
||||||
|
else
|
||||||
|
UIFrameFlash(frame, 0.2, 0.8, 10, nil, rate -1, 0)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function LifeSafer_LowHealth_FlashFrameStop(frame, state)
|
||||||
|
|
||||||
|
UIFrameFlashRemoveFrame(frame)
|
||||||
|
UIFrameFadeRemoveFrame(frame)
|
||||||
|
UIFrameFadeOut(frame, 0.5, frame:GetAlpha(), 0)
|
||||||
|
LowHealthWarningFrame.states[state] = 0
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function LifeSafer_LowHealth_OnEvent()
|
||||||
|
|
||||||
|
if (event == "UNIT_DISPLAYPOWER") then
|
||||||
|
LifeSafer_LowHealth_ManaCheck()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- unpacks regular threshold, critical threshold, nil, nil, nil
|
||||||
|
local t1, t2, value, frame, smooth = unpack(LifeSafer_LowHealth_Thresholds[event])
|
||||||
|
|
||||||
|
-- pick frame based on event
|
||||||
|
if (event == "UNIT_HEALTH") then
|
||||||
|
value = UnitHealth("player") / UnitHealthMax("player")
|
||||||
|
LifeSafer_LowHealth_SoundCheck(this, value * 100, unpack(LifeSafer_LowHealth_Thresholds["SOUND"]))
|
||||||
|
if (not LifeSafer_LowHealth_HealthEnabled) then
|
||||||
|
return -- this hack is because both sound and health flash need this event
|
||||||
|
end
|
||||||
|
frame = LifeSafer_LowHealth_HealthFrame
|
||||||
|
smooth = LifeSafer_LowHealth_HealthSync
|
||||||
|
elseif (event == "UNIT_MANA") then
|
||||||
|
value = UnitMana("player") / UnitManaMax("player")
|
||||||
|
frame = LifeSafer_LowHealth_ManaFrame
|
||||||
|
smooth = LifeSafer_LowHealth_ManaSync
|
||||||
|
end
|
||||||
|
|
||||||
|
if (smooth) then -- flash differently depending on settings
|
||||||
|
LifeSafer_LowHealth_SmoothFlashFrame(value * 100, t1, frame, event)
|
||||||
|
else
|
||||||
|
LifeSafer_LowHealth_FlashFrame(value * 100, t1, t2, frame, event)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function LifeSafer_LowHealth_CombatCheck(state)
|
||||||
|
|
||||||
|
local combat = UnitAffectingCombat("player")
|
||||||
|
if (not state or state == "UNIT_HEALTH") then
|
||||||
|
return LifeSafer_LowHealth_HealthCombatOnly and not combat
|
||||||
|
elseif (state == "UNIT_MANA") then
|
||||||
|
return LifeSafer_LowHealth_ManaCombatOnly and not combat
|
||||||
|
else
|
||||||
|
return LifeSafer_LowHealth_SoundCombatOnly and not combat
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function LifeSafer_LowHealth_SoundCheck(frame, value, threshold)
|
||||||
|
|
||||||
|
-- disable
|
||||||
|
if (value > threshold or not LifeSafer_LowHealth_SoundEnabled or LifeSafer_LowHealth_CombatCheck("SOUND") or UnitIsDeadOrGhost("player")) then
|
||||||
|
if (frame.heartRate) then
|
||||||
|
frame:SetScript("OnUpdate", nil)
|
||||||
|
frame.heartRate = nil
|
||||||
|
end
|
||||||
|
-- regular
|
||||||
|
elseif (not frame.heartRate) then
|
||||||
|
frame:SetScript("OnUpdate", LifeSafer_LowHealth_OnUpdate)
|
||||||
|
frame.timer = 1
|
||||||
|
frame.heartRate = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function LifeSafer_LowHealth_ManaCheck()
|
||||||
|
|
||||||
|
local mana, frame = "UNIT_MANA", getglobal("LowHealthWarningFrame")
|
||||||
|
if (LifeSafer_LowHealth_ManaEnabled and UnitPowerType("player") == 0) then
|
||||||
|
-- player is using mana
|
||||||
|
frame:RegisterEvent(mana)
|
||||||
|
else
|
||||||
|
frame:UnregisterEvent(mana)
|
||||||
|
LifeSafer_LowHealth_FlashFrameStop(LifeSafer_LowHealth_ManaFrame, mana)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function LifeSafer_LowHealth_OnUpdate()
|
||||||
|
|
||||||
|
if (this.timer > this.heartRate) then
|
||||||
|
PlaySoundFile("Interface\\AddOns\\LifeSafer_LowHealthWarning\\Sounds\\LifeSafer_LifeAlert_Low.mp3")
|
||||||
|
this.heartRate = LifeSafer_LowHealth_GetHeartRate()
|
||||||
|
this.timer = 0
|
||||||
|
else
|
||||||
|
this.timer = this.timer + arg1
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function LifeSafer_LowHealth_GetHeartRate(state)
|
||||||
|
if (state and state == "UNIT_MANA") then
|
||||||
|
return 0.5 + 2.0 * UnitMana("player") / UnitManaMax("player")
|
||||||
|
else
|
||||||
|
return 0.5 + 2.0 * UnitHealth("player") / UnitHealthMax("player")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function LifeSafer_LowHealth_CMD(arg1)
|
||||||
|
|
||||||
|
if (not arg1) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if (string.find(arg1, "^settings$") or arg1 == "") then
|
||||||
|
ShowUIPanel(LowHealthSettingsFrame)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
|
||||||
|
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
|
||||||
|
..\FrameXML\UI.xsd">
|
||||||
|
|
||||||
|
<Script file="LowHealth.lua" />
|
||||||
|
|
||||||
|
<Frame name="LowHealthWarningFrame">
|
||||||
|
<Frames>
|
||||||
|
<Frame name="LowHealthWarningFrameAlt" parent="WorldFrame" setAllPoints="true">
|
||||||
|
<Layers>
|
||||||
|
<Layer level="BACKGROUND">
|
||||||
|
<Texture name="$parentTexture1" file="Interface\AddOns\LifeSafer_LowHealthWarning\Textures\lowhealth1.tga" alphaMode="ADD" />
|
||||||
|
<Texture name="$parentTexture2" file="Interface\AddOns\LifeSafer_LowHealthWarning\Textures\lowhealth2.tga" alphaMode="ADD" />
|
||||||
|
</Layer>
|
||||||
|
</Layers>
|
||||||
|
<Scripts>
|
||||||
|
<OnLoad>
|
||||||
|
getglobal(this:GetName().. "Texture1"):SetAlpha(0)
|
||||||
|
getglobal(this:GetName().. "Texture1"):SetVertexColor(1, 0.1, 0.1)
|
||||||
|
getglobal(this:GetName().. "Texture2"):SetAlpha(0)
|
||||||
|
getglobal(this:GetName().. "Texture2"):SetVertexColor(0.1, 0.1, 1)
|
||||||
|
</OnLoad>
|
||||||
|
</Scripts>
|
||||||
|
</Frame>
|
||||||
|
</Frames>
|
||||||
|
<Scripts>
|
||||||
|
<OnLoad>
|
||||||
|
-- initialize data
|
||||||
|
LifeSafer_LowHealth_OnLoad()
|
||||||
|
-- register meta events
|
||||||
|
this:RegisterEvent("VARIABLES_LOADED")
|
||||||
|
</OnLoad>
|
||||||
|
<OnEvent>
|
||||||
|
-- handle health/mana events
|
||||||
|
if (event == "UNIT_HEALTH" or event == "UNIT_MANA") then
|
||||||
|
if (arg1 == "player") then
|
||||||
|
LifeSafer_LowHealth_OnEvent(event)
|
||||||
|
end
|
||||||
|
elseif (event == "VARIABLES_LOADED" or this.running) then
|
||||||
|
LifeSafer_LowHealth_ApplySettings()
|
||||||
|
this.running = true
|
||||||
|
end
|
||||||
|
</OnEvent>
|
||||||
|
</Scripts>
|
||||||
|
</Frame>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</Ui>
|
||||||
@@ -0,0 +1,161 @@
|
|||||||
|
|
||||||
|
function LifeSafer_LowHealthSettings_OnLoad()
|
||||||
|
|
||||||
|
local frame = "LowHealthSettingsFrame"
|
||||||
|
|
||||||
|
-- setup GUI labels
|
||||||
|
for i, value in LifeSafer_LowHealthSettings_Labels do
|
||||||
|
getglobal(frame.. "Label".. i):SetText(value)
|
||||||
|
end
|
||||||
|
getglobal(frame.. "Version"):SetText(LifeSafer_LowHealth_Version)
|
||||||
|
|
||||||
|
-- fields and checkbuttons
|
||||||
|
for field, buttons in LifeSafer_LowHealthSettings_CheckButtons do
|
||||||
|
getglobal(frame.. field.. "Options".. "Title"):SetText(field)
|
||||||
|
for i, data in buttons do
|
||||||
|
local text, tooltip = unpack(data)
|
||||||
|
local button = frame.. field.. "Options".. "CheckButton".. i
|
||||||
|
getglobal(button.. "Text"):SetText(text)
|
||||||
|
getglobal(button).tooltipText = tooltip
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- sliders
|
||||||
|
for field, sliders in LifeSafer_LowHealthSettings_Sliders do
|
||||||
|
for i, data in sliders do
|
||||||
|
getglobal(frame.. field.. "Options".. "ThresholdSlider".. i.. "Text"):SetText(data[1])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- regular buttons
|
||||||
|
for i, value in LifeSafer_LowHealthSettings_Buttons do
|
||||||
|
getglobal(frame.. "Button".. i.. "Text"):SetText(value)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- make config window close on escape
|
||||||
|
tinsert(UISpecialFrames, "LowHealthSettingsFrame")
|
||||||
|
|
||||||
|
-- add window to built-in UI window managment
|
||||||
|
UIPanelWindows["LowHealthSettingsFrame"] = { area = "left", pushable = 2, whileDead = 1 }
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function LifeSafer_LowHealthSettings_SetValues(checkButtonValues, sliderValues)
|
||||||
|
|
||||||
|
local frame = "LowHealthSettingsFrame"
|
||||||
|
|
||||||
|
-- set components
|
||||||
|
for field, buttons in LifeSafer_LowHealthSettings_CheckButtons do
|
||||||
|
for i in buttons do
|
||||||
|
getglobal(frame.. field.. "Options".. "CheckButton".. i):SetChecked(checkButtonValues[field][i])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- sliders
|
||||||
|
for field, sliders in LifeSafer_LowHealthSettings_Sliders do
|
||||||
|
for i, _ in sliders do
|
||||||
|
getglobal(frame.. field.. "Options".. "ThresholdSlider".. i):SetValue(sliderValues[field][i])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function LifeSafer_LowHealthSettings_OptionsSlider_OnValueChanged()
|
||||||
|
|
||||||
|
-- set tooltip to reflect the changing value
|
||||||
|
local frame = "LowHealthSettingsFrame"
|
||||||
|
local _, _, parent, id = string.find(this:GetName(), frame.. "(.+)OptionsThresholdSlider(.+)")
|
||||||
|
this.tooltipText = format(LifeSafer_LowHealthSettings_Sliders[parent][tonumber(id)][2], this:GetValue())
|
||||||
|
GameTooltip:SetText(this.tooltipText, nil, nil, nil, nil, 1)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function LifeSafer_LowHealthSettings_ApplySettings()
|
||||||
|
|
||||||
|
local health, mana, sound = "UNIT_HEALTH", "UNIT_MANA", "SOUND"
|
||||||
|
local frame = "LowHealthSettingsFrame"
|
||||||
|
local ocb = "OptionsCheckButton"
|
||||||
|
local ots = "OptionsThresholdSlider"
|
||||||
|
|
||||||
|
-- set flags
|
||||||
|
LifeSafer_LowHealth_Enabled = getglobal(frame.. "General".. ocb.. "1"):GetChecked() or false
|
||||||
|
LifeSafer_LowHealth_UseAltTextures = getglobal(frame.. "General".. ocb.. "2"):GetChecked() or false
|
||||||
|
LifeSafer_LowHealth_SoundEnabled = getglobal(frame.. "Sound".. ocb.. "1"):GetChecked() or false
|
||||||
|
LifeSafer_LowHealth_SoundCombatOnly = getglobal(frame.. "Sound".. ocb.. "2"):GetChecked() or false
|
||||||
|
LifeSafer_LowHealth_HealthEnabled = getglobal(frame.. "Health".. ocb.. "1"):GetChecked() or false
|
||||||
|
LifeSafer_LowHealth_HealthCombatOnly = getglobal(frame.. "Health".. ocb.. "2"):GetChecked() or false
|
||||||
|
LifeSafer_LowHealth_HealthSync = getglobal(frame.. "Health".. ocb.. "3"):GetChecked() or false
|
||||||
|
LifeSafer_LowHealth_HealthEmote = getglobal(frame.. "Health".. ocb.. "4"):GetChecked() or false
|
||||||
|
LifeSafer_LowHealth_ManaEnabled = getglobal(frame.. "Mana".. ocb.. "1"):GetChecked() or false
|
||||||
|
LifeSafer_LowHealth_ManaCombatOnly = getglobal(frame.. "Mana".. ocb.. "2"):GetChecked() or false
|
||||||
|
LifeSafer_LowHealth_ManaSync = getglobal(frame.. "Mana".. ocb.. "3"):GetChecked() or false
|
||||||
|
LifeSafer_LowHealth_ManaEmote = getglobal(frame.. "Mana".. ocb.. "4"):GetChecked() or false
|
||||||
|
|
||||||
|
-- set thresholds
|
||||||
|
LifeSafer_LowHealth_Thresholds[sound][1] = getglobal(frame.. "Sound".. ots.. 1):GetValue()
|
||||||
|
LifeSafer_LowHealth_Thresholds[health][1] = getglobal(frame.. "Health".. ots.. 1):GetValue()
|
||||||
|
LifeSafer_LowHealth_Thresholds[health][2] = getglobal(frame.. "Health".. ots.. 2):GetValue()
|
||||||
|
LifeSafer_LowHealth_Thresholds[mana][1] = getglobal(frame.. "Mana".. ots.. 1):GetValue()
|
||||||
|
LifeSafer_LowHealth_Thresholds[mana][2] = getglobal(frame.. "Mana".. ots.. 2):GetValue()
|
||||||
|
|
||||||
|
-- propagate settings
|
||||||
|
LifeSafer_LowHealth_ApplySettings()
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function LifeSafer_LowHealthSettings_PrepareValues(default)
|
||||||
|
|
||||||
|
default = default or ""
|
||||||
|
|
||||||
|
local checkButtons = {
|
||||||
|
["General"] = {
|
||||||
|
[1] = getglobal("LifeSafer_LowHealth".. default.. "_Enabled"),
|
||||||
|
[2] = getglobal("LifeSafer_LowHealth".. default.. "_UseAltTextures"),
|
||||||
|
},
|
||||||
|
["Sound"] = {
|
||||||
|
[1] = getglobal("LifeSafer_LowHealth".. default.. "_SoundEnabled"),
|
||||||
|
[2] = getglobal("LifeSafer_LowHealth".. default.. "_SoundCombatOnly"),
|
||||||
|
},
|
||||||
|
["Health"] = {
|
||||||
|
[1] = getglobal("LifeSafer_LowHealth".. default.. "_HealthEnabled"),
|
||||||
|
[2] = getglobal("LifeSafer_LowHealth".. default.. "_HealthCombatOnly"),
|
||||||
|
[3] = getglobal("LifeSafer_LowHealth".. default.. "_HealthSync"),
|
||||||
|
[4] = getglobal("LifeSafer_LowHealth".. default.. "_HealthEmote"),
|
||||||
|
},
|
||||||
|
["Mana"] = {
|
||||||
|
[1] = getglobal("LifeSafer_LowHealth".. default.. "_ManaEnabled"),
|
||||||
|
[2] = getglobal("LifeSafer_LowHealth".. default.. "_ManaCombatOnly"),
|
||||||
|
[3] = getglobal("LifeSafer_LowHealth".. default.. "_ManaSync"),
|
||||||
|
[4] = getglobal("LifeSafer_LowHealth".. default.. "_ManaEmote"),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
local health, mana, sound = "UNIT_HEALTH", "UNIT_MANA", "SOUND"
|
||||||
|
local thresholds = getglobal("LifeSafer_LowHealth".. default.. "_Thresholds")
|
||||||
|
local sliders = {
|
||||||
|
["Sound"] = thresholds["SOUND"],
|
||||||
|
["Health"] = thresholds["UNIT_HEALTH"],
|
||||||
|
["Mana"] = thresholds["UNIT_MANA"],
|
||||||
|
}
|
||||||
|
|
||||||
|
LifeSafer_LowHealthSettings_SetValues(checkButtons, sliders)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function LifeSafer_LowHealthSettings_OnShow()
|
||||||
|
|
||||||
|
LifeSafer_LowHealthSettings_PrepareValues()
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function LifeSafer_LowHealthSettings_ResetSettings()
|
||||||
|
|
||||||
|
LifeSafer_LowHealthSettings_PrepareValues("_Default")
|
||||||
|
|
||||||
|
end
|
||||||
@@ -0,0 +1,416 @@
|
|||||||
|
|
||||||
|
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
|
||||||
|
..\FrameXML\UI.xsd">
|
||||||
|
|
||||||
|
<Script file="localization.lua" />
|
||||||
|
<Script file="LowHealthSettings.lua" />
|
||||||
|
|
||||||
|
<Slider name="LowHealthSliderTemplate" inherits="OptionsSliderTemplate" virtual="true">
|
||||||
|
<Scripts>
|
||||||
|
<OnLoad>
|
||||||
|
getglobal(this:GetName().."High"):SetText("99%")
|
||||||
|
getglobal(this:GetName().."Low"):SetText("1%")
|
||||||
|
this:SetMinMaxValues(1, 99)
|
||||||
|
this:SetValueStep(1)
|
||||||
|
this:SetValue(1)
|
||||||
|
</OnLoad>
|
||||||
|
<OnValueChanged>
|
||||||
|
LifeSafer_LowHealthSettings_OptionsSlider_OnValueChanged()
|
||||||
|
</OnValueChanged>
|
||||||
|
</Scripts>
|
||||||
|
</Slider>
|
||||||
|
|
||||||
|
<Frame name="LowHealthSettingsFrame" toplevel="true" movable="true" enableMouse="true" parent="UIParent" hidden="true">
|
||||||
|
|
||||||
|
<Size>
|
||||||
|
<AbsDimension x="384" y="520" />
|
||||||
|
</Size>
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="-184"/>
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
|
||||||
|
<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
|
||||||
|
<BackgroundInsets>
|
||||||
|
<AbsInset left="11" right="12" top="12" bottom="11" />
|
||||||
|
</BackgroundInsets>
|
||||||
|
<TileSize>
|
||||||
|
<AbsValue val="32" />
|
||||||
|
</TileSize>
|
||||||
|
<EdgeSize>
|
||||||
|
<AbsValue val="32" />
|
||||||
|
</EdgeSize>
|
||||||
|
</Backdrop>
|
||||||
|
|
||||||
|
<Layers>
|
||||||
|
<Layer level="ARTWORK">
|
||||||
|
<Texture name="$parentHeader" file="Interface\DialogFrame\UI-DialogBox-Header">
|
||||||
|
<Size>
|
||||||
|
<AbsDimension x="300" y="64" />
|
||||||
|
</Size>
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOP">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="12" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</Texture>
|
||||||
|
<FontString name="$parentLabel1" inherits="GameFontNormal">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOP" relativeTo="$parentHeader">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="-14" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</FontString>
|
||||||
|
<FontString name="$parentVersion" inherits="GameFontNormal" justifyH="RIGHT">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPRIGHT" relativeTo="$parent" relativePoint="TOPRIGHT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="-20" y="-20" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</FontString>
|
||||||
|
<FontString name="$parentLabel2" inherits="GameFontNormal" justifyH="RIGHT">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="RIGHT" relativeTo="$parentVersion" relativePoint="LEFT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="-4" y="0" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</FontString>
|
||||||
|
</Layer>
|
||||||
|
</Layers>
|
||||||
|
|
||||||
|
<Frames>
|
||||||
|
|
||||||
|
<Frame name="$parentGeneralOptions" inherits="OptionFrameBoxTemplate">
|
||||||
|
<Size>
|
||||||
|
<AbsDimension x="360" y="50" />
|
||||||
|
</Size>
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="12" y="-45"/>
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
<Frames>
|
||||||
|
|
||||||
|
<CheckButton name="$parentCheckButton1" inherits="OptionsCheckButtonTemplate">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="20" y="-10" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</CheckButton>
|
||||||
|
|
||||||
|
<CheckButton name="$parentCheckButton2" inherits="OptionsCheckButtonTemplate">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="LEFT" relativeTo="$parentCheckButton1" relativePoint="RIGHT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="150" y="0" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</CheckButton>
|
||||||
|
|
||||||
|
</Frames>
|
||||||
|
<Scripts>
|
||||||
|
<OnLoad>
|
||||||
|
this:SetBackdropBorderColor(0.4, 0.4, 0.4)
|
||||||
|
this:SetBackdropColor(0.15, 0.15, 0.15)
|
||||||
|
</OnLoad>
|
||||||
|
</Scripts>
|
||||||
|
</Frame>
|
||||||
|
|
||||||
|
<Frame name="$parentSoundOptions" inherits="OptionFrameBoxTemplate">
|
||||||
|
<Size>
|
||||||
|
<AbsDimension x="360" y="90" />
|
||||||
|
</Size>
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativeTo="$parentGeneralOptions" relativePoint="BOTTOMLEFT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="-20"/>
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
<Frames>
|
||||||
|
|
||||||
|
<CheckButton name="$parentCheckButton1" inherits="OptionsCheckButtonTemplate">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="20" y="-10" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</CheckButton>
|
||||||
|
|
||||||
|
<CheckButton name="$parentCheckButton2" inherits="OptionsCheckButtonTemplate">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="LEFT" relativeTo="$parentCheckButton1" relativePoint="RIGHT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="150" y="0" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</CheckButton>
|
||||||
|
|
||||||
|
<Slider name="$parentThresholdSlider1" inherits="LowHealthSliderTemplate">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="30" y="-50" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</Slider>
|
||||||
|
|
||||||
|
</Frames>
|
||||||
|
<Scripts>
|
||||||
|
<OnLoad>
|
||||||
|
this:SetBackdropBorderColor(0.4, 0.4, 0.4)
|
||||||
|
this:SetBackdropColor(0.15, 0.15, 0.15)
|
||||||
|
</OnLoad>
|
||||||
|
</Scripts>
|
||||||
|
</Frame>
|
||||||
|
|
||||||
|
<Frame name="$parentHealthOptions" inherits="OptionFrameBoxTemplate">
|
||||||
|
<Size>
|
||||||
|
<AbsDimension x="180" y="230" />
|
||||||
|
</Size>
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativeTo="$parentSoundOptions" relativePoint="BOTTOMLEFT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="-20"/>
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
<Frames>
|
||||||
|
|
||||||
|
<CheckButton name="$parentCheckButton1" inherits="OptionsCheckButtonTemplate">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="10" y="-10" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</CheckButton>
|
||||||
|
|
||||||
|
<Slider name="$parentThresholdSlider1" inherits="LowHealthSliderTemplate">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativeTo="$parentCheckButton1" relativePoint="BOTTOMLEFT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="10" y="-10" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</Slider>
|
||||||
|
|
||||||
|
<Slider name="$parentThresholdSlider2" inherits="LowHealthSliderTemplate">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOP" relativeTo="$parentThresholdSlider1" relativePoint="BOTTOM">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="-20" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</Slider>
|
||||||
|
|
||||||
|
<CheckButton name="$parentCheckButton2" inherits="OptionsCheckButtonTemplate">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativeTo="$parentThresholdSlider2" relativePoint="BOTTOMLEFT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="-10" y="-20" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</CheckButton>
|
||||||
|
|
||||||
|
<CheckButton name="$parentCheckButton3" inherits="OptionsCheckButtonTemplate">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativeTo="$parentCheckButton2" relativePoint="BOTTOMLEFT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="0" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</CheckButton>
|
||||||
|
|
||||||
|
<CheckButton name="$parentCheckButton4" inherits="OptionsCheckButtonTemplate">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativeTo="$parentCheckButton3" relativePoint="BOTTOMLEFT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="0" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</CheckButton>
|
||||||
|
|
||||||
|
</Frames>
|
||||||
|
<Scripts>
|
||||||
|
<OnLoad>
|
||||||
|
this:SetBackdropBorderColor(0.4, 0.4, 0.4)
|
||||||
|
this:SetBackdropColor(0.15, 0.15, 0.15)
|
||||||
|
</OnLoad>
|
||||||
|
</Scripts>
|
||||||
|
</Frame>
|
||||||
|
|
||||||
|
<Frame name="$parentManaOptions" inherits="OptionFrameBoxTemplate">
|
||||||
|
<Size>
|
||||||
|
<AbsDimension x="180" y="230" />
|
||||||
|
</Size>
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPRIGHT" relativeTo="$parentSoundOptions" relativePoint="BOTTOMRIGHT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="-20"/>
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
<Frames>
|
||||||
|
|
||||||
|
<CheckButton name="$parentCheckButton1" inherits="OptionsCheckButtonTemplate">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="10" y="-10" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</CheckButton>
|
||||||
|
|
||||||
|
<Slider name="$parentThresholdSlider1" inherits="LowHealthSliderTemplate">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativeTo="$parentCheckButton1" relativePoint="BOTTOMLEFT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="10" y="-10" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</Slider>
|
||||||
|
|
||||||
|
<Slider name="$parentThresholdSlider2" inherits="LowHealthSliderTemplate">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOP" relativeTo="$parentThresholdSlider1" relativePoint="BOTTOM">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="-20" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</Slider>
|
||||||
|
|
||||||
|
<CheckButton name="$parentCheckButton2" inherits="OptionsCheckButtonTemplate">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativeTo="$parentThresholdSlider2" relativePoint="BOTTOMLEFT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="-10" y="-20" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</CheckButton>
|
||||||
|
|
||||||
|
<CheckButton name="$parentCheckButton3" inherits="OptionsCheckButtonTemplate">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativeTo="$parentCheckButton2" relativePoint="BOTTOMLEFT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="0" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</CheckButton>
|
||||||
|
|
||||||
|
<CheckButton name="$parentCheckButton4" inherits="OptionsCheckButtonTemplate">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativeTo="$parentCheckButton3" relativePoint="BOTTOMLEFT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="0" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</CheckButton>
|
||||||
|
|
||||||
|
</Frames>
|
||||||
|
<Scripts>
|
||||||
|
<OnLoad>
|
||||||
|
this:SetBackdropBorderColor(0.4, 0.4, 0.4)
|
||||||
|
this:SetBackdropColor(0.15, 0.15, 0.15)
|
||||||
|
</OnLoad>
|
||||||
|
</Scripts>
|
||||||
|
</Frame>
|
||||||
|
|
||||||
|
|
||||||
|
<Button name="$parentButton1" inherits="OptionsButtonTemplate">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="BOTTOMLEFT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="16" y="16" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
<Scripts>
|
||||||
|
<OnClick>
|
||||||
|
LifeSafer_LowHealthSettings_ResetSettings()
|
||||||
|
</OnClick>
|
||||||
|
</Scripts>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<Button name="$parentButton2" inherits="OptionsButtonTemplate">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="BOTTOMRIGHT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="-16" y="16" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
<Scripts>
|
||||||
|
<OnClick>
|
||||||
|
HideUIPanel(this:GetParent())
|
||||||
|
</OnClick>
|
||||||
|
</Scripts>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<Button name="$parentButton3" inherits="OptionsButtonTemplate">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="RIGHT" relativeTo="$parentButton2" relativePoint="LEFT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="-12" y="0" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
<Scripts>
|
||||||
|
<OnClick>
|
||||||
|
LifeSafer_LowHealthSettings_ApplySettings()
|
||||||
|
HideUIPanel(this:GetParent())
|
||||||
|
</OnClick>
|
||||||
|
</Scripts>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
</Frames>
|
||||||
|
|
||||||
|
<Scripts>
|
||||||
|
<OnLoad>
|
||||||
|
LifeSafer_LowHealthSettings_OnLoad()
|
||||||
|
</OnLoad>
|
||||||
|
<OnShow>
|
||||||
|
LifeSafer_LowHealthSettings_OnShow()
|
||||||
|
PlaySound("igCharacterInfoOpen")
|
||||||
|
</OnShow>
|
||||||
|
<OnHide>
|
||||||
|
PlaySound("igCharacterInfoClose")
|
||||||
|
</OnHide>
|
||||||
|
</Scripts>
|
||||||
|
|
||||||
|
</Frame>
|
||||||
|
|
||||||
|
</Ui>
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
|
||||||
|
-- TODO: magic numbers everywhere
|
||||||
|
|
||||||
|
function LifeSafer_Nightfall_OnLoad()
|
||||||
|
|
||||||
|
LifeSafer_Nightfall_Version = "1.1.4"
|
||||||
|
|
||||||
|
-- set default values. these will be overriden when variables are loaded
|
||||||
|
LifeSafer_Nightfall_Default_Enabled = true
|
||||||
|
LifeSafer_Nightfall_Default_ShardEnabled = true
|
||||||
|
LifeSafer_Nightfall_Default_UseLargeEffect = false
|
||||||
|
LifeSafer_Nightfall_Default_SoundEffects = false
|
||||||
|
|
||||||
|
LifeSafer_Nightfall_Enabled = LifeSafer_Nightfall_Default_Enabled
|
||||||
|
LifeSafer_Nightfall_ShardEnabled = LifeSafer_Nightfall_Default_ShardEnabled
|
||||||
|
LifeSafer_Nightfall_UseLargeEffect = LifeSafer_Nightfall_Default_UseLargeEffect
|
||||||
|
LifeSafer_Nightfall_SoundEffects = LifeSafer_Nightfall_Default_SoundEffects
|
||||||
|
|
||||||
|
-- hide both frames to avoid quick flashes
|
||||||
|
NightfallFrameEffect1:SetAlpha(0)
|
||||||
|
NightfallFrameEffect1Texture:SetVertexColor(1, 0, 0.8) -- COLOR: shadow trance frame
|
||||||
|
NightfallFrameEffect2:SetAlpha(0)
|
||||||
|
NightfallFrameEffect2Texture:SetVertexColor(1, 0.5, 1) -- COLOR: shard frame
|
||||||
|
|
||||||
|
-- command line
|
||||||
|
SlashCmdList["NIGHTFALLCMD"] = LifeSafer_Nightfall_CMD
|
||||||
|
SLASH_NIGHTFALLCMD1 = "/nightfall"
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function LifeSafer_Nightfall_ApplySettings()
|
||||||
|
|
||||||
|
local frame = getglobal("NightfallFrame")
|
||||||
|
|
||||||
|
-- register or unregister when turning modes on or off
|
||||||
|
if (LifeSafer_Nightfall_ShardEnabled) then
|
||||||
|
frame:RegisterEvent("CHAT_MSG_LOOT")
|
||||||
|
else
|
||||||
|
frame:UnregisterEvent("CHAT_MSG_LOOT")
|
||||||
|
end
|
||||||
|
|
||||||
|
if (LifeSafer_Nightfall_Enabled) then
|
||||||
|
frame:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_SELF_BUFFS")
|
||||||
|
frame:RegisterEvent("CHAT_MSG_SPELL_AURA_GONE_SELF")
|
||||||
|
if (LifeSafer_Nightfall_UseLargeEffect) then
|
||||||
|
NightfallFrameEffect1Texture:SetVertexColor(1, 0, 0.8) -- COLOR: shadow trance frame
|
||||||
|
--NightfallFrameEffect1Texture:SetTexture("Interface\\Addons\\LifeSafer_LowHealthWarning\\Texture\\flash3.tga")
|
||||||
|
else
|
||||||
|
NightfallFrameEffect1Texture:SetVertexColor(0.5, 0, 0.4) -- COLOR: shadow trance frame
|
||||||
|
--NightfallFrameEffect1Texture:SetTexture("Interface\\Addons\\LifeSafer_LowHealthWarning\\Texture\\flash1.tga")
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frame:UnregisterEvent("CHAT_MSG_SPELL_PERIODIC_SELF_BUFFS")
|
||||||
|
frame:UnregisterEvent("CHAT_MSG_SPELL_AURA_GONE_SELF")
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function LifeSafer_Nightfall_OnEvent()
|
||||||
|
|
||||||
|
if (event == "CHAT_MSG_SPELL_PERIODIC_SELF_BUFFS") then
|
||||||
|
if (string.find(arg1, LifeSafer_Nightfall_String_ShadowTrance)) then
|
||||||
|
local frame = NightfallFrameEffect1
|
||||||
|
UIFrameFlash(frame, 0.2, 0.8, 10, nil, 0.2, 0)
|
||||||
|
if (LifeSafer_Nightfall_SoundEffects) then
|
||||||
|
PlaySoundFile("Interface\\AddOns\\LifeSafer_LowHealthWarning\\Sounds\\ShadowTrance.mp3")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
elseif (event == "CHAT_MSG_SPELL_AURA_GONE_SELF") then
|
||||||
|
if (string.find(arg1, LifeSafer_Nightfall_String_ShadowTrance)) then
|
||||||
|
local frame = NightfallFrameEffect1
|
||||||
|
UIFrameFlashRemoveFrame(frame)
|
||||||
|
UIFrameFadeRemoveFrame(frame)
|
||||||
|
UIFrameFadeOut(frame, 0.8, frame:GetAlpha(), 0)
|
||||||
|
end
|
||||||
|
elseif (event == "CHAT_MSG_LOOT") then
|
||||||
|
if (string.find (arg1, LifeSafer_Nightfall_String_YouCreate) and string.find(arg1, LifeSafer_Nightfall_String_SoulShard)) then
|
||||||
|
local frame = NightfallFrameEffect2
|
||||||
|
UIFrameFlash(frame, 0.01, 0.5, 1, nil, 1, 0)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function LifeSafer_Nightfall_CMD(arg1)
|
||||||
|
|
||||||
|
if (not arg1) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if (string.find(arg1, "^settings$") or arg1 == "") then
|
||||||
|
ShowUIPanel(NightfallSettingsFrame)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
|
||||||
|
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
|
||||||
|
..\FrameXML\UI.xsd">
|
||||||
|
|
||||||
|
<Script file="Nightfall.lua" />
|
||||||
|
|
||||||
|
<Frame name="NightfallEffectTemplate" hidden="true" setAllPoints="true" virtual="true">
|
||||||
|
<Scripts>
|
||||||
|
<OnLoad>
|
||||||
|
this:SetAlpha(0)
|
||||||
|
</OnLoad>
|
||||||
|
</Scripts>
|
||||||
|
</Frame>
|
||||||
|
|
||||||
|
<Frame name="NightfallFrame" parent="WorldFrame" setAllPoints="true">
|
||||||
|
<Frames>
|
||||||
|
<Frame name="$parentEffect1" inherits="NightfallEffectTemplate">
|
||||||
|
<Layers>
|
||||||
|
<Layer level="BACKGROUND">
|
||||||
|
<Texture name="$parentTexture" file="Interface\Addons\LifeSafer_LowHealthWarning\Textures\flash1.tga" alphaMode="ADD" />
|
||||||
|
</Layer>
|
||||||
|
</Layers>
|
||||||
|
</Frame>
|
||||||
|
<Frame name="$parentEffect2" inherits="NightfallEffectTemplate">
|
||||||
|
<Layers>
|
||||||
|
<Layer level="BACKGROUND">
|
||||||
|
<Texture name="$parentTexture" file="Interface\Addons\LifeSafer_LowHealthWarning\Textures\flash2.tga" alphaMode="ADD" />
|
||||||
|
</Layer>
|
||||||
|
</Layers>
|
||||||
|
</Frame>
|
||||||
|
</Frames>
|
||||||
|
|
||||||
|
<Scripts>
|
||||||
|
<OnLoad>
|
||||||
|
LifeSafer_Nightfall_OnLoad()
|
||||||
|
this:RegisterEvent("VARIABLES_LOADED")
|
||||||
|
</OnLoad>
|
||||||
|
<OnEvent>
|
||||||
|
if (event == "VARIABLES_LOADED") then
|
||||||
|
LifeSafer_Nightfall_ApplySettings()
|
||||||
|
else
|
||||||
|
LifeSafer_Nightfall_OnEvent(event)
|
||||||
|
end
|
||||||
|
</OnEvent>
|
||||||
|
</Scripts>
|
||||||
|
</Frame>
|
||||||
|
|
||||||
|
</Ui>
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
|
||||||
|
function LifeSafer_NightfallSettings_OnLoad()
|
||||||
|
|
||||||
|
-- setup GUI labels
|
||||||
|
for i, value in LifeSafer_NightfallSettings_Labels do
|
||||||
|
getglobal("NightfallSettingsFrameLabel".. i):SetText(value)
|
||||||
|
end
|
||||||
|
getglobal("NightfallSettingsFrameVersion"):SetText(LifeSafer_Nightfall_Version)
|
||||||
|
|
||||||
|
-- setup components
|
||||||
|
-- checkbuttons
|
||||||
|
for i, value in LifeSafer_NightfallSettings_CheckButtonTooltipStrings do
|
||||||
|
getglobal("NightfallSettingsFrameCheckButton".. i).tooltipText = value
|
||||||
|
end
|
||||||
|
|
||||||
|
for i, value in LifeSafer_NightfallSettings_CheckButtonStrings do
|
||||||
|
getglobal("NightfallSettingsFrameCheckButton".. i.. "Text"):SetText(value)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- regular buttons
|
||||||
|
for i, value in LifeSafer_NightfallSettings_ButtonStrings do
|
||||||
|
getglobal("NightfallSettingsFrameButton".. i.. "Text"):SetText(value)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- make config window close on escape
|
||||||
|
tinsert(UISpecialFrames, "NightfallSettingsFrame")
|
||||||
|
|
||||||
|
-- add window to built-in UI window managment
|
||||||
|
UIPanelWindows["NightfallSettingsFrame"] = { area = "left", pushable = 2, whileDead = 1 }
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function LifeSafer_NightfallSettings_OnShow()
|
||||||
|
|
||||||
|
-- initalize GUI
|
||||||
|
local checkButtons = { [1] = LifeSafer_Nightfall_Enabled, [2] = LifeSafer_Nightfall_UseLargeEffect,
|
||||||
|
[3] = LifeSafer_Nightfall_SoundEffects, [4] = LifeSafer_Nightfall_ShardEnabled, }
|
||||||
|
LifeSafer_NightfallSettings_SetValues(checkButtons)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function LifeSafer_NightfallSettings_SetValues(checkButtonValues)
|
||||||
|
|
||||||
|
-- set components to parameters
|
||||||
|
for i, value in checkButtonValues do
|
||||||
|
getglobal("NightfallSettingsFrameCheckButton".. i):SetChecked(value)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function LifeSafer_NightfallSettings_ApplySettings()
|
||||||
|
|
||||||
|
-- set addon enabled
|
||||||
|
LifeSafer_Nightfall_Enabled = getglobal("NightfallSettingsFrameCheckButton1"):GetChecked() or false
|
||||||
|
LifeSafer_Nightfall_UseLargeEffect = getglobal("NightfallSettingsFrameCheckButton2"):GetChecked() or false
|
||||||
|
LifeSafer_Nightfall_SoundEffects = getglobal("NightfallSettingsFrameCheckButton3"):GetChecked() or false
|
||||||
|
LifeSafer_Nightfall_ShardEnabled = getglobal("NightfallSettingsFrameCheckButton4"):GetChecked() or false
|
||||||
|
|
||||||
|
-- propagate settings
|
||||||
|
LifeSafer_Nightfall_ApplySettings()
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function LifeSafer_NightfallSettings_ResetSettings()
|
||||||
|
|
||||||
|
-- restore default values
|
||||||
|
local checkButtons = { LifeSafer_Nightfall_Default_Enabled, LifeSafer_Nightfall_Default_UseLargeEffect,
|
||||||
|
LifeSafer_Nightfall_SoundEffects, LifeSafer_Nightfall_Default_ShardEnabled, }
|
||||||
|
LifeSafer_NightfallSettings_SetValues(checkButtons)
|
||||||
|
|
||||||
|
end
|
||||||
@@ -0,0 +1,182 @@
|
|||||||
|
|
||||||
|
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
|
||||||
|
..\FrameXML\UI.xsd">
|
||||||
|
|
||||||
|
<Script file="localization.lua" />
|
||||||
|
<Script file="NightfallSettings.lua" />
|
||||||
|
|
||||||
|
<Frame name="NightfallSettingsFrame" toplevel="true" movable="true" enableMouse="true" parent="UIParent" hidden="true">
|
||||||
|
|
||||||
|
<Size>
|
||||||
|
<AbsDimension x="384" y="230" />
|
||||||
|
</Size>
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="-184"/>
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
|
||||||
|
<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
|
||||||
|
<BackgroundInsets>
|
||||||
|
<AbsInset left="11" right="12" top="12" bottom="11" />
|
||||||
|
</BackgroundInsets>
|
||||||
|
<TileSize>
|
||||||
|
<AbsValue val="32" />
|
||||||
|
</TileSize>
|
||||||
|
<EdgeSize>
|
||||||
|
<AbsValue val="32" />
|
||||||
|
</EdgeSize>
|
||||||
|
</Backdrop>
|
||||||
|
|
||||||
|
<Layers>
|
||||||
|
<Layer level="ARTWORK">
|
||||||
|
<Texture name="$parentHeader" file="Interface\DialogFrame\UI-DialogBox-Header">
|
||||||
|
<Size>
|
||||||
|
<AbsDimension x="300" y="64" />
|
||||||
|
</Size>
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOP">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="12" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</Texture>
|
||||||
|
<FontString name="$parentLabel1" inherits="GameFontNormal">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOP" relativeTo="$parentHeader">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="-14" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</FontString>
|
||||||
|
<FontString name="$parentVersion" inherits="GameFontNormal" justifyH="RIGHT">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPRIGHT" relativeTo="$parent" relativePoint="TOPRIGHT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="-20" y="-20" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</FontString>
|
||||||
|
<FontString name="$parentLabel2" inherits="GameFontNormal" justifyH="RIGHT">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="RIGHT" relativeTo="$parentVersion" relativePoint="LEFT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="-4" y="0" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</FontString>
|
||||||
|
</Layer>
|
||||||
|
</Layers>
|
||||||
|
|
||||||
|
<Frames>
|
||||||
|
|
||||||
|
<CheckButton name="$parentCheckButton1" inherits="OptionsCheckButtonTemplate">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="30" y="-40" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</CheckButton>
|
||||||
|
|
||||||
|
<CheckButton name="$parentCheckButton2" inherits="OptionsCheckButtonTemplate">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativeTo="$parentCheckButton1" relativePoint="BOTTOMLEFT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="30" y="0" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</CheckButton>
|
||||||
|
|
||||||
|
<CheckButton name="$parentCheckButton3" inherits="OptionsCheckButtonTemplate">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativeTo="$parentCheckButton2" relativePoint="BOTTOMLEFT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="0" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</CheckButton>
|
||||||
|
|
||||||
|
<CheckButton name="$parentCheckButton4" inherits="OptionsCheckButtonTemplate">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT" relativeTo="$parentCheckButton3" relativePoint="BOTTOMLEFT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="-30" y="0" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</CheckButton>
|
||||||
|
|
||||||
|
<Button name="$parentButton1" inherits="OptionsButtonTemplate">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="BOTTOMLEFT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="16" y="16" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
<Scripts>
|
||||||
|
<OnClick>
|
||||||
|
LifeSafer_NightfallSettings_ResetSettings()
|
||||||
|
</OnClick>
|
||||||
|
</Scripts>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<Button name="$parentButton2" inherits="OptionsButtonTemplate">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="BOTTOMRIGHT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="-16" y="16" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
<Scripts>
|
||||||
|
<OnClick>
|
||||||
|
HideUIPanel(this:GetParent())
|
||||||
|
</OnClick>
|
||||||
|
</Scripts>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<Button name="$parentButton3" inherits="OptionsButtonTemplate">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="RIGHT" relativeTo="$parentButton2" relativePoint="LEFT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="-12" y="0" />
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
<Scripts>
|
||||||
|
<OnClick>
|
||||||
|
LifeSafer_NightfallSettings_ApplySettings()
|
||||||
|
HideUIPanel(this:GetParent())
|
||||||
|
</OnClick>
|
||||||
|
</Scripts>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
</Frames>
|
||||||
|
|
||||||
|
<Scripts>
|
||||||
|
<OnLoad>
|
||||||
|
LifeSafer_NightfallSettings_OnLoad()
|
||||||
|
</OnLoad>
|
||||||
|
<OnShow>
|
||||||
|
LifeSafer_NightfallSettings_OnShow()
|
||||||
|
PlaySound("igCharacterInfoOpen")
|
||||||
|
</OnShow>
|
||||||
|
<OnHide>
|
||||||
|
PlaySound("igCharacterInfoClose")
|
||||||
|
</OnHide>
|
||||||
|
</Scripts>
|
||||||
|
|
||||||
|
</Frame>
|
||||||
|
|
||||||
|
</Ui>
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# LifeSafer🦇🦇🦇
|
||||||
|
Enables a flashing red effect when you are low on life (with sounds), and a flasing blue effect when you're low on mana. This warning system was implemented by Blizzard but is not in use. Enables a flashing purple effect when you gain Shadow Trance.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## OctoWoW fork
|
||||||
|
|
||||||
|
This is an OctoWoW-hosted fork of [RavenOfSeven/LifeSafer_LowHealthWarning](https://github.com/RavenOfSeven/LifeSafer_LowHealthWarning) (rebuild by tamara09). The **only** change from upstream is in `LifeSafer_LowHealthWarning.toc`: the `## Title` color escapes were lowercased (`|C…`/`|R` → `|c…`/`|r`) so the OctoLauncher addon browser renders the gradient name instead of printing the raw escape codes. The addon code is unchanged. All credit for the addon goes to the original author.
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,307 @@
|
|||||||
|
|
||||||
|
|
||||||
|
-- LowHealthWarning localization
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
LifeSafer_LowHealthSettings_Labels = {
|
||||||
|
[1] = "Low Health Warning",
|
||||||
|
[2] = "Version",
|
||||||
|
}
|
||||||
|
|
||||||
|
LifeSafer_LowHealthSettings_Buttons = {
|
||||||
|
[1] = DEFAULTS,
|
||||||
|
[2] = CANCEL,
|
||||||
|
[3] = OKAY,
|
||||||
|
}
|
||||||
|
|
||||||
|
LifeSafer_LowHealthSettings_Sliders = {
|
||||||
|
["Sound"] = {
|
||||||
|
[1] = { "Health", "Activate heartbeat when health is below: %d%%", },
|
||||||
|
},
|
||||||
|
["Health"] = {
|
||||||
|
[1] = { "Health", "Health: %d%%", },
|
||||||
|
[2] = { "Critical health", "Critical health: %d%%", },
|
||||||
|
},
|
||||||
|
["Mana"] = {
|
||||||
|
[1] = { "Mana", "Mana: %d%%", },
|
||||||
|
[2] = { "Critical mana", "Critical mana: %d%%", },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
LifeSafer_LowHealthSettings_CheckButtons = {
|
||||||
|
["General"] = {
|
||||||
|
[1] = { "Enable Low Health Warning", "Check to enable the addon.", },
|
||||||
|
[2] = { "Large effects", "Check to use bolder textures.", },
|
||||||
|
},
|
||||||
|
["Sound"] = {
|
||||||
|
[1] = { "Enable heartbeat effect", "Check to enable a heartbeat sound effect.", },
|
||||||
|
[2] = { "Only in combat", "Check to play sounds when in combat only.", },
|
||||||
|
},
|
||||||
|
["Health"] = {
|
||||||
|
[1] = { "Enable health effect", "Check to enable the health warning effect.", },
|
||||||
|
[2] = { "Only in combat", "Check to display health warning in combat only.", },
|
||||||
|
[3] = { "Variable flash rate", "Check to smoothly increase or decrease flash rate instead of using the two thresholds. This will synchronize the flash with the heartbeat." },
|
||||||
|
[4] = { "Emote when critical", "Check to automatically perform the /healme emote when your health is critical.", },
|
||||||
|
},
|
||||||
|
["Mana"] = {
|
||||||
|
[1] = { "Enable mana effect", "Check to enable the health warning effect.", },
|
||||||
|
[2] = { "Only in combat", "Check to display mana warning in combat only.", },
|
||||||
|
[3] = { "Variable flash rate", "Check to smoothly increase or decrease flash rate instead of using the two thresholds.", },
|
||||||
|
[4] = { "Emote when critical", "Check to automatically perform the /oom emote when your mana is below critical.", },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
if (GetLocale() == "deDE") then
|
||||||
|
|
||||||
|
-- German localization originally by Myr of European Gul'dan
|
||||||
|
|
||||||
|
LifeSafer_LowHealthSettings_Labels = {
|
||||||
|
[1] = "Low Health Warnung",
|
||||||
|
[2] = "Version",
|
||||||
|
}
|
||||||
|
|
||||||
|
LifeSafer_LowHealthSettings_Buttons = {
|
||||||
|
[1] = "Standard",
|
||||||
|
[2] = "Abbrechen",
|
||||||
|
[3] = "Ok",
|
||||||
|
}
|
||||||
|
|
||||||
|
LifeSafer_LowHealthSettings_Sliders = {
|
||||||
|
["Sound"] = { -- do not translate this line
|
||||||
|
[1] = { "Leben", "Activate heartbeat when health is below: %d%%", },
|
||||||
|
},
|
||||||
|
["Health"] = { -- do not translate this line
|
||||||
|
[1] = { "Leben", "Leben: %d%%", },
|
||||||
|
[2] = { "Kritische Lebenspunkte", "Kritische Lebenspunkte: %d%%", },
|
||||||
|
},
|
||||||
|
["Mana"] = { -- do not translate this line
|
||||||
|
[1] = { "Mana", "Mana: %d%%", },
|
||||||
|
[2] = { "Kritisches Mana", "Kritisches Mana: %d%%", },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
LifeSafer_LowHealthSettings_CheckButtons = {
|
||||||
|
["General"] = { -- do not translate this line
|
||||||
|
[1] = { "Enable Low Health Warning", "Check to enable the addon.", },
|
||||||
|
[2] = { "Large effects", "Check to use bolder textures.", },
|
||||||
|
},
|
||||||
|
["Sound"] = { -- do not translate this line
|
||||||
|
[1] = { "Enable heartbeat effect", "Check to enable a heartbeat sound effect.", },
|
||||||
|
[2] = { "Only in combat", "Check to play sounds when in combat only.", },
|
||||||
|
},
|
||||||
|
["Health"] = { -- do not translate this line
|
||||||
|
[1] = { "Enable health effect", "Check to enable the health warning effect.", },
|
||||||
|
[2] = { "Only in combat", "Check to display health warning in combat only.", },
|
||||||
|
[3] = { "Variable flash rate", "Check to smoothly increase or decrease flash rate instead of using the two thresholds. This will synchronize the flash with the heartbeat." },
|
||||||
|
[4] = { "Emote when critical", "Check to automatically perform the /healme emote when your health is critical.", },
|
||||||
|
},
|
||||||
|
["Mana"] = { -- do not translate this line
|
||||||
|
[1] = { "Enable mana effect", "Check to enable the health warning effect.", },
|
||||||
|
[2] = { "Only in combat", "Check to display mana warning in combat only.", },
|
||||||
|
[3] = { "Variable flash rate", "Check to smoothly increase or decrease flash rate instead of using the two thresholds.", },
|
||||||
|
[4] = { "Emote when critical", "Check to automatically perform the /oom emote when your mana is below critical.", },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
if (GetLocale() == "frFR") then
|
||||||
|
|
||||||
|
-- French localization originally by Trucifix
|
||||||
|
-- Updated for 2.0+ by Feu
|
||||||
|
|
||||||
|
LifeSafer_LowHealthSettings_Labels = {
|
||||||
|
[1] = "Low Health Warning",
|
||||||
|
[2] = "Version",
|
||||||
|
}
|
||||||
|
|
||||||
|
LifeSafer_LowHealthSettings_Buttons = {
|
||||||
|
[1] = DEFAULTS,
|
||||||
|
[2] = CANCEL,
|
||||||
|
[3] = OKAY,
|
||||||
|
}
|
||||||
|
|
||||||
|
LifeSafer_LowHealthSettings_Sliders = {
|
||||||
|
["Sound"] = { -- do not translate this line
|
||||||
|
[1] = { "Vie", "Active le battement de coeur lorsque la vie est en-dessous de %d%%", },
|
||||||
|
},
|
||||||
|
["Health"] = { -- do not translate this line
|
||||||
|
[1] = { "Vie", "Vie : %d%%", },
|
||||||
|
[2] = { "Vie critique", "Vie critique : %d%%", },
|
||||||
|
},
|
||||||
|
["Mana"] = { -- do not translate this line
|
||||||
|
[1] = { "Mana", "Mana : %d%%", },
|
||||||
|
[2] = { "Mana critique", "Mana critique : %d%%", },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
LifeSafer_LowHealthSettings_CheckButtons = {
|
||||||
|
["General"] = { -- do not translate this line
|
||||||
|
[1] = { "Activer Low Health Warning", "Cocher pour activer l'addon.", },
|
||||||
|
[2] = { "Effets larges", "Cocher pour utiliser des textures plus fonc\195\169es.", },
|
||||||
|
},
|
||||||
|
["Sound"] = { -- do not translate this line
|
||||||
|
[1] = { "Effet Battement de coeur", "Cocher pour activer l'effet sonore de battement de coeur.", },
|
||||||
|
[2] = { "Seulement en combat", "Cocher pour jouer les sons seulement en combat.", },
|
||||||
|
},
|
||||||
|
["Health"] = { -- do not translate this line
|
||||||
|
[1] = { "Effet Vie faible", "Cocher pour activer l'effet d'avertissement de la vie.", },
|
||||||
|
[2] = { "Seulement en combat", "Cocher pour afficher l'effet d'avertissement de la vie seulement en combat.", },
|
||||||
|
[3] = { "Taux de clignotement", "Cocher pour doucement augmenter ou diminuer le tauxde clignotement au lieu d'utiliser les deux limites. Ceci synchronisera le clignotement avec le battement de coeur." },
|
||||||
|
[4] = { "Emote critique", "Cocher pour faire automatiquement l'emote /healme lorsque votre vie est critique.", },
|
||||||
|
},
|
||||||
|
["Mana"] = { -- do not translate this line
|
||||||
|
[1] = { "Effet Mana faible", "Cocher pour activer l'effet d'avertissement de la mana.", },
|
||||||
|
[2] = { "Seulement en combat", "Cocher pour afficher l'effet d'avertissement de la mana seulement en combat.", },
|
||||||
|
[3] = { "Taux de clignotement", "Cocher pour doucement augmenter ou diminuer le tauxde clignotement au lieu d'utiliser les deux limites.", },
|
||||||
|
[4] = { "Emote critique", "Cocher pour faire automatiquement l'emote /healme lorsque votre mana est critique.", },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
if (GetLocale() == "koKR") then
|
||||||
|
|
||||||
|
-- Korean localization originally by Mars
|
||||||
|
|
||||||
|
LifeSafer_LowHealthSettings_Labels = {
|
||||||
|
[1] = "Low Health Warning",
|
||||||
|
[2] = "버젼",
|
||||||
|
}
|
||||||
|
|
||||||
|
LifeSafer_LowHealthSettings_Buttons = {
|
||||||
|
[1] = DEFAULTS,
|
||||||
|
[2] = CANCEL,
|
||||||
|
[3] = OKAY,
|
||||||
|
}
|
||||||
|
|
||||||
|
LifeSafer_LowHealthSettings_Sliders = {
|
||||||
|
["Sound"] = { -- do not translate this line
|
||||||
|
[1] = { "생명력", "생명력이 다음과 같을 때 심장박동 효과가 작동합니다: %d%%", },
|
||||||
|
},
|
||||||
|
["Health"] = { -- do not translate this line
|
||||||
|
[1] = { "생명력", "생명력: %d%%", },
|
||||||
|
[2] = { "치명적인 생명력", "치명적인 생명력: %d%%", },
|
||||||
|
},
|
||||||
|
["Mana"] = { -- do not translate this line
|
||||||
|
[1] = { "마나", "마나: %d%%", },
|
||||||
|
[2] = { "치명적인 마나", "치명적인 마나: %d%%", },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
LifeSafer_LowHealthSettings_CheckButtons = {
|
||||||
|
["General"] = { -- do not translate this line
|
||||||
|
[1] = { "Low Life Warning 활성화", "Low Life Warning를 활성화시키려면 체크하세요.", },
|
||||||
|
[2] = { "큰 화면효과", "굵은 화면텍스쳐를 사용하려면 체크하세요.", },
|
||||||
|
},
|
||||||
|
["Sound"] = { -- do not translate this line
|
||||||
|
[1] = { "심장박동 효과 활성화", "심장박동 사운드 효과를 활성화시키려면 체크하세요.", },
|
||||||
|
[2] = { "전투시에만 사용", "전투시에만 음향효과를 재생하려면 체크하세요.", },
|
||||||
|
},
|
||||||
|
["Health"] = { -- do not translate this line
|
||||||
|
[1] = { "생명력 효과 활성화", "생명력 경고 효과를 활성화시키려면 체크하세요.", },
|
||||||
|
[2] = { "전투시에만 사용", "전투시에만 생명력 경고를 표시하려면 체크하세요.", },
|
||||||
|
[3] = { "부드러운 플래시 효과", "두 한계값을 이용하는 대신에 부드럽게 증가 또는 감소되는 플래시 효과를 사용하려면 체크하세요. 심장박동 음향효과와 플래시 시각효과는 일치됩니다." },
|
||||||
|
[4] = { "치명적 상태시 감정표현", "생명력이 치명적인 상태 시 자동으로 '/치료' 감정표현을 이용하여 알리려면 체크하세요.", },
|
||||||
|
},
|
||||||
|
["Mana"] = { -- do not translate this line
|
||||||
|
[1] = { "마나 효과 활성화", "마나 경고 효과를 활성화시키려면 체크하세요.", },
|
||||||
|
[2] = { "전투시에만 사용", "전투시에만 마나 경고를 표시하려면 체크하세요.", },
|
||||||
|
[3] = { "부드러운 플래시 효과", "두 한계값을 이용하는 대신에 부드럽게 증가 또는 감소되는 플래시 효과를 사용하려면 체크하세요.", },
|
||||||
|
[4] = { "치명적 상태시 감정표현", "마나가 치명적인 상태시 자동으로 '마나' 감정표현을 이용하여 알리려면 체크하세요.", },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Nightfall localization
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
-- To localize this addon:
|
||||||
|
-- 1: copy all the data to the language you're localizing to,
|
||||||
|
-- 2: make sure the strings keep their order,
|
||||||
|
-- 3: write a short comment somewhere in this file; let me know
|
||||||
|
-- under what name you want to be credited, and anything else
|
||||||
|
-- you'd like to add,
|
||||||
|
-- 4: save and send this whole file to: silentaddons@gmail.com
|
||||||
|
-- 5: Thank you :)
|
||||||
|
|
||||||
|
|
||||||
|
LifeSafer_NightfallSettings_Labels = {
|
||||||
|
[1] = "Nightfall",
|
||||||
|
[2] = "Version",
|
||||||
|
}
|
||||||
|
|
||||||
|
LifeSafer_NightfallSettings_ButtonStrings = {
|
||||||
|
[1] = "Defaults",
|
||||||
|
[2] = "Cancel",
|
||||||
|
[3] = "Okey",
|
||||||
|
}
|
||||||
|
|
||||||
|
LifeSafer_NightfallSettings_CheckButtonStrings = {
|
||||||
|
[1] = "Enable Shadow Trance effect",
|
||||||
|
[2] = "Use large effect",
|
||||||
|
[3] = "Enable sound effect",
|
||||||
|
[4] = "Enable Soul Shard creation effect",
|
||||||
|
}
|
||||||
|
|
||||||
|
LifeSafer_NightfallSettings_CheckButtonTooltipStrings = {
|
||||||
|
[1] = "Check to enable Shadow Trance effect.",
|
||||||
|
[2] = "Check to use a larger effect for Shadow Trance.",
|
||||||
|
[3] = "Check to play a sound effect when you gain Shadow Trance.",
|
||||||
|
[4] = "Check to show an effect each time you create a shard.",
|
||||||
|
}
|
||||||
|
|
||||||
|
LifeSafer_Nightfall_String_SoulShard = "Soul Shard"
|
||||||
|
LifeSafer_Nightfall_String_ShadowTrance = "Shadow Trance"
|
||||||
|
LifeSafer_Nightfall_String_YouCreate = "You create"
|
||||||
|
|
||||||
|
|
||||||
|
if (GetLocale() == "deDE") then
|
||||||
|
|
||||||
|
-- German localization (originally by Citanul of Krag'jin)
|
||||||
|
-- Thanks to Gafarion (Alleria, EU) for adjustments
|
||||||
|
|
||||||
|
LifeSafer_NightfallSettings_Labels = {
|
||||||
|
[1] = "Nightfall",
|
||||||
|
[2] = "Version",
|
||||||
|
}
|
||||||
|
|
||||||
|
LifeSafer_NightfallSettings_ButtonStrings = {
|
||||||
|
[1] = "Standard",
|
||||||
|
[2] = "Abbrechen",
|
||||||
|
[3] = "OK",
|
||||||
|
}
|
||||||
|
|
||||||
|
LifeSafer_NightfallSettings_CheckButtonStrings = {
|
||||||
|
[1] = "Effekt fuer Schattentrance aktivieren",
|
||||||
|
[2] = "Grossen Effekt verwenden",
|
||||||
|
[3] = "Soundeffekt aktivieren",
|
||||||
|
[4] = "Herstellungseffekt fuer Seelensplitter aktivieren",
|
||||||
|
}
|
||||||
|
|
||||||
|
LifeSafer_NightfallSettings_CheckButtonTooltipStrings = {
|
||||||
|
[1] = "Klicken um den Effekt fuer Schattentrance einzuschalten.",
|
||||||
|
[2] = "Klicken um einen grossen Effekt fuer Schattentrance zu verwenden.",
|
||||||
|
[3] = "Klicken um einen Soundeffekt abspielen zu lassen, wenn man in Schattentrance versetzt wird.",
|
||||||
|
[4] = "Klicken um jedes Mal, wenn ein Seelensplitter hergestellt wird, einen Effekt anzeigen zu lassen.",
|
||||||
|
}
|
||||||
|
|
||||||
|
LifeSafer_Nightfall_String_SoulShard = "Seelensplitter"
|
||||||
|
LifeSafer_Nightfall_String_ShadowTrance = "Schattentrance"
|
||||||
|
LifeSafer_Nightfall_String_YouCreate = "Ihr stellt her"
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
if (GetLocale() == "frFR") then
|
||||||
|
|
||||||
|
LifeSafer_Nightfall_String_SoulShard = "Fragment d' me"
|
||||||
|
LifeSafer_Nightfall_String_ShadowTrance = "Transe de l'ombre"
|
||||||
|
LifeSafer_Nightfall_String_YouCreate = "Vous cr ez"
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
if (GetLocale() == "koKR") then
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
+122
@@ -0,0 +1,122 @@
|
|||||||
|
Low Health Warning:🦇🦇🦇
|
||||||
|
This addon adds a visual fullscreen effects when your health or mana dips below certain values. It is meant to alert you, and it will not automatically drink a potion or whisper your local healer for aid. If you manage to miss the effect, it will try harder when you get below a critical value. Sounds like nothing special? Well, you really have to see it in action.
|
||||||
|
|
||||||
|
There is a heartbeat sound effect for a more intense warning in version 2.0 and later. Some might recognize this system from other games, but it hasn't been done in World of Warcraft as far as I know.
|
||||||
|
|
||||||
|
See screenshot for a preview of the effect; it will flash in and out along the edge of your WorldFrame. The mana effect is identical but blue.
|
||||||
|
|
||||||
|
Behind the scenes:
|
||||||
|
The textures and methods for animation used are already in the game data files, which makes this small addon quite powerful. It also means that credit should go to the Blizzard designers. Their purpose with these effects were almost the same as mine (the blue effect I use for low mana is meant to show when you get stunned or in other ways lose control of your character). They left the effects hidden and deactivated though, and I thought it could be a good idea to make them usable.
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
/lowhealth (/lhw): open configuration window. All settings can be changed here.
|
||||||
|
|
||||||
|
Changelog:
|
||||||
|
|
||||||
|
Version 2.2.4 (11200)
|
||||||
|
- cleared addon of trash
|
||||||
|
|
||||||
|
Version 2.2.3 (11200)
|
||||||
|
- Update TOC to 1.12.
|
||||||
|
|
||||||
|
Version 2.2.2 (11100)
|
||||||
|
- Fix: Corrected a bug that decreased performance (possibly alot raids) and sometimes caused the effect to disappear.
|
||||||
|
- Fix: Minor change for the shifty druids.
|
||||||
|
- Localization: Korean localization updated (thanks Mars).
|
||||||
|
|
||||||
|
Version 2.2.1 (11100)
|
||||||
|
- Fix: Issues related to the large effect setting should be gone.
|
||||||
|
- Localization: French localization updated (thanks Feu).
|
||||||
|
|
||||||
|
Version 2.2 (11100):
|
||||||
|
- Feature: Added larger textures.
|
||||||
|
|
||||||
|
Version 2.1 (11100):
|
||||||
|
- Feature: Added option to do the /oom emote when mana is below critical (disabled by default)
|
||||||
|
- Update: Removed code that optimized zoning.
|
||||||
|
- Fix: Updated to new button text format (nil value error on line 32)
|
||||||
|
- Fix: All events are now properly unregistered when the addon is disabled.
|
||||||
|
|
||||||
|
Version 2.0 (11000):
|
||||||
|
- The addon is now known as Low Health Warning.
|
||||||
|
- Feature: Heartbeat sound effect; slight impact on performance due to OnUpdate usage.
|
||||||
|
- Feature: Health and mana flashes can now be set to use a 'variable beat' algorithm, similar to the one the heartbeat sound is using. This will, under most conditions, keep the flashing and the heartbeat synchronized.
|
||||||
|
- Feature: Added option to do the /healme emote when health is critical (disabled by default)
|
||||||
|
- Update: All three effects (sound, health, and mana) can now individually be set to In Combat Only.
|
||||||
|
- Update: Revamped settings window, settings code and localization. I need help to translate some strings again (see localization.lua).
|
||||||
|
- Update: You can now disable the low health warning while keeping the mana warning active.
|
||||||
|
|
||||||
|
Version 1.6.3 (11200)
|
||||||
|
- Update TOC to 1.12.
|
||||||
|
|
||||||
|
Version 1.6.2 (11000)
|
||||||
|
- Fix: the 'In combat only' setting now works again (I broke it in 1.6.1).
|
||||||
|
|
||||||
|
Version 1.6.1 (11000)
|
||||||
|
- Update TOC to 1.10.
|
||||||
|
|
||||||
|
Version 1.6 (10900)
|
||||||
|
- Localization: Korean translation added (thanks Mars!).
|
||||||
|
|
||||||
|
Version 1.5 (10900)
|
||||||
|
- Localization: French translation added (thanks Trucifix!).
|
||||||
|
- Localization: German translation added (thanks Myr of Gul'dan!).
|
||||||
|
|
||||||
|
Version 1.4 (10900)
|
||||||
|
- Fix: Transitions between critical to regular flashes are smooth now.
|
||||||
|
- Quirk: Configuration window now opens on '/lowlife' too.
|
||||||
|
- Localization: All strings can now be localized. See localization.lua for details.
|
||||||
|
|
||||||
|
Version 1.3 (10900)
|
||||||
|
- New feature: Mana warning can now be disabled.
|
||||||
|
- New feature: Combat only mode
|
||||||
|
- Fix: Druids should no longer see the mana flash while shapeshifted.
|
||||||
|
|
||||||
|
Version 1.2c (10900)
|
||||||
|
- Fix: The health flash is now correctly showing.
|
||||||
|
- Fix: Removed debug calls (probably caused nil value errors).
|
||||||
|
|
||||||
|
Version 1.2 (10900)
|
||||||
|
- New feature: A configuration window:
|
||||||
|
* Command: /lowlife settings
|
||||||
|
* Toggle the addon on or off.
|
||||||
|
* Regular and critical thresholds for both health and mana.
|
||||||
|
- Fix: Both flashes are now correctly positioned.
|
||||||
|
- Improvement: Alot of code has been improved.
|
||||||
|
- Localization: Added basic localization.
|
||||||
|
|
||||||
|
Version 1.1 (10900)
|
||||||
|
- Two thresholds; one regular (at 30%) and one critical (at 15%).
|
||||||
|
- A blue effect for casters.
|
||||||
|
|
||||||
|
Nightfall, by Silent:🦇🦇🦇
|
||||||
|
|
||||||
|
Install by dropping the extracted folder in your Addons folder. Make sure you keep folder
|
||||||
|
structure, the two .tga files should be in a subfolder named 'texture'.
|
||||||
|
|
||||||
|
To enable sound, drop a mp3 sound named 'ShadowTrance.mp3' in the sounds folder.
|
||||||
|
|
||||||
|
Type /nightfall in game for configuration.
|
||||||
|
|
||||||
|
Version 1.1.2 (11000)
|
||||||
|
- Fix: Made corrections to the German localization
|
||||||
|
* strings should now display in a proper manner,
|
||||||
|
* restored Shadow Trance detection.
|
||||||
|
|
||||||
|
Version 1.1.2 (11000)
|
||||||
|
- Localization: Added German localization (thanks Citanul of Krag'jin!).
|
||||||
|
|
||||||
|
Version 1.1.1 (11000)
|
||||||
|
- Updated TOC to 1.10.
|
||||||
|
|
||||||
|
Version 1.1 (10900)
|
||||||
|
- Two modes for Shadow Trance
|
||||||
|
- Sound support
|
||||||
|
|
||||||
|
Version 1.0 (10900)
|
||||||
|
- Initial release
|
||||||
|
|
||||||
|
Contact:
|
||||||
|
- You can send questions, comments, and/or complaints to silentaddons@gmail.com
|
||||||
|
- Zaina is my forum avatar
|
||||||
|
- tamara09 (rebuilder)
|
||||||
Reference in New Issue
Block a user