Quantcast

Updated for 8.0 BFA

Xruptor [07-24-18 - 17:27]
Updated for 8.0 BFA
-Fixed an error with the UNIT_POWER.  It was changed for BFA.
Filename
xanSoundAlerts.lua
xanSoundAlerts.toc
diff --git a/xanSoundAlerts.lua b/xanSoundAlerts.lua
index 909e62b..4a475c4 100644
--- a/xanSoundAlerts.lua
+++ b/xanSoundAlerts.lua
@@ -26,7 +26,7 @@ function f:PLAYER_LOGIN()
 	f.PLAYER_LOGIN = nil

 	f:RegisterEvent("UNIT_HEALTH")
-	f:RegisterEvent("UNIT_POWER")
+	f:RegisterEvent("UNIT_POWER_UPDATE")

 	local ver = tonumber(GetAddOnMetadata("xanSoundAlerts","Version")) or 'Unknown'
 	DEFAULT_CHAT_FRAME:AddMessage("|cFF99CC33xanSoundAlerts|r [v|cFFDF2B2B"..ver.."|r] loaded.")
@@ -66,7 +66,7 @@ end
 -- SPELL_POWER_PAIN            18      "PAIN"

 --only worry about mana, don't care about special power types really for now
-function f:UNIT_POWER()
+function f:UNIT_POWER_UPDATE()
 	if ((UnitPower("player", SPELL_POWER_MANA) / UnitPowerMax("player", SPELL_POWER_MANA)) <= lowManaThreshold) then
 		if (not lowMana) then
 			PlaySoundFile("Interface\\AddOns\\xanSoundAlerts\\sounds\\LowMana.ogg", "Master")
diff --git a/xanSoundAlerts.toc b/xanSoundAlerts.toc
index 8723233..72109cc 100644
--- a/xanSoundAlerts.toc
+++ b/xanSoundAlerts.toc
@@ -1,8 +1,8 @@
-## Interface: 70100
+## Interface: 80000
 ## Title: xanSoundAlerts
 ## Notes: Plays a sound when your health or mana is low.
 ## Author: Xruptor
-## Version: 1.1
+## Version: 1.2
 ## OptionalDeps: tekDebug

 xanSoundAlerts.lua