From be5f8c0e7bc4f24c0853275f6ff009a59e9c3f5f Mon Sep 17 00:00:00 2001 From: Xruptor Date: Tue, 24 Jul 2018 13:27:09 -0400 Subject: [PATCH] Updated for 8.0 BFA -Fixed an error with the UNIT_POWER. It was changed for BFA. --- xanSoundAlerts.lua | 4 ++-- xanSoundAlerts.toc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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 -- 1.7.9.5