only display magicka deto when the current magicka percentage is over 15 %
René Welbers [01-18-16 - 13:03]
only display magicka deto when the current magicka percentage is over 15 %
diff --git a/RaidNotifier.lua b/RaidNotifier.lua
index 54f0020..f2326b2 100644
--- a/RaidNotifier.lua
+++ b/RaidNotifier.lua
@@ -158,7 +158,13 @@ function RaidNotifier.sanctumDebuffs(_, change, buff, name, unit, start, finish,
-- d('effectType', effectType)
-- d('start', start)
-- d('finish', finish)
- CENTER_SCREEN_ANNOUNCE:AddMessage(1, CSA_EVENT_COMBINED_TEXT, SOUNDS.CHAMPION_POINTS_COMMITTED, GetString(RAIDNOTIFIER_SANCTUM_MAGICKA_DETONATION_ALERT), nil, nil, nil, nil, nil, 5000)
+ -- get current magicka percentage
+ local current, maximum, _ = GetUnitPower("player", POWERTYPE_MAGICKA)
+ local magickaPercentage = zo_roundToNearest(current/maximum,0.01)
+
+ if magickaPercentage > 15 then
+ CENTER_SCREEN_ANNOUNCE:AddMessage(1, CSA_EVENT_COMBINED_TEXT, SOUNDS.CHAMPION_POINTS_COMMITTED, GetString(RAIDNOTIFIER_SANCTUM_MAGICKA_DETONATION_ALERT), nil, nil, nil, nil, nil, 5000)
+ end
end
end
end